Continual LLM Upcycling: A Predictor-Gated Bank-Wise Sparsity Training Recipe for Dense-to-Sparse LLMs

TL;DR

Predictor-gated bank-wise sparsity converts dense LLMs into 4× sparse models, improving long-text efficiency.

cs.CL 🔴 Advanced 2026-06-09 20 views
Ruixuan Huang Jinyuan Shi Hantao Huang Yifan Huang Ziyi Guan Hao Zeng Ian En-Hsu Yen Minghui Yu
large language models sparse training continual learning predictor gating hardware acceleration

Key Findings

Methodology

This paper introduces a predictor-gated sparse FFN architecture, where a low-rank predictor generates token-wise routing logits before FFN computation. The model divides channels into banks (each 64 channels), applying a top-k (16 channels) rule per bank to enforce 4× sparsity. During training, the predictor and main model are jointly optimized using hard sparse execution with surrogate gradients, enabling end-to-end learning. The approach is applied to a Qwen2.5-8B backbone, trained initially at 8K context length, then extended to 32K with sparsity introduced late. Experiments show the sparse model closely matches dense performance across benchmarks, outperforming naive activation-magnitude sparsity, especially on long-context tasks. The study also identifies a layer-local long-context failure mode on RULER-CWE, proposing a single-layer repair method that significantly improves long-range performance.

Key Results

  • The predictor-gated sparse model achieves performance within 2% of the dense baseline on tasks like MMLU and KOR-Bench, while maintaining a 4× reduction in active parameters. On long-context tasks such as RULER-CWE, the repaired model improves accuracy by over 20% in the 12K-16K length range, demonstrating robustness in extended contexts.
  • Compared to naive 4× activation-magnitude sparsity (Dense-4x), the proposed method consistently yields closer performance to the dense model, with less degradation across diverse benchmarks. The approach effectively balances efficiency and accuracy, especially in reasoning and long-text scenarios.
  • Training stability is enhanced by predictor optimization within the main path, avoiding MoE-like load imbalance issues. The layer-local repair algorithm effectively mitigates the long-range failure, confirming the importance of local routing control for long-context modeling.

Significance

This work advances the field by integrating dynamic, input-dependent sparsity into continual training, enabling efficient long-text processing without significant performance loss. It paves the way for hardware-friendly large models, reducing inference costs and expanding deployment possibilities in resource-constrained environments. The approach addresses fundamental challenges in long-range dependency modeling, making large-scale language models more practical for real-world applications such as document understanding, dialogue systems, and scientific research. Its compatibility with hardware acceleration techniques signifies a major step toward scalable, efficient AI systems.

Technical Contribution

The core technical innovation lies in the predictor-gated bank-wise routing mechanism, which replaces static or activation-based sparsity with a learned, token-specific path. The low-rank predictor, trained jointly with the main model, dynamically determines which channels to activate, enabling end-to-end optimization. The bank-wise top-k rule ensures hardware efficiency, while the surrogate gradient approach maintains training stability. The layer-local repair algorithm further enhances long-range performance by identifying and correcting specific layer failures. This integrated framework offers a novel paradigm for scalable, hardware-efficient sparse models that retain high accuracy.

Novelty

This study is the first to embed a low-rank predictor within the main training path for dynamic, token-wise channel routing in a bank-wise sparse FFN, avoiding the complexity of full MoE expert pools. Unlike prior methods relying solely on activation magnitude or global routing, this approach optimizes sparse paths during continual training, directly on the main model. The layer-local failure diagnosis and repair strategy for long-context tasks further distinguish this work, providing a practical solution to a persistent challenge in long-range modeling. These innovations collectively enable a new class of hardware-efficient, high-performance sparse LLMs.

Limitations

  • The model's performance degrades at extreme lengths (>16K), especially on complex reasoning tasks, due to residual long-range dependency issues not fully addressed by local repair.
  • Hardware acceleration relies on specialized sparse kernels or dedicated hardware; current GPU simulation cannot fully demonstrate real-world speedups, posing deployment challenges.
  • Dynamic routing introduces training complexity and potential instability, requiring careful hyperparameter tuning and regularization to ensure convergence.

Future Work

Future research will focus on developing dedicated sparse hardware or optimized kernels to realize real inference speedups. Extending the layer-local repair to multiple layers and incorporating adaptive routing strategies could further improve long-range dependency modeling. Additionally, integrating multi-task learning and self-supervised objectives may enhance robustness and generalization. Exploring automatic layer-wise failure detection and repair mechanisms will also be key to scaling this approach to even larger models and more diverse tasks.

