How to double tokens per second for Llama 3 with Medusa
Aug 20, 2024

Summary
Introduces and demonstrates the use of Medusa, a speculative sampling technique that grafts additional decoding heads onto an LLM to generate multiple draft tokens per forward pass. This technique addresses the memory-bound bottleneck in autoregressive LLM inference by leveraging idle compute resources to increase tokens per second. The post details training Medusa heads for Llama 3 8B, validating output quality with MMLU benchmarks, and deploying the optimized model with TensorRT-LLM. Benchmarks show a 94%-122% increase in tokens per second compared to a baseline deployment.
More from the Baseten AI Model Deployment and Serving Platform trail
- LangChain trains custom models for LangSmith Engine with Baseten Loops
- DeepSeek-V4.1-Flash: more efficient prefill for coding agents
- Blaxel is joining Baseten to build the future of agentic infrastructure
- How Baseten makes pyannote’s diarization models 9.6x faster
- Optimizing delta weight syncs for managed rollouts