将预训练大模型升级为高效长文本处理架构,大幅扩展上下文长度。
Long-Context Aware Upcycling: A New Frontier for Hybrid LLM Scaling

- 通过架构改造与分阶段训练,将现有大模型转为混合长序列结构。
- 上下文长度扩展32倍,显存占用减少90%以上,支持200万词推理。
- 适合需要长文本理解的场景,如法律、科研文档分析。
结合高效Transformer组件与线性序列建模块的混合序列模型是纯Transformer的有前途替代方案,但多数仍需从头预训练,无法复用现有Transformer检查点。本文研究‘升级改造’路径,将预训练Transformer大模型转化为混合架构,在保持短上下文性能的同时提升长上下文能力。提出方法名为HyLo(HYbrid LOng-context):结合架构适配、多头潜在注意力(MLA)、线性模块(Mamba2或Gated DeltaNet),以及分阶段长上下文训练和教师引导蒸馏以实现稳定优化。HyLo通过高效后训练将可用上下文长度扩展至32倍,KV缓存内存减少超90%,在vLLM推理栈中支持高达200万词的prefill和解码,而同类Llama基线在超过64K上下文时即显存不足。在1B与3B规模设置(基于Llama与Qwen)下,HyLo表现出一致优异的短/长上下文性能,显著优于当前最优的升级改造混合基线,在RULER等长上下文评估中表现突出。值得注意的是,仅用100亿词训练的HyLo-Qwen-1.7B,在相同规模下超越使用4000亿词训练的JetNemotron,在GSM8K、Lm-Harness常识推理及RULER-64K任务上表现更优。
原文摘要 · Abstract (English)
Hybrid sequence models that combine efficient Transformer components with linear sequence modeling blocks are a promising alternative to pure Transformers, but most are still pretrained from scratch and therefore fail to reuse existing Transformer checkpoints. We study upcycling as a practical path to convert pretrained Transformer LLMs into hybrid architectures while preserving short-context quality and improving long-context capability. We call our solution \emph{HyLo} (HYbrid LOng-context): a long-context upcycling recipe that combines architectural adaptation with efficient Transformer blocks, Multi-Head Latent Attention (MLA), and linear blocks (Mamba2 or Gated DeltaNet), together with staged long-context training and teacher-guided distillation for stable optimization. HyLo extends usable context length by up to $32\times$ through efficient post-training and reduces KV-cache memory by more than $90\%$, enabling up to 2M-token prefill and decoding in our \texttt{vLLM} inference stack, while comparable Llama baselines run out of memory beyond 64K context. Across 1B- and 3B-scale settings (Llama- and Qwen-based variants), HyLo delivers consistently strong short- and long-context performance and significantly outperforms state-of-the-art upcycled hybrid baselines on long-context evaluations such as RULER. Notably, at similar scale, HyLo-Qwen-1.7B trained on only 10B tokens significantly outperforms JetNemotron (trained on 400B tokens) on GSM8K, Lm-Harness common sense reasoning and RULER-64K.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。