AI Executive Summary

The rapid growth of large language models (LLMs) has revolutionized natural language processing, yet their immense size leads to prohibitive computational and storage costs. Traditional dense models require significant resources for inference, especially over long contexts, limiting their practical deployment. To address this, recent efforts have explored sparsity techniques, such as Mixture-of-Experts (MoE), which route tokens to specialized subnetworks, reducing computation. However, MoE introduces complexity in routing and load balancing, complicating training and deployment.

This paper proposes a novel approach: a predictor-gated bank-wise channel sparsity mechanism integrated into the main training process. Starting from a Qwen2.5-8B dense backbone, the authors introduce a lightweight low-rank predictor that generates token-specific routing logits for FFN channels. These logits determine, via a bank-wise top-k rule, which channels remain active—retaining 16 out of 64 channels per bank—achieving a 4× parameter reduction. Unlike post-hoc pruning or activation-magnitude sparsity, this method embeds the sparsity decision within the model's forward pass, enabling end-to-end training and optimization.

The training process involves initially training a dense model at 8K context length, then extending to 32K, where sparsity is gradually introduced. The predictor is trained jointly with the main model, utilizing surrogate gradients to handle the non-differentiable top-k operation. Experimental results demonstrate that the sparse model performs comparably to the dense baseline across multiple benchmarks, including reasoning, code, and long-text tasks. Notably, on the RULER-CWE long-context benchmark, a layer-specific repair algorithm significantly improves performance at extreme lengths, addressing a key failure mode.

This work offers a promising pathway toward hardware-efficient, high-performance language models capable of long-range reasoning. By embedding dynamic, token-dependent sparsity into the core training loop, it reduces inference costs without sacrificing accuracy. The approach also provides insights into long-range dependency challenges, with potential for further enhancements through hardware acceleration and multi-layer repair strategies. Overall, this research marks a significant step toward scalable, resource-efficient large language models suitable for real-world applications.

Deep Analysis

Background

近年来,随着Transformer架构的普及,大规模语言模型(如GPT、BERT、T5)在自然语言处理任务中取得突破性进展。然而,模型参数规模不断扩大带来了巨大的计算和存储压力,限制了其在资源有限设备上的应用。为应对这一挑战,稀疏化技术逐渐成为研究热点,包括Mixture-of-Experts(MoE)、激活值稀疏等方法。MoE模型通过专家池实现条件计算,显著降低推理成本,但引入复杂的路由机制和通信开销。激活值稀疏则试图在推理时动态屏蔽部分通道,提升效率。近年来,Contextual Sparsity(如Dejavu、ShadowLLM、Sirius)强调输入依赖性,进一步推动稀疏技术在推理中的应用。尽管如此,长文本处理中的长距离依赖仍是难点,特别是在模型稀疏化后,如何保证长距离信息的有效传递成为关键难题。

Core Problem

现有稀疏化方法多集中于短文本或静态稀疏策略,难以兼顾长文本的长距离依赖。尤其是在长上下文(>8K)环境下,模型容易出现性能崩溃或局部失效的问题。MoE模型虽能降低计算成本,但在长文本中存在路由不稳定、负载不均衡等问题。激活值稀疏方法在硬件实现上存在瓶颈,难以实现真正的加速。此外,长文本中的局部长上下文失效,导致模型在特定长度区间表现下降,严重影响实际应用效果。这些问题限制了稀疏模型在长文本推理中的推广,亟需一种兼顾性能、效率与硬件友好的新策略。

Innovation

本研究提出一种基于低秩预测器的银行级通道路由机制,将稠密FFN转化为稀疏子路径,核心创新包括:

  • �� 预测门控:在每个层的每个token上,利用低秩预测器生成通道路由logits,实现动态调度。
  • �� 银行内top-k:每64通道划分为一个银行,保留16通道,形成4倍稀疏,兼容硬件加速。
  • �� 连续训练:在主路径中端到端优化稀疏门控,避免MoE中的专家池复杂性。
  • �� 层局部修复:针对长文本中的局部失效,提出单层修复算法,显著改善长距离表现。这些创新使得模型在长文本推理中表现优异,突破了传统稀疏方法的局限。

