Unlocking asynchronicity in continuous batching
AI-generated summary of reporting by Huggingface Blog. Read the original for the full story.
Why it matters
Making the CPU and GPU run in parallel during LLM batched inference can cut generation time by up to 24% at no extra hardware cost.
Hugging Face explains how to speed up running many AI text-generation requests at once. Normally the computer's main processor and the graphics chip (the chip doing the AI math) take turns working, leaving the graphics chip idle nearly a quarter of the time. By letting both work simultaneously, generating 8,000 tokens with a 32-request batch drops from 300.6 to about 228 seconds. This is built into the popular open-source transformers library.
An idle H200 GPU costs roughly $5 an hour whether it's computing or waiting, and Hugging Face measured that standard continuous batching leaves the GPU idle for 24% of generation time, 72 of 300.6 seconds when producing 8K tokens with a batch of 32 on an 8B model. Asynchronous batching, now implemented in the transformers library, eliminates that waste through software alone. Teams serving LLMs on expensive GPUs get roughly a quarter more throughput without new kernels or model changes.
Synchronous continuous batching serializes CPU batch preparation and GPU forward passes; profiling 8K-token generation at batch size 32 with an 8B model showed 24.0% GPU idle time. The fix uses three CUDA streams (H2D, compute, D2H) plus CUDA events (record/wait) to enforce ordering without CPU blocking, keeping only one final CPU synchronization per step. It also requires double-buffered device inputs to avoid data corruption. The implementation ships in the transformers library.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.
Frame generation on NVIDIA cards: DLSS on RTX 40/50, FSR 3 elsewhere
Enabling frame generation on non-RTX 40/50 GPUs lets gamers run console-build games at higher frame rates without buying new hardware.
Taking Trainium3 to the Track: Generating Videos with LTX-2.5
Video generation on AWS Trainium3 can now rival Lightricks' paid API in speed, giving teams a non-CUDA inference option, though only after heavy custom patching.
The Download: Better bionic hands and AI’s natural-gas boom
This newsletter roundup mostly relays other outlets' reporting; its two own stories flag sensory-linked prosthetics reaching home use and AI data centers locking the US grid into natural gas.
Introducing the llama.cpp benchmark dashboard for AMD Ryzen and Radeon
AMD developers running llama.cpp locally on Ryzen/Radeon GPUs can now compare prompt-processing and token-generation speeds across builds, models and quantizations on a public dashboard.