ChatPaper.aiChatPaper

Fairy2i: Het trainen van complexe LLM's vanuit echte LLM's met alle parameters in {±1, ±i}

Fairy2i: Training Complex LLMs from Real LLMs with All Parameters in {pm 1, pm i}

December 2, 2025
Auteurs: Feiyu Wang, Xinyu Tan, Bokai Huang, Yihao Zhang, Guoan Wang, Peizhuang Cong, Tong Yang
cs.AI

Samenvatting

Grote taalmodellen (LLM's) hebben een revolutie teweeggebracht in kunstmatige intelligentie, maar hun enorme geheugen- en rekenvereisten maken agressieve kwantisatie noodzakelijk, waardoor representaties steeds verder richting de theoretische limiet van één bit worden geduwd. Hoewel complexwaardige LLM's, zoals iFairy, een grotere kans bieden op representatie met weinig bits in vergelijking met reëelwaardige tegenhangers, vereisen zij training vanaf nul, waardoor het uitgebreide ecosysteem van vooraf getrainde reëelwaardige foundation-modellen niet benut kan worden. Hier presenteren we Fairy2i, een universeel raamwerk dat vooraf getrainde reëelwaardige lagen omzet in een equivalente wijd-lineaire complexe vorm, waardoor extreem lage-bits kwantisatie mogelijk is terwijl bestaande checkpoints worden hergebruikt. Door een verliesvrij wiskundig equivalent tussen reële en wijd-lineaire afbeeldingen aan te tonen, converteren we standaard Transformers naar het complexe domein en passen we een fasebewust kwantisatieschema toe met een zeer efficiënte codebook van vierdemachts eenheidswortels. Verder introduceren we een recursief residueel kwantisatiemechanisme dat iteratief de kwantisatiefout minimaliseert, waardoor inferentie kan verlopen via efficiënte vermenigvuldigingsvrije accumulatie. We tonen aan dat Fairy2i de prestaties van LLaMA-2 7B bij een effectieve 2-bits precisie herstelt tot niveaus die bijna vergelijkbaar zijn met full-precision basislijnen, waardoor state-of-the-art reëelwaardige binaire en ternaire kwantiseringsmethoden significant worden overtroffen. Dit werk overbrugt de kloof tussen de representatie-efficiëntie van complexwaardige rekenkunde en de praktische bruikbaarheid van vooraf getrainde modellen, en baant zo een nieuwe weg voor efficiënte inferentie op standaardhardware.
English
Large language models (LLMs) have revolutionized artificial intelligence, yet their massive memory and computational demands necessitate aggressive quantization, increasingly pushing representations toward the theoretical limit of a single bit. While complex-valued LLMs, such as iFairy, offer a superior chance for low-bit representation compared to real-valued counterparts, they require training from scratch, preventing the utilization of the vast ecosystem of pre-trained real-valued foundation models. Here we present Fairy2i, a universal framework that transforms pre-trained real-valued layers into an equivalent widely-linear complex form, enabling extremely low-bit quantization while reusing existing checkpoints. By proving a lossless mathematical equivalence between real and widely-linear maps, we convert standard Transformers into the complex domain and employ a phase-aware quantization scheme with a highly efficient codebook of fourth roots of unity. Furthermore, we introduce a recursive residual quantization mechanism that iteratively minimizes quantization error, allowing inference to proceed via efficient multiplication-free accumulation. We demonstrate that Fairy2i restores the performance of LLaMA-2 7B at an effective 2-bit precision to levels nearly comparable with full-precision baselines, significantly outperforming state-of-the-art real-valued binary and ternary quantization methods. This work bridges the gap between the representational efficiency of complex-valued arithmetic and the practical utility of pre-trained models, paving a new way for efficient inference on commodity hardware.
PDF52December 17, 2025