Convert Hugging Face models to GGUF format
Project description
convert-hf-to-gguf
Convert Hugging Face transformer models to the GGUF format for use with llama.cpp and compatible inference engines.
Installation
pip install convert-hf-to-gguf
Usage
Convert a Hugging Face model directory to GGUF:
convert-hf-to-gguf /path/to/model-directory
Specify the output format (default: auto):
convert-hf-to-gguf --outtype f16 /path/to/model-directory
Download and convert a model directly from Hugging Face Hub:
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file convert_hf_to_gguf-0.1.0.tar.gz.
File metadata
- Download URL: convert_hf_to_gguf-0.1.0.tar.gz
- Upload date:
- Size: 156.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.13.14 Linux/7.0.13+deb14-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8fe77bb124b44696f0d2ebf4339b84686110ed074022d792ccd985182b28cf6
|
|
| MD5 |
e542ed2b01d1620832f8ebe40042f145
|
|
| BLAKE2b-256 |
3d4782a123caeb6dde1d343bc5af1f6a74262237df3cb06ffcd975e9446e5cc3
|
File details
Details for the file convert_hf_to_gguf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: convert_hf_to_gguf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 218.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.13.14 Linux/7.0.13+deb14-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2edb94f1e0ba83067cafbe16fc0726d13dbad40665067e1ebbb953c9fd36c17
|
|
| MD5 |
b49e6fc83a7a827060264376b1c44245
|
|
| BLAKE2b-256 |
e2f6be7bd6209072ecbf4eb2590c66fdf5873a69923ffb4f624a1440d38cf2bd
|