Hugging Face Blog

Block Sparse Matrices for Smaller and Faster Language Models

arXiv Computation and Language
Oct 9

Sparse Attention Is Matrix Approximation, Not Choosing from a Bag of Values

The paper argues that sparse attention should be viewed as a matrix approximation problem rather than merely selecting large scalar entries from the attention matrix. It introduces Matrix Approximation Sparse Attention (MASA), a method that replaces raw attention-mass ranking with a closed‑form score reflecting the reduction in matrix‑product approximation error. MASA can be integrated into existing sparse attention frameworks and, according to extensive experiments, consistently improves accuracy across various methods, benchmarks, and LLM backbones.

By Fang Wan, Xufeng Liu, Fan Li, Yi Liu
arXiv Computation and Language
Nov 9

DUET: Dual-Sparse Inference for Block Diffusion Language Models

DUET is a training‑free dual‑sparse inference framework for diffusion language models that reduces inference cost by two techniques: prefix Key‑Value sparsity and early query sparsity. It constructs a compact historical KV subset reused across denoising steps, and predicts which positions will be updated to propagate only the necessary queries through the suffix Transformer layers. Experiments demonstrate that DUET keeps accuracy while delivering up to 4.72× speedups on large models with 32K context length.

By Siyuan Yan, Shen Gu, Xiaoxing Ma, Chun Cao, Jingwei Xu
arXiv AI
Sep 24

Riemannian Structure and Optimization for a Class of Low-Parametric Orthogonal Matrices

The paper studies matrices built from block‑diagonal factors interleaved with fixed permutations, a structured family useful in deep learning for balancing expressivity and efficiency. By applying Riemannian geometry, the authors determine when this class forms a smooth manifold and develop Riemannian tools for the orthogonal two‑factor case. They propose efficient algorithms that use automatic differentiation, allow parameter sharing, and avoid dense matrix construction, testing them on matrix approximation and fine‑tuning large language models, while also exploring properties of factorizations with more factors.

By Ali Aliev, Maxim Rakhuba
arXiv Computation and Language
Nov 16

See Every Block Once: Variance-Reduced Post-Training for Masked Diffusion Language Models

The paper introduces a full-block estimator for post-training Masked Diffusion Language Models (MDLMs), ensuring each block is evaluated exactly once. This approach eliminates variance from random block selection, remaining unbiased while reducing overall variance compared to baseline methods. Experiments across five benchmarks in mathematics, planning, and coding show the estimator achieves the highest accuracy on four tasks, outperforming random block sampling by an average of 12.79 points.

By Yunzhen He, Hiroaki Yamagiwa, Hidetoshi Shimodaira