Mengsel van Schalen: Geheugenefficiënte Token-Adaptieve Binarisatie voor Grote Taalmodellen
Mixture of Scales: Memory-Efficient Token-Adaptive Binarization for Large Language Models
June 18, 2024
Auteurs: Dongwon Jo, Taesu Kim, Yulhwa Kim, Jae-Joon Kim
cs.AI
Samenvatting
Binarisatie, waarbij gewichtsparameters worden omgezet naar binaire waarden, is naar voren gekomen als een effectieve strategie om de omvang van grote taalmodelen (LLM's) te verkleinen. Typische binarisatietechnieken verminderen echter aanzienlijk de linguïstische effectiviteit van LLM's. Om dit probleem aan te pakken, introduceren we een nieuwe binarisatietechniek genaamd Mixture of Scales (BinaryMoS). In tegenstelling tot conventionele methoden, maakt BinaryMoS gebruik van meerdere schaalexperts voor binaire gewichten, waarbij deze experts dynamisch worden samengevoegd voor elk token om adaptief schaalfactoren te genereren. Deze token-adaptieve benadering versterkt het representatievermogen van gebinariseerde LLM's door contextuele aanpassingen aan de waarden van binaire gewichten mogelijk te maken. Bovendien, omdat dit adaptieve proces alleen de schaalfactoren betreft en niet de gehele gewichtsmatrix, behoudt BinaryMoS een compressie-efficiëntie die vergelijkbaar is met traditionele statische binarisatiemethoden. Onze experimentele resultaten tonen aan dat BinaryMoS conventionele binarisatietechnieken overtreft in verschillende natuurlijke taalverwerkingstaken en zelfs 2-bit kwantiseringsmethoden overtreft, terwijl het een vergelijkbare modelgrootte behoudt als statische binarisatietechnieken.
English
Binarization, which converts weight parameters to binary values, has emerged
as an effective strategy to reduce the size of large language models (LLMs).
However, typical binarization techniques significantly diminish linguistic
effectiveness of LLMs. To address this issue, we introduce a novel binarization
technique called Mixture of Scales (BinaryMoS). Unlike conventional methods,
BinaryMoS employs multiple scaling experts for binary weights, dynamically
merging these experts for each token to adaptively generate scaling factors.
This token-adaptive approach boosts the representational power of binarized
LLMs by enabling contextual adjustments to the values of binary weights.
Moreover, because this adaptive process only involves the scaling factors
rather than the entire weight matrix, BinaryMoS maintains compression
efficiency similar to traditional static binarization methods. Our experimental
results reveal that BinaryMoS surpasses conventional binarization techniques in
various natural language processing tasks and even outperforms 2-bit
quantization methods, all while maintaining similar model size to static
binarization techniques.