Transformers now runs llama.cpp quants
AI-generated summary of reporting by Huggingface Blog. Read the original for the full story.
Why it matters
Developers can now run llama.cpp-quantized GGUF checkpoints directly through transformers' Python API at near-llama.cpp speeds on Apple Silicon, removing the need to switch runtimes for local inference or fine-tuning.
Hugging Face's transformers software can now load GGUF files, the compressed model format used by tools like Ollama to run AI models on laptops. These files shrink models to fit a machine's memory by storing weights at lower precision, such as 4-bit. Previously you needed a separate program to run them; now the familiar Python tools handle it directly. Performance on a MacBook Pro M2 Max is close to llama.cpp's dedicated engine.
Hugging Face has closed a practical gap: GGUF checkpoints, the quantized format behind Ollama and LM Studio, now run in transformers with performance measured near llama.cpp on a MacBook Pro M2 Max (32 GB). Teams get one checkpoint usable for local serving via an OpenAI-compatible API, evaluation, and fine-tuning in PyTorch. Risk: the packed path is Metal-only and currently supports Qwen3.5 architectures, so cross-platform coverage is limited.
transformers now loads GGUF checkpoints by reusing ggml's Metal kernels via the kernels library: quantized matmul, fused zero-centered RMSNorm, flash attention, gated delta network acceleration, and a custom top-k MoE routing kernel. Generation-loop optimizations (#48814 mask removal, #47976 async stopping check) help all models. Benchmarks on an M2 Max show throughput close to llama-bench's tg128, though transformers includes prefill. Limitations: packed inference is MPS-only, currently covers Qwen3.5 dense and MoE, and padded batching is unsupported.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
transformers GGUF llama.cpp kernels library Qwen3.5 MacBook Pro M2 Max
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.