tencent / HiLS-Attention-7B

huggingface.co
Total runs: 570
24-hour runs: 0
7-day runs: 21
30-day runs: 206
Model's Last Updated: July 27 2026
text-generation

Introduction of HiLS-Attention-7B

Model Details of HiLS-Attention-7B

HiLS-Attention-7B

arXiv GitHub Hugging Face

HiLS-Attention is 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 the 7B checkpoint continued-trained on top of an OLMo3-style backbone.

Model introduced in the paper Hierarchical Sparse Attention Done Right: Toward Infinite Context Modeling .

Model 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 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.

HiLS-Attention Overview

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.

Highlights

After only 50B continued-training tokens , HiLS-Attention inherits the capability of full attention while bringing two key advantages:

  • Strong ultra-long context extrapolation beyond the YaRN-extended 4× length.
  • Faster inference for long sequences.

Meanwhile, it preserves comparable performance for short- and medium-context tasks, within both the original training length and the YaRN-extrapolated range.

HiLS-Attention Performance

After only 50B continued-training tokens, HiLS-Attention inherits the capability of full attention while bringing two key advantages: strong ultra-long context extrapolation beyond the YaRN-extended 4× length (a) and faster 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).

Intended Uses
  • Long-context language modeling and inference (retrieval, QA, summarization over long documents).
  • Research on native sparse-attention training and long-context extrapolation.
Out-of-Scope

Not aligned/instruction-tuned for safety-critical deployment. Outputs may be inaccurate or biased; validate before production use.

How to Use

HiLS-Attention cannot be loaded directly via the standard transformers AutoModel API — the custom hierarchical sparse attention must be registered through the HiLS-Attention codebase. Please set up the environment and run the model following the GitHub repository , in particular the Evaluation section (see eval/ and scripts/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 the GitHub repo for updates.

Evaluation

The model is evaluated across short-, medium-, and long-context benchmarks. Full scripts are available in the GitHub repository .

Long-context
Benchmark Description
LongBench v1 Long-context QA (21 tasks, up to 64K input)
RULER Synthetic probing at 8K / 16K / 32K / 128K
PPL Perplexity across 64 … 256K sequence lengths
Short-context (OpenCompass, 11 benchmarks)
Benchmark Type
MMLU, GPQA, HellaSwag, ARC-c, BoolQ, RACE Few-shot PPL
GSM8K, CMath Math generation (CoT)
HumanEval+, MBPP+, CRUXEval-O Code generation
Training
  • 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 the GitHub repository .

Limitations 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.

Citation
@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},
}

Runs of tencent HiLS-Attention-7B on huggingface.co

570
Total runs
0
24-hour runs
19
3-day runs
21
7-day runs
206
30-day runs

More Information About HiLS-Attention-7B huggingface.co Model

More HiLS-Attention-7B license Visit here:

https://choosealicense.com/licenses/apache-2.0

HiLS-Attention-7B huggingface.co

HiLS-Attention-7B huggingface.co is an AI model on huggingface.co that provides HiLS-Attention-7B's model effect (), which can be used instantly with this tencent HiLS-Attention-7B model. huggingface.co supports a free trial of the HiLS-Attention-7B model, and also provides paid use of the HiLS-Attention-7B. Support call HiLS-Attention-7B model through api, including Node.js, Python, http.

HiLS-Attention-7B huggingface.co Url

https://huggingface.co/tencent/HiLS-Attention-7B

tencent HiLS-Attention-7B online free

HiLS-Attention-7B huggingface.co is an online trial and call api platform, which integrates HiLS-Attention-7B's modeling effects, including api services, and provides a free online trial of HiLS-Attention-7B, you can try HiLS-Attention-7B online for free by clicking the link below.

tencent HiLS-Attention-7B online free url in huggingface.co:

https://huggingface.co/tencent/HiLS-Attention-7B

HiLS-Attention-7B install

HiLS-Attention-7B is an open source model from GitHub that offers a free installation service, and any user can find HiLS-Attention-7B on GitHub to install. At the same time, huggingface.co provides the effect of HiLS-Attention-7B install, users can directly use HiLS-Attention-7B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

HiLS-Attention-7B install url in huggingface.co:

https://huggingface.co/tencent/HiLS-Attention-7B

Url of HiLS-Attention-7B

HiLS-Attention-7B huggingface.co Url

Provider of HiLS-Attention-7B huggingface.co

tencent
ORGANIZATIONS

Other API from tencent

huggingface.co

Total runs: 766.2K
Run Growth: 65.2K
Growth Rate: 8.78%
Updated:August 29 2026
huggingface.co

Total runs: 113.2K
Run Growth: 11.7K
Growth Rate: 10.47%
Updated:October 17 2025
huggingface.co

Total runs: 90.7K
Run Growth: -582.4K
Growth Rate: -642.43%
Updated:September 12 2025
huggingface.co

Total runs: 56.3K
Run Growth: -5.3K
Growth Rate: -9.56%
Updated:October 17 2025
huggingface.co

Total runs: 29.3K
Run Growth: 4.1K
Growth Rate: 14.54%
Updated:May 26 2026
huggingface.co

Total runs: 14.8K
Run Growth: 2.1K
Growth Rate: 14.74%
Updated:May 26 2026
huggingface.co

Total runs: 11.4K
Run Growth: 3.7K
Growth Rate: 32.55%
Updated:October 17 2025
huggingface.co

Total runs: 9.3K
Run Growth: -3.7K
Growth Rate: -40.02%
Updated:July 30 2025
huggingface.co

Total runs: 5.9K
Run Growth: -546
Growth Rate: -9.47%
Updated:January 01 2026
huggingface.co

Total runs: 4.7K
Run Growth: 4.5K
Growth Rate: 99.34%
Updated:September 10 2026
huggingface.co

Total runs: 3.7K
Run Growth: 873
Growth Rate: 23.83%
Updated:May 21 2026
huggingface.co

Total runs: 3.2K
Run Growth: 3.1K
Growth Rate: 99.04%
Updated:September 09 2026
huggingface.co

Total runs: 2.9K
Run Growth: 115
Growth Rate: 3.95%
Updated:February 24 2026
huggingface.co

Total runs: 2.4K
Run Growth: -1.6K
Growth Rate: -66.58%
Updated:December 30 2025
huggingface.co

Total runs: 2.1K
Run Growth: 2.1K
Growth Rate: 100.00%
Updated:September 22 2026
huggingface.co

Total runs: 1.6K
Run Growth: 694
Growth Rate: 46.30%
Updated:March 06 2025
huggingface.co

Total runs: 1.2K
Run Growth: -284
Growth Rate: -23.13%
Updated:October 17 2025
huggingface.co

Total runs: 1.1K
Run Growth: -3.4K
Growth Rate: -330.69%
Updated:June 01 2026
huggingface.co

Total runs: 975
Run Growth: 975
Growth Rate: 100.00%
Updated:September 22 2026
huggingface.co

Total runs: 372
Run Growth: -3.0K
Growth Rate: -804.03%
Updated:September 15 2025
huggingface.co

Total runs: 371
Run Growth: 55
Growth Rate: 14.47%
Updated:March 06 2026
huggingface.co

Total runs: 322
Run Growth: 112
Growth Rate: 35.78%
Updated:December 31 2025
huggingface.co

Total runs: 288
Run Growth: -70
Growth Rate: -26.52%
Updated:March 11 2026
huggingface.co

Total runs: 239
Run Growth: 193
Growth Rate: 82.13%
Updated:February 04 2026