Transformers now loads llama.cpp GGUF quants on Apple Silicon
A GGUF checkpoint can be passed straight to from_pretrained and run with its weights still packed, using ggml's Metal kernels through the kernels library. The target is a single interactive conversation on an Apple Silicon Mac, and the packed path covers the Qwen3.5 dense and mixture-of-experts architectures plus compatible Qwen3.8 checkpoints. Hugging Face says the result comes close to llama.cpp on the three checkpoints it measured, while noting the two measurements were not taken under identical conditions. It still recommends llama.cpp when efficient local inference is the priority.
Source
Transformers now runs llama.cpp quantsHugging Face Blog · Original published September 22, 2026
Hugging Face published GGUF support in transformers on September 22, 2026, and the practical effect is narrow but real. A quantized checkpoint sized for your laptop now loads through from_pretrained and generates text from there. No conversion step, and no leaving PyTorch. You pass the Hub repository and the file name as gguf_file, and nothing else in the usual code changes. The weights stay packed, and the library fetches ggml's Metal kernels to read them in that form.
What you need, and what fits
The requirements are specific: an Apple Silicon Mac, a PyTorch version covered by the published kernel builds, transformers from the main branch until the next release, and a compatible kernels. If the attention kernel cannot be fetched, the model falls back to sdpa with a warning rather than failing, and without a compatible quantization kernel the loader dequantizes and uses more memory.
File size is the number that decides what runs on a given machine, and Hugging Face publishes it for Unsloth's Qwen3.5-4B. The same weights range from 8.42 GB unquantized to 2.74 GB at Q4_K_M, which is the variant the post recommends starting from. Q5_K_M and Q6_K are the steps up when memory allows.
- BF16: 8.42 GB, the unquantized reference.
- Q6_K: 3.53 GB, more precision than the smaller variants.
- Q5_K_M: 3.14 GB, between size and precision.
- Q4_K_M: 2.74 GB, the recommended starting point.
How close it gets to llama.cpp
Hugging Face measured against llama.cpp on a MacBook Pro with an M2 Max and 32 GB of unified memory, on macOS 26.6, with PyTorch 2.12.1 and kernels 0.17.0, plugged in. The llama.cpp side comes from llama-bench reporting decode-only throughput over 128 tokens, averaged over three runs. The transformers side generates the same 128 tokens from a 12-token prompt, best of three warmed runs, and includes prefill.
The post says transformers is close to llama.cpp across all three checkpoints it tested, and says plainly that the two measurements do not run under identical conditions. The per-checkpoint figures appear only in a chart, not in the text, so there is no number here to quote. Hugging Face also keeps its recommendation intact: llama.cpp remains its engine of choice when the priority is efficient local inference.
Why it is worth having anyway
The value is not a faster chatbot. It is that a GGUF checkpoint becomes an ordinary PyTorch model. You can hook into activations, change a forward pass, or run your existing evaluation workflow against the quantized file. You can also check a conversion by loading the original and the GGUF side by side. Fine-tuning from a GGUF checkpoint works through GgufConfig(dequantize=True).
The limits are stated clearly. The packed path is MPS-only for now, architecture coverage is the Qwen3.5 dense and mixture-of-experts models plus compatible Qwen3.8 checkpoints, and padded batches cannot use the mask shortcut and can be slower. Two of the changes landed in generate itself, so every model in the library benefits: an unnecessary attention mask is dropped early, and the stopping check is read one step late so the processor keeps scheduling work.
„llama.cpp remains our recommended engine when your priority is efficient local inference.“
Once a week, in your inbox
The whole week's news, gathered into one email. No ads, no passing your address on, one-click unsubscribe.
The address is used only for this roundup. It is not sold and not passed to anyone.
Related
OpenAI opens healthcare model configurations to API organizations at base-model token prices
OpenAI has added four healthcare configurations of its models to the API. They combine healthcare-specific instructions with search over a dedicated index of medical sources. Token prices match the base models, but OpenAI calls the pricing promotional and search is billed separately. Access alone does not permit processing protected health information.
OpenAIverified
llama.cpp can now quantize a model to a file size you set and choose the bit mix itself
Build b12669 adds an option to llama-quantize that takes a target file size and decides how many bits each part of the model gets. The author reports matching or beating the standard presets in 93% of tests. A second contributor found an improvement on several models and a clear loss on one.
llama.cppverified
Anthropic will retire Claude Opus 4.5 on January 22, 2027, and points developers to Opus 5.5
Requests to Claude Opus 4.5 will fail from January 22, 2027, on the platforms Anthropic runs, including when the model is set in Claude Code. Opus 5.5 is cheaper per token but needs code changes. On the same day Anthropic opened a beta that lets eligible organizations use its most capable models without Anthropic keeping their prompts.
Anthropicverified
