Hugging Face kernels: Jinja templates let browsers compile the fastest GPU kernels
nicodotdev · x · 2026-09-04
Two days after shipping @huggingface/kernels, a Hugging Face engineer published a deep dive into how the browser-side GPU kernel library works.
- Jinja templates instead of WGSL files: the optimal kernel differs per GPU, so templates are compiled in-browser for the specific device
- Results: attention in 20 lines of JS running on the GPU; a single matmul animates 1M+ pixels at 400 fps vs 6 fps in plain JS
- Fleet: users benchmark their GPUs, helping tune kernels for every device
Full video, blog post, playground, and npm package are linked.
Related event: HF Deep-Dives Into kernels Library That Compiles GPU Kernels in the Browser(2 posts)→
More from Infra
- Perplexity CEO pitches local AI hardware with Nvidia and Apple, backs hybrid cloud-local — Kr00ney · 2026-09-05
- Apple vs. NVIDIA: the balance sheet as competitive advantage, B2C then, B2B2B now — BenBajarin · 2026-09-05
- Anima's Accelerated Understanding Bets on a Foundation Model for the Physical World — Latent Space · 2026-09-05
- Dev forks vLLM with custom patch to benchmark 31B model unsupported by flashinfer — abhijithneil · 2026-09-04
- Investor Gavin Baker: AI data centers are 'the best thing' for US working class — GavinSBaker · 2026-09-04
- Kafka, Kafka Connect and Schema Registry exposed as native MCP tools — jkriket · 2026-09-04