← Back to Reading
Daily Dose of DS 2026-10-08

Karpathy’s Trick for Faster Local LLMs Finally Has Proper Tooling

Uzu is an open-source local LLM inference engine designed for batch-size-one workloads on Apple Silicon hardware. Instead of being limited by memory bandwidth to roughly 29 tokens per second on a base M5 chip, Uzu achieves 92 to 117 tokens per second with a 4-bit Qwen3.5 9B model. It accomplishes this through a co-designed pipeline incorporating int8 quantization with Random Hadamard Transforms, DFlash-Weaver speculative tree drafting, and rollback-free verification for stateful Gated DeltaNet layers.

Read the original ↗
LOCAL AI

Karpathy’s trick for faster local LLMs finally has proper tooling

Uzu is an open-source local LLM inference engine designed for batch-size-one workloads on Apple Silicon hardware. Instead of being limited by memory bandwidth to roughly 29 tokens per second on a base M5 chip, Uzu achieves 92 to 117 tokens per second with a 4-bit Qwen3.5 9B model. It accomplishes this through a co-designed pipeline incorporating int8 quantization with Random Hadamard Transforms, DFlash-Weaver speculative tree drafting, and rollback-free verification for stateful Gated DeltaNet layers.

  • At batch size one, local LLM generation speed is fundamentally bounded by memory bandwidth; on a base M5 (153 GB/s bandwidth), a 5.2 GB 4-bit 9B model has a theoretical ceiling of ~29 tokens/second for single-token decoding.
  • Uzu pairs 4-bit weight quantization and on-the-fly int8 activation quantization with a block-diagonal Random Hadamard Transform to mitigate outlier errors matching the Apple GPU 32-thread SIMD width.
  • Speculative drafting in Uzu uses DFlash and Weaver to generate coherent candidate token trees with 16-to-32-token budgets, leveraging idle arithmetic capacity on the M5's Neural Accelerators.
  • To handle recurrent Gated DeltaNet layers in Qwen3.5 without performance-degrading state restorations, Uzu uses rollback-free tree verification via recurrence-free Metal kernels.
  • In benchmarks on an M5 MacBook Pro, Uzu generated 92–117 tokens/s (accepting ~7.5–8.4 tokens per forward pass), outperforming llama.cpp (22 tokens/s) and MLX (25 tokens/s).