With the growing demand for deploying large language models (LLMs) across diverse applications, improving their inference efficiency is crucial for sustainable and democratized access. However, retraining LLMs to meet new user-specific requirements is prohibitively expensive and environmentally unsustainable. In this work, we propose a practical and scalable alternative: composing efficient hybrid language models from existing pre-trained models. Our approach, Zebra-Llama, introduces a family of 1B, 3B, and 8B hybrid models by combining State Space Models (SSMs) and Multi-head Latent Attention (MLA) layers, using a refined initialization and post-training pipeline to efficiently transfer knowledge from pre-trained Transformers. Zebra-Llama achieves Transformer-level accuracy with near-SSM efficiency using only 7-11B training tokens (compared to trillions of tokens required for pre-training) and an 8B teacher. Moreover, Zebra-Llama dramatically reduces KV cache size -down to 3.9%, 2%, and 2.73% of the original for the 1B, 3B, and 8B variants, respectively-while preserving 100%, 100%, and >97% of average zero-shot performance on LM Harness tasks. Compared to models like MambaInLLaMA, X-EcoMLA, Minitron, and Llamba, Zebra-Llama consistently delivers competitive or superior accuracy while using significantly fewer tokens, smaller teachers, and vastly reduced KV cache memory. Notably, Zebra-Llama-8B surpasses Minitron-8B in few-shot accuracy by 7% while using 8x fewer training tokens, over 12x smaller KV cache, and a smaller teacher (8B vs. 15B). It also achieves 2.6x-3.8x higher throughput (tokens/s) than MambaInLlama up to a 32k context length. We will release code and model checkpoints upon acceptance.


翻译:随着在多样化应用中部署大语言模型(LLM)的需求日益增长,提升其推理效率对于实现可持续且普惠的访问至关重要。然而,为满足新的用户特定需求而重新训练LLM成本极其高昂,且在环境上不可持续。在本工作中,我们提出了一种实用且可扩展的替代方案:利用已有的预训练模型组合构建高效的混合语言模型。我们的方法Zebra-Llama通过结合状态空间模型(SSMs)与多头潜在注意力(MLA)层,引入了一个包含1B、3B和8B参数的混合模型系列,并采用精炼的初始化与后训练流程,以高效地从预训练的Transformer模型中迁移知识。Zebra-Llama仅使用7-11B训练词元(相较于预训练所需的万亿级词元)和一个8B教师模型,便达到了Transformer级别的准确度,同时具备接近SSM的效率。此外,Zebra-Llama显著降低了KV缓存大小——其1B、3B和8B变体分别降至原始大小的3.9%、2%和2.73%——同时在LM Harness任务上保持了100%、100%和>97%的平均零样本性能。与MambaInLLaMA、X-EcoMLA、Minitron和Llamba等模型相比,Zebra-Llama在准确度上持续提供具有竞争力或更优的结果,同时使用的训练词元显著更少,教师模型更小,且KV缓存内存大幅降低。值得注意的是,Zebra-Llama-8B在少样本准确度上超越了Minitron-8B达7%,同时使用的训练词元减少了8倍,KV缓存缩小了超过12倍,且教师模型更小(8B vs. 15B)。在高达32k的上下文长度下,其吞吐量(词元/秒)也比MambaInLlama高出2.6倍至3.8倍。我们将在论文被接受后发布代码和模型检查点。

0
下载
关闭预览

相关内容

混合专家模型在大模型微调领域进展
专知会员服务
48+阅读 · 2024年9月23日
Llama-3-SynE:实现有效且高效的大语言模型持续预训练
专知会员服务
36+阅读 · 2024年7月30日
《多模态大型语言模型》最新进展,详述26种现有MM-LLMs
专知会员服务
65+阅读 · 2024年1月25日
一大批中文(BERT等)预训练模型等你认领!
PaperWeekly
15+阅读 · 2019年6月25日
展望:模型驱动的深度学习
人工智能学家
12+阅读 · 2018年1月23日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
2025年大语言模型进展报告
专知会员服务
3+阅读 · 4月25日
多智能体协作机制
专知会员服务
3+阅读 · 4月25日
非对称优势:美海军开发低成本反无人机技术
专知会员服务
6+阅读 · 4月25日
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
6+阅读 · 4月25日
《军事模拟:将军事条令与目标融入AI智能体》
【NTU博士论文】3D人体动作生成
专知会员服务
7+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
14+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
10+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
5+阅读 · 4月24日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员