# CompileMask improves throughput for custom transformer attention masks

> Researchers at JD.com and Beijing University of Posts and Telecommunications developed CompileMask, a compiler that connects flexible attention masks to efficient GPU kernels. Blackwell GPU experiments measured higher throughput than Flex-FA4 for several mask patterns.

- Canonical URL: https://newsverum.com/en/news/compilemask-transformer-attention-masking-2026
- Publisher: Newsverum
- Section: Technology
- Country: China
- Published: 2026-10-13T01:40:12+00:00
- Updated: 2026-10-13T01:40:12+00:00
- Source review period: 2026-10-09
- Other editions: [Türkçe](https://newsverum.com/tr/news/compilemask-transformer-attention-masking-2026.md), [العربية](https://newsverum.com/ar/news/compilemask-transformer-attention-masking-2026.md), [Français](https://newsverum.com/fr/news/compilemask-transformer-attention-masking-2026.md), [Español](https://newsverum.com/es/news/compilemask-transformer-attention-masking-2026.md), [Deutsch](https://newsverum.com/de/news/compilemask-transformer-attention-masking-2026.md), [Português](https://newsverum.com/pt/news/compilemask-transformer-attention-masking-2026.md)

*The source does not state the event date; the period shown is the source review period.*

Transformer workloads use different masks to control which tokens can attend to one another. CompileMask lets users define rules in a region-based language; its compiler derives visible token intervals ahead of execution and supplies a compact descriptor to the GPU attention kernel at runtime.

On NVIDIA Blackwell at sequence length 32K, the study reports throughput over Flex-FA4 of 1.44× for HSTU, 2.13× for a shared-prompt reward model and 2.87× for CLEAR. For causal attention it retained 85–89% of native FA4 throughput. These comparisons cover specific masks and hardware settings and do not establish the same gain for every transformer workload.

## Data

### Attention-mask comparison

Attention workloads measured at length 32K; values are specific to the study.

Methodology: Four mask patterns were tested on NVIDIA Blackwell GPUs at sequence lengths from 1K to 32K; speedups are relative to the paper’s Flex-FA4 baseline.

| Attention mode | Native FA4 throughput retained |
|---|---|
| Causal attention, lower bound | 85 |
| Causal attention, upper bound | 89 |

Sources: <https://arxiv.org/abs/2610.13474> · Download data: [JSON](https://newsverum.com/api/v1/articles/compilemask-transformer-attention-masking-2026/data/attention-benchmark?lang=en&format=json) · [CSV](https://newsverum.com/api/v1/articles/compilemask-transformer-attention-masking-2026/data/attention-benchmark?lang=en&format=csv)

## Sources

- [arXiv](<https://arxiv.org/abs/2610.13474>) (Source checked: 2026-10-13; Published: 2026-10-09)

---

Cite the canonical URL above. [Editorial standards and corrections](https://newsverum.com/en/editorial)
