ChatPaper.aiChatPaper

Q-Sparse: Alle grote taalmodellen kunnen volledig spaarzaam geactiveerd worden

Q-Sparse: All Large Language Models can be Fully Sparsely-Activated

July 15, 2024
Auteurs: Hongyu Wang, Shuming Ma, Ruiping Wang, Furu Wei
cs.AI

Samenvatting

We introduceren Q-Sparse, een eenvoudige maar effectieve aanpak voor het trainen van spaarzaam geactiveerde grote taalmmodellen (LLMs). Q-Sparse maakt volledige sparsity van activaties in LLMs mogelijk, wat aanzienlijke efficiëntiewinsten kan opleveren tijdens inferentie. Dit wordt bereikt door top-K-sparsificatie toe te passen op de activaties en de straight-through-estimator tijdens het trainen. De belangrijkste resultaten van dit werk zijn: (1) Q-Sparse kan resultaten behalen die vergelijkbaar zijn met die van baseline LLMs, terwijl het veel efficiënter is tijdens inferentie; (2) We presenteren een inferentie-optimale schaalwet voor spaarzaam geactiveerde LLMs; (3) Q-Sparse is effectief in verschillende settings, waaronder training vanaf nul, door-training van kant-en-klare LLMs, en finetuning; (4) Q-Sparse werkt zowel voor LLMs met volledige precisie als voor 1-bit LLMs (bijv. BitNet b1.58). In het bijzonder biedt de synergie van BitNet b1.58 en Q-Sparse (die kan worden uitgerust met MoE) de hoeksteen en een duidelijk pad om de efficiëntie, inclusief kosten en energieverbruik, van toekomstige LLMs te revolutioneren.
English
We introduce, Q-Sparse, a simple yet effective approach to training sparsely-activated large language models (LLMs). Q-Sparse enables full sparsity of activations in LLMs which can bring significant efficiency gains in inference. This is achieved by applying top-K sparsification to the activations and the straight-through-estimator to the training. The key results from this work are, (1) Q-Sparse can achieve results comparable to those of baseline LLMs while being much more efficient at inference time; (2) We present an inference-optimal scaling law for sparsely-activated LLMs; (3) Q-Sparse is effective in different settings, including training-from-scratch, continue-training of off-the-shelf LLMs, and finetuning; (4) Q-Sparse works for both full-precision and 1-bit LLMs (e.g., BitNet b1.58). Particularly, the synergy of BitNet b1.58 and Q-Sparse (can be equipped with MoE) provides the cornerstone and a clear path to revolutionize the efficiency, including cost and energy consumption, of future LLMs.
PDF233February 8, 2026