# Repository Briefing: ggml-org/convert
> Source: https://repoforai.com/repo/ggml-org/convert (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ggml-org/convert
- **Official Docs / Website**: https://huggingface.co/ggml-org
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Shell
- **License**: See repository
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 15/25 · Releases 11/20 · License 6/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: CLI
- **Momentum**: 78 ★ total (+1 24h / +4 7d) · 19 forks
- **Topics**: `gguf`
- **When to Use**: Best for: Teams that regularly regenerate and publish GGUF artifacts for a configured Hugging Face model catalog, locally or via hosted Jobs. Skip if: You need an inference server, an offline-only workflow out of the box, or a one-off conversion that does not need catalog and publishing automation.

## Overview
```text
### Architecture & Core Mechanics
This is a Shell-orchestrated conversion and publishing pipeline upstream of inference, not a GGUF runtime. `convert.sh` selects model entries under `models/`, checks source revisions, and coordinates downloads, conversion via llama.cpp, model card updates, and publication to Hugging Face. Per-model `config.sh` files provide a configuration point: setting `COLLECTION` associates publishing with an existing collection.

The Python stack pins `huggingface_hub[hf_xet]==1.28.0`, `transformers==5.13.1`, and `mistral-common==1.12.0`. It also lists SentencePiece in the range `>=0.1.98,<0.3.0`, `protobuf>=4.25.0` for a SentencePiece protobuf import in `ergo.py`, and unpinned `torch`, with PyTorch’s CPU wheel index listed as an extra package index.

### Key Capabilities & Differentiators
The CLI handles a full catalog, a single configured model via `--one`, or a filtered subset via `--filter`; `^gemma` is an example filter. Published GGUF outputs include Gemma 4, Qwen3.6, and GPT-OSS examples. These establish concrete conversion coverage, not universal compatibility with arbitrary Hugging Face models. Check `models/` for the relevant entry before planning a batch.

Weight conversion runs only if at least one source model has changed, unless `--force` bypasses the SHA check. Model cards are updated even when weights are unchanged. Use `--keep --no-upload` to retain both downloaded inputs and generated upload directories for inspection. The collection helper creates collections, private by default, and can look up the slug of an existing collection by name.

### Trade-offs & Limitations
Compared with invoking the upstream llama.cpp converter directly, this wrapper is a stronger fit for maintaining a recurring Hugging Face catalog: it adds model selection, source revision checks, model card updates, and publishing. For a one-off conversion, the direct tool avoids tying the workflow to catalog configuration and collection management. Local execution uses your own workers and storage; Hugging Face Jobs shifts execution to hosted infrastructure without eliminating model transfers or capacity planning.

By default, tracking llama.cpp’s latest `master` picks up upstream changes but allows conversion behavior to drift between runs. `--llama-commit` fixes that input, not the full environment: `torch` is unpinned, and other dependencies use ranges or minimum versions. For repeatable rebuilds, record the source revisions, converter commit, and resolved Python environment. If the converter changes while source weights do not, use `--force` when you need to regenerate artifacts.

### Hardware & Deployment Guide
For local operation, plan for Bash, a Python environment with the listed dependencies, and enough working disk for downloaded models and generated artifacts. A `create-venv.sh` helper is present. Publishing requires `HF_TOKEN` with write access to the target organization. `--no-upload` suppresses publication; it does not establish an offline path for fetching sources or dependencies.

For hosted execution, `hf-job.sh` submits work to Hugging Face Jobs and accepts `--hardware`, with `cpu-basic` shown as an option rather than a sizing guarantee. Size workers by measuring peak RAM and disk use on representative inputs, and account for transfer volume when publishing. The ggml-org catalog is converted weekly through GitHub Actions, with manual dispatch available to maintainers. No tagged release is listed, and the repository license is unspecified.
```

## Key Capabilities
```text
- Model selection: `convert.sh` can process the full catalog, one `--one` entry, or entries matching a `--filter` pattern.
- Incremental conversion: Source revision checks skip unchanged weight conversions; model cards still update, and `--force` bypasses the checks.
- Converter revision: The workflow uses the latest llama.cpp `master` by default; `--llama-commit` selects a specific commit.
- Staging: `--keep --no-upload` retains downloaded sources and generated upload directories without publishing them.
- Execution modes: Run locally with `convert.sh`, submit to Hugging Face Jobs via `hf-job.sh`, or use the weekly GitHub Actions workflow as a scheduling reference.
- Collection management: `create-collection.sh` creates private-by-default collections and resolves existing slugs by case-sensitive name.
```

## Quick Start / Clone
```bash
# Convert all models
bash convert.sh --owner <org>

# Convert a single model
bash convert.sh --owner <org> --one gemma-4-12b

# Convert models matching a filter
bash convert.sh --owner <org> --filter '^gemma'

# Force re-convert (ignore SHA checks)
bash convert.sh --owner <org> --force

# Keep downloaded models and generated upload directories
bash convert.sh --owner <org> --keep

# Keep downloaded models and generated upload directories, but don't upload
bash convert.sh --owner <org> --keep --no-upload

# Use a specific llama.cpp commit
bash convert.sh --owner <org> --llama-commit <commit>

# Run via HF Jobs (cloud infrastructure)
bash hf-job.sh --owner <org>

# Run via HF Jobs with a custom hardware flavor
bash hf-job.sh --owner <org> --hardware cpu-basic

# Create a collection on Hugging Face (prints the collection slug, private by default)
bash create-collection.sh --owner <org> --na
```
