proomt

Search

Search posts, papers, and topics

All posts

Hugging FaceMarc Sun, Arthur Zucker, Lysandre10 min readintermediate

Transformers now runs llama.cpp quants

Summary

Transformers now supports GGUF quantized checkpoints (used by llama.cpp) via the `kernels` library. Load a GGUF model with `from_pretrained` on Apple Silicon, run generation with standard Transformers APIs, or serve it via `transformers serve`. Benchmarks on an M2 Max show token‑throughput comparable to llama.cpp, with fallback to dequantization if kernels are missing. The integration also enable…

  • GGUF packs weights, tokenizer, and optional chat template in a single file; common quantizations are Q4_K_M, Q5_K_M, Q6_K.
  • Loading a GGUF model requires only `gguf_file` argument; Transformers automatically selects ggml/Metal kernels or falls back to SDPA.
  • Benchmark on a MacBook Pro M2 Max (32 GB) shows Transformers’ `generate` throughput close to llama.cpp’s `llama‑bench` for Q4_K_M checkpoints, despite including prefill time.
  • `transformers serve` exposes an OpenAI‑compatible endpoint for local GGUF models, usable by clients like Jan or Pi.

Local inference on consumer hardware is becoming practical; integrating GGUF into Transformers lets developers stay in the familiar PyTorch ecosystem while leveraging llama.cpp’s efficient quantized kernels. This lowers the barrier for experimentation, evaluation, and fine‑tuning of quantized model…

6/10

Related reading

  1. GLM 5.3 FlashX now available on AI Gateway

    Vercel AI Gateway now offers the GLM‑5.3‑FlashX model, a fast (~200 tps) multimodal coding LLM. The post includes a TypeScript streaming example, notes the model’s fit for coding agents and interactive tools, and lists AI Gateway features (unified API, usage tracking, retries/failover, custom reporting, key budgets, routing rules) with no platform fee.

    Vercelvercel.com1 minrelease
  2. Transformers Explained Visually

    The article walks through the core components of a text‑generative Transformer—embedding, multi‑head self‑attention, MLP, and output projection—using GPT‑2 small as a concrete example. It shows the dimensions, parameter counts, and step‑by‑step calculations that underlie token prediction.

    Hacker News front pagegithub.io11 minHN59487
  3. Flash-dLLM: IO-Aware KV Caching and Parallel Decoding for Fast, Memory-Efficient Diffusion LLMs

    Flash-dLLM is a training-free framework that accelerates Diffusion LLM inference by addressing GPU memory I/O bottlenecks with an I/O-aware KV-cache kernel. It also introduces a KV-cache-driven draft-and-verify decoding strategy, achieving significant speedups (up to 11x) over prior methods.

    Hugging Face Daily Papersarxiv.org1 minpaper
  4. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)

    ByteShape releases full ShapeLearn quantizations for Qwen 3.8 27B, showing that their GPU‑specific GGUFs (GPU‑1…GPU‑5) dominate the quality‑throughput frontier across six GPUs, with GPU‑5 hitting 99.63 % of BF16 accuracy at 90 TPS on a 13.1 GB model. Speculative decoding (MTP, DFlash2) further boosts throughput, and the Lite set remains competitive.

    Hacker News front pagebyteshape.com17 minHN10439