EntMTP: Accelerating LLM Inference with Entropy Guided Multi Token Prediction
EntMTP is a training-free scheduler that dynamically adjusts multi-token prediction depth based on local generation entropy to maximize inference throughput while maintaining output quality, achieving up to a 1.36x speedup over existing baselines.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to write a story, but you have a very strict rule: you can only write one word at a time, and after every single word, you have to stop, double-check your entire life's work to make sure that word is perfect, and then move on. This is how current Large Language Models (LLMs) usually work. It's incredibly accurate, but it's also painfully slow because you're constantly stopping to check your work.
To speed this up, researchers invented a trick called Multi-Token Prediction (MTP). Instead of writing one word and checking, the model tries to guess the next three or four words all at once, like a draft. Then, it does one big "check" to see how many of those guesses were right. If it guessed three words correctly, it saves a lot of time.
However, the paper EntMTP points out a flaw in how this trick is currently used.
The Problem: The "One-Size-Fits-All" Mistake
Currently, models use a static strategy. Imagine you are driving a car. The current method says: "No matter if you are driving on a smooth highway or a bumpy dirt road, you must always keep your foot on the gas pedal at the exact same speed and look exactly 100 feet ahead."
- On a smooth highway (low entropy): The road is predictable. You could safely look 100 feet ahead and guess the next few turns perfectly.
- On a bumpy dirt road (high entropy): The road is chaotic. Looking 100 feet ahead is a waste of time because you might hit a pothole or a deer. You should only look a few feet ahead and drive cautiously.
Existing models (like Hydra and Medusa) pick one "look-ahead distance" (a specific tree shape) before they start and stick with it forever. This is inefficient. Sometimes they guess too far ahead and waste energy; other times they guess too little and miss a chance to speed up.
The Solution: EntMTP (The Smart Co-Pilot)
The authors propose EntMTP (Entropy-guided Multi-Token Prediction). Think of this as a smart co-pilot that constantly checks the road conditions and tells the driver how far to look ahead.
Reading the "Entropy" (The Road Conditions):
The model constantly measures how "surprising" the next words are.- Low Entropy (Predictable): The text is flowing smoothly (e.g., "The sun rises in the..."). The co-pilot says, "Easy! Let's guess the next 4 words!"
- High Entropy (Chaotic): The text is tricky or complex (e.g., a difficult math problem or a sudden plot twist). The co-pilot says, "Whoa, this is risky. Let's only guess the next 1 word to be safe."
The "Tree Bank" (The Toolkit):
Before the model even starts writing, the researchers prepare a small "bank" of different guessing strategies (trees). Some are big and aggressive (guessing many words), and some are small and conservative (guessing few words).- Crucially, they don't just pick one. They create a menu of the best options for different situations.
The Switch (The Gear Shift):
During the writing process, EntMTP acts like a gear shifter.- If the text is easy, it shifts into High Gear (the big tree) to zoom ahead.
- If the text gets hard, it instantly shifts into Low Gear (the small tree) to avoid crashing.
- The Magic: Switching gears takes almost zero time. It's just a quick pointer swap in the computer's memory, not a heavy rebuild.
The Results: Faster Without Losing Quality
The paper tested this new "Smart Co-Pilot" on three very different types of tasks:
- Coding (HumanEval): Writing computer programs.
- Math (GSM8K): Solving grade-school math problems.
- Chatting (ShareGPT): Having a conversation.
The Outcome:
- Speed: EntMTP was consistently 9% to 15% faster than the previous best methods (Hydra). In some cases, it was 36% faster than older methods.
- Quality: Because the model still checks its work perfectly, the quality of the writing didn't drop at all. It's like driving faster but arriving at the exact same destination with the same safety.
- Efficiency: It achieved this speedup not by making the computer stronger, but by making the computer smarter about when to guess far ahead and when to be careful.
The Bottom Line
Think of the old way as a runner who sprints at full speed for 100 meters, stops to tie their shoe, sprints 100 meters, stops again, regardless of whether the track is flat or full of hurdles.
EntMTP is the runner who looks at the track. If it's flat, they sprint hard. If they see a hurdle coming, they slow down just enough to step over it safely, then immediately sprint again. This allows them to finish the race much faster without tripping.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.