Skip to content
Machines & local modelsmedium signalverified

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.

By Redakcija WebAiRadarPublished 3 min readwritten by a model
Image: Hugging Face

Source

Transformers now runs llama.cpp quants

Hugging 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.“
Hugging Face, Transformers now runs llama.cpp quants

Related

LLAMA.CPP B115567.63 GBBonsai 2 27B without the fork
Machines & local modelsmedium signal

llama.cpp now runs PrismML's ternary Bonsai 2 27B without the company's fork

Build b11556 adds the weight rotation step that Bonsai 2 27B was missing in stock llama.cpp. The 7.63 GB Q2_0 file now gives correct output there, while PrismML's smaller PQ2_0 and PTQ1_0 packs still require the company's own build.

llama.cppverified

LLAMA.CPP0.6.0GLM-5.3-Flash and a server API for decision mo
Machines & local modelsmedium signal

llama.cpp 0.6.0 adds GLM-5.3-Flash support and a server API for decision models

The llama.cpp project released version 0.6.0 on October 5, 2026. It adds support for GLM-5.3-Flash, a model for text and images with 320 billion parameters, and a new server endpoint for decision models. Two changes to speculative decoding come with measurements from their authors, one on Nvidia's DGX Spark and one on Apple GPUs. The release also changes the C API and raises the version of the saved session format, so programs built on the library need a check before you upgrade.

llama.cppverified