Models & ToolsSubscribers only Jul 13, 2026 at 02:208Add to bookmarks

A sparse attention kernel that makes long-context training finally affordable - if the benchmarks hold up outside the lab.
Flash-MSA is a GPU kernel that replaces dense attention with structured sparse attention during training. Goal: make training on sequences of a million tokens viable without blowing the compute budget.
Published on July 12, 2026 by Nandu Ruganesh (GitHub project page), Flash-MSA specifically targets training (where FlashAttention 3 has mostly gained in inference-friendly). The idea: sparse attention pattern by blocks, merging of forward/backward kernels, memory management designed for Hopper (H100/H200) and Blackwell.
The bottleneck of long-context has always been training, not inference. Moving from 128k to 1M tokens in dense multiplies activation memory and theoretical compute by ~60 (attention in O(n²), length ratio ~7.8×). Current workarounds (ring attention, aggressive tensor parallelism) work, but fragment the stack and complicate debugging.
Flash-MSA makes a bet: most long-range dependencies are local or narrative (repetitive block patterns in code, in documents). By making sparsity first-class in the kernel, we keep the simplicity of dense attention on the model side and gain scale on the kernel side. It's the same movement as FlashAttention on the inference side, two years later.
The repo announces (to be validated on third-party benchmarks): ~4× acceleration of the forward pass and ~2.7× of the backward on sequences 512k → 1M vs dense baseline, on H100. Activation memory divided by ~5. The block pattern is configurable (window size, dilation); the kernel exposes a PyTorch drop-in API.
What remains uncertain: (1) the model quality on long-context benchmarks (Needle-in-Haystack, RULER) after MSA vs dense training - Ruganesh promises a writeup; (2) portability to Blackwell (B200), which has a different memory hierarchy.
For those training or fine-tuning in long context, Flash-MSA is worth a test drive next week. For those buying models: model generation at the end of 2026 will be significantly cheaper to train at 512k+ tokens. Expect the "10M tokens of context" bidding war to become a commercial argument again, but the effective quality at these lengths remains the real discriminant.
A third-party benchmark writeup, reproduction on Blackwell, and integration into vLLM/SGLang on the serving side.
Create a free account to access all our content and the weekly review.
Article produced by artificial intelligence, reviewed under human editorial control.
Sign in to join the discussion.
L'entraînement long-contexte est indispensable, mais je doute des compromis sur les performances avec cette attention creuse.
L'attention creuse pourrait vraiment réduire les coûts d'entraînement, non ?
Est-ce que ça va garder la même précision ou sacrifier des détails pour être plus rapide ?
Comment ça se passe avec les langues étrangères ? Ça marche aussi bien ?
Est-ce que l'attention creuse va poser problème sur des données variées ?
Les économies promises sont intéressantes, mais comment ça marche en vrai, hors labo ?
Les tests en vrai confirment l'efficacité, mais ça reste à voir pour les très gros déploiements.
J'espère que cette technologie saura gérer les nuances des longs textes sans perdre en précision.
Les économies promises sont alléchantes, mais comment ce kernel gère-t-il les données bruitées ou les valeurs aberrantes ?
Est-ce que les économies de coût vont se faire au détriment de la performance du modèle ?