paper-with-me

Papers

Training Transformers with 4-bit Integers

2023-06-21 · NeurIPS 2023 11 · Haocheng Xi, Changhao Li, Jianfei Chen, Jun Zhu

Quantizing the activation, weight, and gradient to 4-bit is promising to accelerate neural network training. However, existing 4-bit training methods require custom numerical formats which are not supported by contemporary hardware. In this work, we propose a training method for transformers with all matrix multiplications implemented with the INT4 arithmetic. Training with an ultra-low INT4 precision is challenging. To achieve this, we carefully analyze the specific structures of activation and gradients in transformers to propose dedicated quantizers for them. For forward propagation, we identify the challenge of outliers and propose a Hadamard quantizer to suppress the outliers. For backpropagation, we leverage the structural sparsity of gradients by proposing bit splitting and leverage score sampling techniques to quantize gradients accurately. Our algorithm achieves competitive accuracy on a wide range of tasks including natural language understanding, machine translation, and image classification. Unlike previous 4-bit training methods, our algorithm can be implemented on the current generation of GPUs. Our prototypical linear operator implementation is up to 2.2 times faster than the FP16 counterparts and speeds up the training by up to 35.1%.

📄 PDF Abstract BibTeX arXiv:2306.11987

Code (1)

xijiu9/Train_Transformers_with_INT4 공식 구현 jax

Tasks

image-classificationImage ClassificationMachine TranslationNatural Language Understanding

Similar Papers 제목 키워드 기반

Learning the greatest common divisor: explaining transformer predictions

2023-08-29 · François Charton

The predictions of small transformers, trained to calculate the greatest common divisor (GCD) of two positive integers, can be fully characterized by looking at model inputs and outputs. As training proceeds, the model l…

Int2Int: a framework for mathematics with transformers

2025-02-22 · François Charton

This paper documents Int2Int, an open source code base for using transformers on problems of mathematical research, with a focus on number theory and other problems involving integers. Int2Int is a complete PyTorch imple…

Algebraic Decomposition Theory for Transformer Length Generalization

2026-08-13 · Andy Yang, Blerta Veseli, Corentin Barloy, Michaël Cadilhac 외 arxiv

Transformer-based language models are known to sometimes generalize to sequences longer than seen during training, but we lack a precise characterization of which tasks admit length generalization. It is not even known w…

Transformers Can Achieve Length Generalization But Not Robustly

2024-02-14 · Yongchao Zhou, Uri Alon, Xinyun Chen, Xuezhi Wang 외

Length generalization, defined as the ability to extrapolate from shorter training sequences to longer test ones, is a significant challenge for language models. This issue persists even with large-scale Transformers han…

Position

OmniJet-$α_C$: Learning point cloud calorimeter simulations using generative transformers

2025-01-09 · Joschka Birk, Frank Gaede, Anna Hallin, Gregor Kasieczka 외

We show the first use of generative transformers for generating calorimeter showers as point clouds in a high-granularity calorimeter. Using the tokenizer and generative part of the OmniJet-${\alpha}$ model, we represent…