Get the latest tech news

Look Ma, No Bubbles: Designing a Low-Latency Megakernel for Llama-1B


27, 2025 · 13 min read Look Ma, No Bubbles! Designing a Low-Latency Megakernel for Llama-1B Benjamin Spector*, Jordan Juravsky*, Stuart Sul, Owen Dugan, Dylan Lim, Dan Fu, Simran Arora, Chris Ré There are some applications that benefit from running LLMs really, really fast. This low-latency regime encompasses applications like chatbots and human-in-the-loop workflows, where users care a lot about seeing responses come back immediately.

The root of the problem, which we'll describe more below, is that existing systems break down a model forward pass into around a hundred separate kernels that each implement a few operations (e.g. RMS norm, attention, an MLP layer + activation, rotary). Second, we'll describe three important points about how we built our megakernel: how we fused lots of kernels together, how we share hardware resources across them to minimize overhead, and how we synchronize them efficiently. As we described earlier, decoding a single sequence with Llama-1B is a purely memory-bound workload: our performance depends on being able to always be loading weights from GPU global memory.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Bubbles

Bubbles

Photo of latency megakernel

latency megakernel

Photo of llama-1b

llama-1b

Related news:

News photo

Show HN: Bubbles, a vanilla JavaScript web game

News photo

Making Bubbles