Back to feed
News Story
Hugging Face Blog
1 sources

Transformers Now Runs llama.cpp Quants

Transformers now supports running llama.cpp quants. This allows users to use llama.cpp's quantization formats directly within the Transformers framework, making it easier to deploy and run quantized large language models. This integration can improve inference efficiency and reduce resource consumption.

SynthePulse Insight · AI deep readingMembers

Transformers Runs GGUF Directly: Local Inference Gains Another Path, but the Boundaries Are Clear

Version 1 · 1 source

Hugging Face lets transformers load llama.cpp's GGUF quantized checkpoints, initially only for Apple Silicon and the Qwen3.5 architecture. It reuses ggml kernels to approach llama.cpp's performance, but "approach" is the official claim, and the full comparison numbers have not been published.

  • transformers now supports selecting GGUF checkpoints from the Hub, loading them with from_pretrained, and generating locally.
  • GGUF packs weights, tokenizer information, and an optional chat template into a single file, and supports different quantization levels.
  • The initial focus is local inference on Apple Silicon, starting with the Qwen3.5 architecture.
Open section navigationWhat This Update Actually Changes

What This Update Actually Changes

Hugging Face announced that transformers now supports running GGUF models efficiently: users can select a GGUF checkpoint from the Hub, load it via from_pretrained, and then generate on their own machine. Loading only requires passing the Hub's model_id and filename as gguf_file to from_pretrained, with no extra configuration.

GGUF was developed by the llama.cpp team, packing model weights and metadata (including tokenizer information and an optional chat template) into a single file, and supporting different quantization levels. Besides the llama.cpp team sharing quantized checkpoints on the Hub under the name ggml-org, publishers such as Unsloth, LM Studio Community, and bartowski also provide GGUF checkpoints at various quantizations; GGUF models have been downloaded millions of times.

It must be emphasized that the scope of this support has clear boundaries: the initial focus is local inference on Apple Silicon, starting with the Qwen3.5 architecture. The source does not say when or whether this support will extend to other hardware or model architectures.

Why GGUF, Rather Than Inventing Another Format

GGUF is already one of the de facto formats for local inference. In the post, Hugging Face describes llama.cpp's inference engine as the foundation for local AI tools such as Ollama, LM Studio, and Jan, and mentions that projects like MLX together make local inference an everyday option. By choosing to be compatible with this format rather than starting from scratch, transformers effectively plugs the existing quantized checkpoint ecosystem directly into its own API.

The benefits of quantization can be measured intuitively by file size. Take Unsloth's Qwen3.5-4B as an example: the BF16 variant is 8.42 GB, serving as the unquantized reference; Q6_K is 3.53 GB, with higher precision than the smaller variants; Q5_K_M is 3.14 GB, a compromise between size and precision; Q4_K_M is 2.74 GB, officially recommended as a practical starting point for local inference. The official recommendation is to try Q4_K_M first, then try Q5_K_M or Q6_K when more memory is available.

But quantization is not free. The official statement explicitly says that more aggressive quantization can help larger models fit into memory, that the quality trade-off depends on the model and the task, and that it should be evaluated on the actual work you intend to do. The source does not provide specific evaluation data on quantization's impact on model quality.

Free for now

Read the full analysis

4 more sections of analysis, plus the full takeaway

Loading

Credibility boundary

The facts in this article mainly come from the official Hugging Face blog (a first-hand source). Among them, "transformers approaches llama.cpp on three checkpoints" is an official claim; the source does not show the complete chart values, so it cannot be independently verified. The source does not explain quantization's impact on model quality, the conditions or frequency of kernel acquisition failure, the official release date, or plans to expand to other hardware or architectures.

Primary report

Hugging Face Blog

Primary source