Hugging Face Kernels: Swap Faster Kernels Into Models Without Rewriting
RisingSayak · x · 2026-09-18
Hugging Face's Sayak Paul demos the 🤗 Kernels library, which lets you swap optimized kernels into supported model layers without rewriting the model. A decorator (usekernelforwardfromhub) marks layers as swappable, a mapping binds layers to Hub kernels per device, and kernelize(model, mode=Mode.INFERENCE) replaces forward() on eligible layers only. You can specify separate kernels for inference vs training and per device type, registered globally or locally.
Related event: Hugging Face Launches Kernels Library for Drop-in Faster Kernels(2 posts)→
More from coding & agent
- Free course covers the 4 hard problems of production generative media agents — Al_Grigor · 2026-11-04
- Quota reset night: Codex back to 100% while Claude shows just 10% left — rudrank · 2026-11-04
- Self-improving software is inevitable: closing the agent-observability loop — bibryam · 2026-11-04
- Building a 7-GPU 132GB VRAM local inference rig: consolidate on EPYC or split across two systems? — infectiousstupidity · 2026-11-04
- Founder of 50-person, 12-country team says he talks to AI agents more than humans — Scobleizer · 2026-11-04
- Pi launches a minimal agent harness; Zammoth adds AI engineer to Mac music app — solyarisoftware · 2026-11-04