Hugging Face Blog

A Gentle Introduction to 8-bit Matrix Multiplication for transformers at scale using transformers, accelerate and bitsandbytes

arXiv Machine Learning
5d ago

Implementing Binary Transformers with Approximate Memories with Permutation Invariance Enabled Selective (PIES) Protection

The paper evaluates the reliability of binary Transformers, specifically BERT, when stored in approximate memory that introduces bit errors. It finds that significant accuracy loss only occurs at high bit error rates (5–10%). To mitigate this, the authors propose a Permutation Invariance Enabled Selective (PIES) protection scheme that selectively safeguards critical weights, achieving near‑full performance recovery at high error rates with much lower overhead than traditional error‑correcting codes.

By Zhen Gao, Xiao Yin, Kexin Liang, Pedro Reviriego, Shanshan Liu, Fabrizio Lombardi
arXiv Machine Learning
Nov 5

Fast and Stable Triangular Inversion for Delta-Rule Linear Transformers

The paper introduces fast and stable methods for triangular matrix inversion used in Delta-Rule linear transformers, a key component of efficient long‑context models such as Qwen3.5/3.6 and RWKV‑7. It systematically compares direct and iterative inversion algorithms, emphasizing numerical stability, computational complexity, and hardware efficiency, and validates the approaches with rigorous experiments in low‑precision settings. Benchmarks on NPUs show up to a 4.3× speed‑up over current SGLang implementations, improving layer performance while preserving model accuracy.

By Aleksandros Sobczyk, Gioele Gottardo, Christos K. Matzoros, Mirko De Vita, Filip Skogh, Anastasios Zouzias, Jiawei Zhuang
arXiv AI
Oct 28

An Algebra of Transformers

The paper "An Algebra of Transformers" proposes a formal algebraic framework for reasoning about transformer models, building on functional decomposition results. It introduces atomic actions based on these decompositions, along with sequential and parallel composition, recursion for feedback, and abstraction for hidden layers. This marks the first logical modeling attempt for transformers, enabling verification of transformer‑based applications.

By Yong Wang, Zhiyan Wang, Hexiao Kang
arXiv Machine Learning
Nov 6

The Quantization Benefits of Residual-Free Transformers

The paper investigates how residual connections in transformers affect the distribution of activations, making them heavy‑tailed and more difficult to quantize accurately. By comparing standard residual transformers with residual‑free variants, the authors show that residuals increase quantization error and accuracy loss at low precision, while residual‑free models maintain near‑Gaussian activations and better robustness to low‑bit quantization. They further demonstrate that residual‑free transformers can be trained effectively using orthogonal initialization, spectral or second‑order optimization, and depth‑aware scaling of attention temperature, achieving comparable full‑precision performance with improved quantization friendliness.

By Yiping Ji, Mahalakshmi Sabanayagam, Peyman Moghadam, Hemanth Saratchandran, Simon Lucey
Hugging Face Trending Papers
Jun 11

Modern analog computing for solving differential and matrix equations

In recent years, driven by the computational demands of data-intensive applications such as artificial intelligence and scientific computing, analog computing has gained renewed interest. Given the diversity of computational tasks and recent advancements in analog CMOS circuits and resistive memory technologies, we refer to the evolving landscape as modern analog computing.