tencent/HiLS-Attention-7B · Hugging Face
Summary
Tencent releases HiLS-Attention-7B, a 7B parameter model using a novel chunk-wise sparse attention mechanism that learns chunk selection end-to-end, enabling efficient long-context modeling and strong extrapolation beyond 4x training length.
View Cached Full Text
Cached at: 07/10/26, 04:21 PM
tencent/HiLS-Attention-7B · Hugging Face
Source: https://huggingface.co/tencent/HiLS-Attention-7B
HiLS-Attentionis a chunk-wise sparse attention mechanism that learns chunk selection end-to-end under the language-modeling loss, enabling native sparse training for efficient long-context modeling. This repository hosts the7Bcheckpoint continued-trained on top of an OLMo3-style backbone.
Model introduced in the paperHierarchical Sparse Attention Done Right: Toward Infinite Context Modeling.
https://huggingface.co/tencent/HiLS-Attention-7B#model-descriptionModel Description
Naive block sparse attention selects top-k chunks by their exact chunk mass, but computing all chunk masses requires full QK computation. HiLS-Attention instead usescompressed chunk keysto estimate a chunk-mass surrogate andfactorizes attention into inter-chunk and intra-chunk softmax, enabling end-to-end learning from the next-token prediction loss.
Overview of HiLS-Attention. Naive block sparse attention selects top-k chunks by their exact chunk mass, but computing all chunk masses requires full QK computation. HiLS-Attention instead uses compressed chunk keys to estimate a chunk-mass surrogate and factorizes attention into inter-chunk and intra-chunk softmax, enabling end-to-end learning from the next-token prediction loss.
- Parameters:~7B
- **Base architecture:**OLMo3-7B
- Paper:https://arxiv.org/abs/2607.02980
- Code:https://github.com/Tencent-Hunyuan/HiLS-Attention
https://huggingface.co/tencent/HiLS-Attention-7B#highlightsHighlights
After only50B continued-training tokens, HiLS-Attention inherits the capability of full attention while bringing two key advantages:
- Strong ultra-long context extrapolationbeyond the YaRN-extended 4× length.
- Faster inferencefor long sequences.
Meanwhile, it preserves comparable performance for short- and medium-context tasks, within both the original training length and the YaRN-extrapolated range.

After only 50B continued-training tokens, HiLS-Attention inherits the capability of full attention while bringing two key advantages:strong ultra-long context extrapolationbeyond the YaRN-extended 4× length (a) andfaster inference(b). Meanwhile, it preserves comparable performance for short- and medium-context tasks, within both the original training length and the YaRN-extrapolated range (c & d).
https://huggingface.co/tencent/HiLS-Attention-7B#intended-usesIntended Uses
- Long-context language modeling and inference (retrieval, QA, summarization over long documents).
- Research on native sparse-attention training and long-context extrapolation.
https://huggingface.co/tencent/HiLS-Attention-7B#out-of-scopeOut-of-Scope
Not aligned/instruction-tuned for safety-critical deployment. Outputs may be inaccurate or biased; validate before production use.
https://huggingface.co/tencent/HiLS-Attention-7B#how-to-useHow to Use
HiLS-Attention cannot be loaded directly via the standardtransformers``AutoModelAPI — the custom hierarchical sparse attention must be registered through theHiLS-Attentioncodebase. Please set up the environment and run the model following theGitHub repository, in particular theEvaluationsection (seeeval/andscripts/eval/), which shows how to load the checkpoint with the corresponding HiLS config and run generation / evaluation.
For efficient long-context serving, SGLang inference support is on the roadmap — see theGitHub repofor updates.
https://huggingface.co/tencent/HiLS-Attention-7B#evaluationEvaluation
The model is evaluated across short-, medium-, and long-context benchmarks. Full scripts are available in theGitHub repository.
https://huggingface.co/tencent/HiLS-Attention-7B#long-contextLong-context
BenchmarkDescriptionLongBench v1Long-context QA (21 tasks, up to 64K input)RULERSynthetic probing at 8K / 16K / 32K / 128KPPLPerplexity across 64 … 256K sequence lengths
https://huggingface.co/tencent/HiLS-Attention-7B#short-context-opencompass-11-benchmarksShort-context (OpenCompass, 11 benchmarks)
BenchmarkTypeMMLU, GPQA, HellaSwag, ARC-c, BoolQ, RACEFew-shot PPLGSM8K, CMathMath generation (CoT)HumanEval+, MBPP+, CRUXEval-OCode generation
https://huggingface.co/tencent/HiLS-Attention-7B#trainingTraining
- **Method:**Continued pre-training with native sparse-attention (HiLS-Attention) on top of an OLMo3-7B backbone.
- Tokens:~50B continued-training tokens.
- **Positional encoding / long-context:**HoPE with YaRN-based length extrapolation.
Training and continue-pre-training scripts are documented in theGitHub repository.
https://huggingface.co/tencent/HiLS-Attention-7B#limitations-and-biasLimitations and Bias
This is a pretrained base model without alignment or safety tuning. It may reflect biases present in the training corpus and can produce inaccurate or unsafe content. Users are responsible for evaluating suitability for their use case.
https://huggingface.co/tencent/HiLS-Attention-7B#citationCitation
@misc{hu2026hierarchicalsparseattentionright,
title={Hierarchical Sparse Attention Done Right: Toward Infinite Context Modeling},
author={Xiang Hu and Xinyu Wei and Hao Gu and Minshen Zhang and Tian Liang and Huayang Li and Lei Zhu and Yan Wang and Sirui Han and Yushi Bai and Kewei Tu and Haitao Mi and Leo Liang},
year={2026},
eprint={2607.02980},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2607.02980},
}
Similar Articles
Hierarchical Sparse Attention Done Right: Toward Infinite Context Modeling
Introduces HiLS Attention, a chunk-wise sparse attention mechanism for LLMs that learns chunk selection end-to-end via LM loss, achieving performance comparable to full attention while enabling ultra-long-context extrapolation and faster inference.
@eliebakouch: the new sparse attention method introduced with this model is basically a combination of components from existing ones.…
Meituan introduces LongCat-2.0, a 1.6T parameter MoE model with 48B active parameters and 1M context length, featuring a new LongCat Sparse Attention (LSA) method that combines components from existing sparse attention techniques.
@NousResearch: Today we release Lighthouse Attention, a selection-based hierarchical attention for long-context pre-training that deli…
NousResearch releases Lighthouse Attention, a selection-based hierarchical attention that achieves 1.4-1.7x wall-clock speedup at 98K context and ~17x faster forward/backward pass than standard attention at 512K context on a single B200, validated on 530M-parameter Llama-3 models across 50B tokens.
Lighthouse Attention (11 minute read)
Lighthouse Attention is a selection-based hierarchical attention mechanism that accelerates long-context pretraining by running forward+backward passes ~17× faster at 512K context and delivering 1.4–1.7× end-to-end speedup at 98K context, validated with Llama-3 530M on 50B tokens.
MiniMax Sparse Attention
MiniMax Sparse Attention introduces a blockwise sparse attention mechanism that achieves significant speedups for ultra-long-context LLMs, reducing per-token attention compute by 28.4x at 1M context with wall-clock speedups of 14.2x for prefill and 7.6x for decoding on H800 GPUs. The method is accompanied by an open-source inference kernel and a publicly released multimodal model.
