Temperature-zero BF16 LLM inference is often treated as reproducible, yet the same request can emit different tokens when decoded alone or inside a larger batch. Existing fixes use batch-invariant operators or LLM-42's per-token verification, incurring cost even when most steps are stable. We ask whether verification can be applied exclusively to flipped tokens. Across five models, batch-induced token flips are sparse on the flip-rate benchmarks: on MATH500, Llama-3.1-8B flips on $0.48\%$ of synchronous decode steps, and all tested models stay within the 0.3-1.3% range on MATH500, GSM8K, and HumanEval. K/V perturbations remain flat before flips, while low top-1/top-2 logit margins expose much of the flip risk. MarginGate turns these observations into a verifier policy: it keeps BF16 decoding on high-margin steps, verifies only low-margin steps, and repairs confirmed mismatches by replacing the current K/V column. We evaluate on four datasets, calibrating on MATH500 and transferring to GSM8K, SharedGPT, and HumanEval. MarginGate restores 100% sequence-level deterministic decoding on Llama-3.1-8B and Qwen2.5-14B with 18.56%/15.05% verifier trigger rates, reducing LLM-42's latency increment by 2.23x/1.99x relative to always-on verification. On DSR1-Distill-Qwen-7B, the same policy reaches determinism in a harder regime at 49.50% triggers.


翻译:零温度BF16大语言模型推理通常被认为是可重现的,但同一请求在单独解码与批量解码时可能输出不同词元。现有修正方案采用批量不变算子或LLM-42的逐词元验证机制,即使多数解码步骤稳定仍产生开销。我们提出疑问:验证能否仅应用于翻转词元?在五个模型上,批量引发的词元翻转在翻转率基准测试中呈现稀疏性:在MATH500数据集上,Llama-3.1-8B在同步解码步骤中的翻转率为0.48%,所有测试模型在MATH500、GSM8K和HumanEval上的翻转率均维持在0.3-1.3%范围内。词元翻转前K/V扰动保持平稳,而低top-1/top-2 logit边际暴露了大部分翻转风险。MarginGate将这些观察转化为验证策略:对高边际步骤保持BF16解码,仅验证低边际步骤,并通过替换当前K/V列修复已确认的不匹配。我们在四个数据集上进行评估,以MATH500校准并迁移至GSM8K、SharedGPT和HumanEval。MarginGate在验证触发率为18.56%/15.05%的条件下,使Llama-3.1-8B和Qwen2.5-14B实现100%的序列级确定性解码,相比始终开启的验证方案,将LLM-42的延迟增幅降低了2.23倍/1.99倍。在DSR1-Distill-Qwen-7B上,同一策略在49.50%触发率下实现了更严苛场景中的确定性解码。

0
下载
关闭预览

相关内容

面向大型语言模型推理的可信研究综述
专知会员服务
22+阅读 · 2025年9月6日
Llama-3-SynE:实现有效且高效的大语言模型持续预训练
专知会员服务
36+阅读 · 2024年7月30日
绝对干货!NLP预训练模型:从transformer到albert
新智元
14+阅读 · 2019年11月10日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
俄乌无人机战争的六大启示
专知会员服务
10+阅读 · 8月3日
《无人机空中监控:通信实验洞察》
专知会员服务
8+阅读 · 8月3日
从采集到决策:美军视角下的战术情报范式重构
《履带式无人地面战车技术发展现状》
专知会员服务
8+阅读 · 8月2日
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
10+阅读 · 8月1日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员