Methodology

  • �� 以Dense SwiGLU FFN为基础,输入为xl,t ∈ Rd,输出为ydensel,t。
  • �� 引入低秩预测器Pl(x) = Wp,2l Wp,1l x,生成通道路由logits。
  • �� 将通道划分为银行(每银行64通道),利用预测器输出的logits进行top-k(16通道)选择,形成二值掩码。
  • �� 在前向传播中,激活被稀疏掩码筛选,未激活通道输出为零。
  • �� 反向传播时,软梯度代理确保梯度通过top-k边界传递。
  • �� 训练过程中,预测器与主模型共同优化,确保稀疏路径性能与稳定性。
  • �� 在长文本任务中,利用局部修复算法,识别并修复出现性能崩溃的层,提升整体表现。

Experiments

采用Qwen2.5-8B架构,训练数据包括多语种多领域语料,8K和32K上下文长度。稀疏模型在32K阶段引入,训练策略包括:

  • �� 先训练密集模型(8K),再继续长文本训练(32K)。
  • �� 添加预测器作为辅助,预热后引入稀疏门控。
  • �� 采用硬稀疏执行与软梯度结合,确保梯度传递。
  • �� 在多个基准(如MMLU、KOR-Bench、RULER)上评估性能,比较密集、稀疏和激活值稀疏模型。
  • �� 进行层局部修复实验,验证修复算法在长文本中的效果。

Results

稀疏模型在多项任务中性能接近或优于密集模型,尤其在长文本任务中表现出色。例如,在RULER-CWE长文本任务中,修复后性能提升20%以上,性能差异缩小至2%。在推理任务如MMLU、KOR-Bench中,性能下降不超过2%,优于激活值稀疏方法。模型训练过程中,预测门控机制增强了稳定性,避免MoE中的负载不均。长文本中的局部修复算法有效缓解了层局部失效问题,显著提升极长文本的理解能力。

Applications

该方法适用于需要长文本理解的应用场景,如法律、科研、教育等领域的智能问答、内容生成。硬件友好的稀疏结构可在专用稀疏硬件或GPU稀疏核上实现加速,降低部署成本。未来,结合硬件优化,可在边缘设备实现高效长文本处理,推动智能系统的普及。

Limitations & Outlook

模型在极端超长文本(>16K)时仍存在性能下降,局部长上下文失效未完全解决。硬件加速依赖专用硬件,当前GPU模拟未能充分展现潜力。训练过程中稀疏门控的动态调度可能引入训练不稳定性,需进一步优化调度策略。未来需增强长距离依赖能力,提升硬件适配性。

Plain Language Accessible to non-experts

想象你在做一道复杂的菜肴,里面有许多步骤和材料。传统的方法是把所有材料都准备好,然后一次性全部放入锅里,等待全部完成。而现在,这个新方法像是提前用一个小助手帮你挑选出最重要的材料(比如调味料),只用它们来做一部分菜。这个助手会根据你当前的口味偏好,动态决定哪些材料可以省略,哪些必须用。这样一来,你做菜的速度变快了,吃得也更香,菜还保持了原有的味道。这就像模型中的稀疏机制,只处理最重要的部分,节省了时间和资源,又保证了菜的质量。

ELI14 Explained like you're 14

想象你在学校里参加一个超级长的考试,题目很多,时间也很长。以前,你必须每题都认真做,花很多时间。现在,有个聪明的朋友告诉你,只需要专注于最重要的题目,把那些不太重要的题目跳过。这个朋友会根据每题的难度和你的答题情况,动态决定哪些题可以跳过,哪些要认真做。这样,你就能在有限的时间里,答对更多重要的题目,考试成绩也会更好。模型也是一样的,它会根据每个问题的重要性,选择只处理最关键的部分,从而变得更快、更聪明。

Abstract

We study dense-to-sparse continual training as a way to construct channel-sparse large language models from dense checkpoints. Starting from a Qwen2.5-8B dense backbone, we continue training at 32K context and introduce a predictor-gated sparse SwiGLU FFN in the 32K stage. For each token and layer, we use a low-rank predictor to produce FFN-channel routing logits. We then apply a bank-wise top-k rule to retain 16 channels in every 64-channel bank, yielding 4x sparsity in the FFN intermediate activation. Unlike post-hoc sparse inference methods, the routing module is placed on the main language modeling path and optimized during continual training, enabling the dense model to be upcycled into a hardware-oriented sparse model. We report the architecture, training recipe, benchmark performance, and training lessons. We also identify a layer-local long-context failure mode on RULER-CWE and propose a single-layer repair algorithm that substantially improves the affected length range.

cs.CL