paper-with-me

홈 › Papers

InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptation

2025-09-29 · Weilin Zhao, Zihan Zhou, Zhou Su, Chaojun Xiao, Yuxuan Li, Yanghao Li, Yudi Zhang, Weilun Zhao, Zhen Li, Yuxiang Huang, Ao Sun, Xu Han, Zhiyuan Liu arxiv

Long-sequence processing is a critical capability for modern large language models. However, the self-attention mechanism in the standard Transformer architecture faces severe computational and memory bottlenecks when processing long sequences. While trainable sparse attention methods offer a promising solution, existing approaches such as NSA introduce excessive extra parameters and disrupt the conventional \textit{pretrain-on-short, finetune-on-long} workflow, resulting in slow convergence and difficulty in acceleration. To overcome these limitations, we introduce dense-sparse switchable attention framework, termed as InfLLM-V2. InfLLM-V2 is a trainable sparse attention that seamlessly adapts models from short to long sequences. Specifically, InfLLM-V2 reuses dense attention parameters through parameter-free architecture modification, maintaining consistency between short and long sequence processing. Additionally, InfLLM-V2 ensures computational efficiency across all sequence lengths, by using dense attention for short inputs and smoothly transitioning to sparse attention for long sequences. To achieve practical acceleration, we further introduce an efficient implementation of InfLLM-V2 that significantly reduces the computational overhead. Our experiments on long-context understanding and chain-of-thought reasoning demonstrate that InfLLM-V2 is 4$\times$ faster than dense attention while retaining 98.1% and 99.7% of the performance, respectively. Based on the InfLLM-V2 framework, we have trained and open-sourced MiniCPM4.1 (https://huggingface.co/openbmb/MiniCPM4.1-8B), a hybrid reasoning model, providing a reproducible implementation for the research community.

📄 PDF Abstract BibTeX arXiv:2509.24663

Code (0)

등록된 구현이 없습니다.

Tasks

Long-Context UnderstandingComputational Efficiency

Similar Papers 제목 키워드 기반

DashAttention: Differentiable and Adaptive Sparse Hierarchical Attention

2026-05-18 · Yuxiang Huang, Nuno M. T. Gonçalves, Federico Alvetreti, Lei Li 외 arxiv

Current hierarchical attention methods, such as NSA and InfLLMv2, select the top-k relevant key-value (KV) blocks based on coarse attention scores and subsequently apply fine-grained softmax attention on the selected tok…

Punctuation-aware Hybrid Trainable Sparse Attention for Large Language Models

2026-01-06 · Junxiang Qiu, Shuo Wang, Zhengsu Chen, Hengheng Zhang 외 arxiv

Attention serves as the fundamental mechanism for long-context modeling in large language models (LLMs), yet dense attention becomes structurally prohibitive for long sequences due to its quadratic complexity. Consequent…

InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory

2024-02-07 · Chaojun Xiao, Pengle Zhang, Xu Han, Guangxuan Xiao 외

Large language models (LLMs) have emerged as a cornerstone in real-world applications with lengthy streaming inputs (e.g., LLM-driven agents). However, existing LLMs, pre-trained on sequences with a restricted maximum le…

Scale-Invariant Object Detection by Adaptive Convolution with Unified Global-Local Context

2024-09-17 · Amrita Singh, Snehasis Mukherjee

Dense features are important for detecting minute objects in images. Unfortunately, despite the remarkable efficacy of the CNN models in multi-scale object detection, CNN models often fail to detect smaller objects in im…

object-detectionObject Detection

NOSA: Native and Offloadable Sparse Attention

2025-10-15 · Yuxiang Huang, Pengjie Wang, Jicheng Han, Weilin Zhao 외 arxiv

Decoding throughput improvements from larger inference batches are limited by GPU memory, which is largely consumed by the key-value (KV) cache. Prior training-free KV cache offloading alleviates this by keeping redundan…