arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.10964cs.LG
收藏

并非所有比特都同等重要:面向推理模型的规模依赖型内存优化策略

Not All Bits Are Equal: Scale-Dependent Memory Optimization Strategies for Reasoning Models

KRAFTON;University of Wisconsin–Madison(威斯康星大学麦迪逊分校);UC Berkeley(加州大学伯克利分校);Microsoft Research(微软研究院)

Junhyuck Kim, Ethan Ewer, Taehong Moon, Jongho Park, Dimitris Papailiopoulos

AI总结:

针对推理模型中KV cache主导内存的问题,通过1700个推理场景实验发现内存优化存在规模依赖权衡:小于8-bit 4B的小模型应优先增加权重,大模型应优先延长生成,表明推理模型部署需采用与非推理模型根本不同的内存优化策略。

摘要:

虽然4-bit量化已成为非推理模型和零样本任务在各种规模下的内存最优选择,但我们表明,这种通用方案对推理模型是失效的,在推理模型中,KV cache而非模型大小会主导内存使用。通过在AIME25和GPQA-Diamond上的1,700个推理场景中进行系统实验,我们发现了一种规模依赖型的权衡:有效规模低于8-bit 4B参数的模型,通过将内存分配给更多权重而非更长的生成过程,能获得更好的准确率;而较大的模型则通过将内存分配给更长的生成过程来获得更好的准确率。这一规模阈值也决定了并行扩展何时变得内存高效,以及KV cache驱逐是否优于KV量化。我们的研究结果表明,LLM的内存优化不能忽略规模差异,并提供了原则性指南:对于小型推理模型,应优先考虑模型容量而非测试时计算;对于大型模型,则应最大化测试时计算。我们的结果意味着,优化部署推理模型需要与已确立的非推理模型策略根本不同的策略。

英文摘要:

While 4-bit quantization has emerged as a memory-optimal choice for non-reasoning models and zero-shot tasks across scales, we show that this universal prescription fails for reasoning models, where the KV cache rather than model size can dominate memory. Through systematic experiments across 1,700 inference scenarios on AIME25 and GPQA-Diamond, we find a scale-dependent trade-off: models with an effective size below 8-bit 4B parameters achieve better accuracy by allocating memory to more weights rather than longer generation, while larger models achieve better accuracy by allocating memory to longer generations. This scale threshold also determines when parallel scaling becomes memory-efficient and whether KV cache eviction outperforms KV quantization. Our findings show that memory optimization for LLMs cannot be scale-agnostic, while providing principled guidelines: for small reasoning models, prioritize model capacity over test-time compute, while for larger ones, maximize test-time compute. Our results suggest that optimizing reasoning models for deployment requires fundamentally different strategies from those established for non-reasoning models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