用混合模型提升大模型推理效率,150亿参数下速度翻倍。
Apriel-H1: Towards Efficient Enterprise Reasoning Models
- 将Transformer注意力层逐步替换为线性SSM模块,构建混合架构。
- 在保持推理能力的前提下,推理吞吐量提升2倍以上。
- 适合高并发场景、长文本推理及生产环境部署的高效模型。
大型语言模型依赖Transformer结构实现强大推理能力,但其注意力机制存在二次时间与内存复杂度,且推理时需缓存键值状态,严重限制吞吐量与可扩展性。状态空间模型(SSM)如Mamba通过固定大小隐藏状态的递归计算,实现线性推理复杂度和恒定内存占用,是可行替代方案。本文提出Apriel-H1系列混合模型,在150亿参数规模下结合Transformer注意力与SSM序列混合器,通过从预训练推理模型Apriel-Nemotron-15B-Thinker逐步蒸馏,将非关键注意力层替换为线性Mamba模块。释放多个不同SSM与MHA比例的Apriel-H1-15B-Thinker变体,并分析随着更多Mamba层替换带来的推理性能下降趋势。此外,发布30/50混合变体,经推理轨迹监督微调后,在生产级vLLM环境中推理吞吐量提升超2倍,推理性能损失极小。结果表明,蒸馏后的混合SSM-Transformer架构可在不显著牺牲推理质量的前提下,带来显著效率提升。
原文摘要 · Abstract (English)
Large Language Models (LLMs) achieve remarkable reasoning capabilities through transformer architectures with attention mechanisms. However, transformers suffer from quadratic time and memory complexity in the attention module (MHA) and require caching key-value states during inference, which severely limits throughput and scalability. High inference throughput is critical for agentic tasks, long-context reasoning, efficient deployment under high request loads, and more efficient test-time compute scaling. State Space Models (SSMs) such as Mamba offer a promising alternative with linear inference complexity and a constant memory footprint via recurrent computation with fixed-size hidden states. In this technical report we introduce the Apriel-H1 family of hybrid LLMs that combine transformer attention and SSM sequence mixers for efficient reasoning at 15B model size. These models are obtained through incremental distillation from a pretrained reasoning transformer, Apriel-Nemotron-15B-Thinker, progressively replacing less critical attention layers with linear Mamba blocks. We release multiple post-distillation variants of Apriel-H1-15B-Thinker with different SSM-to-MHA ratios and analyse how reasoning performance degrades as more Mamba layers replace MHA. Additionally, we release a 30/50 hybrid variant of Apriel-H1, further fine-tuned on a supervised dataset of reasoning traces, achieving over 2x higher inference throughput when deployed in the production-ready vLLM environment, with minimal degradation in reasoning performance. This shows that distilled hybrid SSM-Transformer architectures can deliver substantial efficiency gains over the pretrained transformer equivalent without substantially compromising the reasoning quality.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。