Gemma 4 多 Token 推测解码加速推理
推荐指数 75.0 NO. 013 · 2026.05.06
发布2026/05/05Score197Comments74
为什么值得看
Google 在 Gemma 4 中引入多 Token 预测草稿模型(MTP drafters),通过一次推测多个后续 Token 并经目标模型验证,减少解码步数。实测在消费级 GPU 上推理速度提升最高达 2.3 倍,且无需量化或蒸馏即可部署。
媒体预览
编辑判断
推测解码(Speculative Decoding)之前的主流实现是单 Token 草稿+验证,比如 vLLM 的 Medusa 和 Lookahead Decoding,但草稿接受率一掉速度就崩。Google 这次把 MTP drafters 做到 Gemma 4 原生架构里,关键是草稿模型和目标模型共享 KV cache 设计,显存占用没翻倍。
对做推理优化的团队来说,这意味着不用自己魔改模型结构就能拿到接近 Medusa 的收益。已经在用 vLLM 或 SGLang 做服务的,需要关注它们什么时候合入这个特性——Google 放出了兼容 HF Transformers 的参考实现,但生产环境大概率要等框架适配。
一个值得测的边界场景:长文本生成(>4k tokens)时 MTP 的接受率衰减曲线,这决定了它能不能替代现有的并行解码方案。
社区反馈
意见分歧 74 条评论
核心争论:Gemma 4 的 MTP 加速实际落地困难,社区更关注何时能在主流工具链可用
I find it puzzling Google doesn’t actively promote its own cloud for inference of Gemma 4. Open source is great, love it. But shouldn’t Google want me to be able to use and pay for it through Gemini and vertex?
I wonder if for a model that small with a permissive license it might not be worth their time to host a commercial grade inference stack? Might be easier to chuck it over the fence and let other providers handle it as it'll run in almost any commercial grade card? Also speculating, but I wonder if i
i dont know what are you talking about, i replaced an older gpt4o with a finetuned qwen. there is a huge amount of "AI, that can be done with those models, or partly by those models." Huge amount of people would not notice the difference. And if you prepare the context correctly, even bigger slice o