Spectra: 三値化、量子化、FP16言語モデルの包括的研究
Spectra: A Comprehensive Study of Ternary, Quantized, and FP16 Language Models
July 17, 2024
著者: Ayush Kaushal, Tejas Pandey, Tejas Vaidhya, Aaryan Bhagat, Irina Rish
cs.AI
要旨
ポストトレーニング量子化は、LLM推論におけるメモリ関連のボトルネックに対処する主要な手法ですが、残念ながら4ビット以下の精度では性能が大幅に低下するという課題があります。これに対する代替アプローチとして、低ビット幅(例えばバイナリや3値モデル)で直接圧縮モデルをトレーニングする方法があります。しかし、このようなモデルの性能、トレーニングダイナミクス、スケーリング傾向についてはまだ十分に理解されていません。この問題に対処するため、私たちは99Mから3.9Bパラメータまでの54の言語モデルからなるSpectra LLMスイートを300Bトークンでトレーニングし、公開しました。Spectraには、FloatLM、ポストトレーニング量子化されたQuantLM(3、4、6、8ビット)、そして3値LLM(TriLM)が含まれています。TriLMは、私たちが改良した3値言語モデリングのアーキテクチャで、与えられたサイズ(ビット単位)の従来の3値モデルを大幅に上回り、大規模では半精度モデルに匹敵する性能を発揮します。例えば、TriLM 3.9Bは半精度FloatLM 830Mよりも(ビット単位で)小さく、半精度FloatLM 3.9Bと常識推論や知識ベンチマークで同等の性能を示します。しかし、TriLM 3.9Bは、サイズが6倍大きいFloatLM 3.9Bと同様に有害でステレオタイプ的な特性も持っています。さらに、TriLM 3.9Bは、検証用データセットやウェブベースのコーパスでのパープレキシティではFloatLMに劣りますが、LambadaやPennTreeBankのようなノイズの少ないデータセットではより良い性能を発揮します。
低ビット幅モデルの理解を深めるため、私たちはSpectraスイートの中間チェックポイント500以上をhttps://github.com/NolanoOrg/SpectraSuite{https://github.com/NolanoOrg/SpectraSuite}で公開しています。
English
Post-training quantization is the leading method for addressing
memory-related bottlenecks in LLM inference, but unfortunately, it suffers from
significant performance degradation below 4-bit precision. An alternative
approach involves training compressed models directly at a low bitwidth (e.g.,
binary or ternary models). However, the performance, training dynamics, and
scaling trends of such models are not yet well understood. To address this
issue, we train and openly release the Spectra LLM suite consisting of 54
language models ranging from 99M to 3.9B parameters, trained on 300B tokens.
Spectra includes FloatLMs, post-training quantized QuantLMs (3, 4, 6, and 8
bits), and ternary LLMs (TriLMs) - our improved architecture for ternary
language modeling, which significantly outperforms previously proposed ternary
models of a given size (in bits), matching half-precision models at scale. For
example, TriLM 3.9B is (bit-wise) smaller than the half-precision FloatLM 830M,
but matches half-precision FloatLM 3.9B in commonsense reasoning and knowledge
benchmarks. However, TriLM 3.9B is also as toxic and stereotyping as FloatLM
3.9B, a model six times larger in size. Additionally, TriLM 3.9B lags behind
FloatLM in perplexity on validation splits and web-based corpora but performs
better on less noisy datasets like Lambada and PennTreeBank.
To enhance understanding of low-bitwidth models, we are releasing 500+
intermediate checkpoints of the Spectra suite at
https://github.com/NolanoOrg/SpectraSuite{https://github.com/NolanoOrg/SpectraSuite}.