Metadata-Version: 2.4
Name: convert-hf-to-gguf
Version: 0.1.0
Summary: Convert Hugging Face models to GGUF format
License: MIT
License-File: LICENSE
Keywords: ggml,gguf,llama.cpp,huggingface,converter
Author: GGML
Author-email: ggml@ggml.ai
Requires-Python: >=3.10,<3.15
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: gguf (>=0.19.0)
Requires-Dist: numpy (>=1.26.4)
Requires-Dist: protobuf (>=4.21.0)
Requires-Dist: sentencepiece (>=0.1.98)
Requires-Dist: torch (>=2.6.0)
Requires-Dist: transformers (>=4.57.0)
Project-URL: homepage, https://ggml.ai
Project-URL: repository, https://github.com/ggml-org/llama.cpp
Description-Content-Type: text/markdown

# convert-hf-to-gguf

Convert Hugging Face transformer models to the [GGUF](https://github.com/ggml-org/ggml/blob/master/docs/gguf.md) format for use with [llama.cpp](https://github.com/ggml-org/llama.cpp) and compatible inference engines.

## Installation

```sh
pip install convert-hf-to-gguf
```

## Usage

Convert a Hugging Face model directory to GGUF:

```sh
convert-hf-to-gguf /path/to/model-directory
```

Specify the output format (default: auto):

```sh
convert-hf-to-gguf --outtype f16 /path/to/model-directory
```

Download and convert a model directly from Hugging Face Hub:

```sh
convert-hf-to-gguf --remote --outtype q8_0 HuggingFaceTB/SmolLM2-1.7B-Instruct
```

### Options

| Option | Description |
|--------|-------------|
| `--outtype` | Output format: `f32`, `f16`, `bf16`, `q8_0`, `tq1_0`, `tq2_0`, `auto` (default) |
| `--vocab-only` | Extract only the vocabulary |
| `--outfile` | Output file path |
| `--remote` | Read model files remotely from Hugging Face Hub |
| `--mmproj` | Export multimodal projector for vision models |
| `--print-supported-models` | List all supported model architectures |
| `--verbose` | Increase output verbosity |
| `--split-max-size` | Split output into chunks of max size (e.g., `4G`) |

See `--help` for the full list of options.

## Supported models

Convert-hf-to-gguf supports a wide range of model architectures including:
LLaMA, Mistral, Mixtral, Qwen, DeepSeek, Falcon, Gemma, Phi, BERT, Mamba,
GPT-NeoX, StableLM, Command-R, DBRX, OLMo, Grok, and many more.

Run `convert-hf-to-gguf --print-supported-models` for the full list.

## License

MIT

