Explore the research collection
3 entries · Follow this search
- Paper
Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free
Compares ~30 gating variants on 15B MoE (15A2B, 2.54B active) and 1.7B dense models trained on up to 3.5T tokens. A head-specific sigmoid gate after SDPA (G1) is best: MoE 400B-token Avg PPL 5.761 vs 6.026 baseline and MMLU 60.82 vs 58.79, beating parameter-matched KV-head/expert expansions. Gains come from non-linearity between low-rank Wv and Wo plus query-dependent sparse gates (mean score 0.116). First-token attention falls 46.7%→4.8%; YaRN-extended RULER at 128k is 58.82 vs 31.65. Gate also damps loss spikes and allows higher LR (8e-3) where the baseline diverges. Claims first attention-sink-free models.
- Paper
ID Balancing: Stable Training of Extremely Sparse MoE via PID-Based Load Control
Addresses expert load imbalance when scaling LLMs via Mixture-of-Experts with increasingly sparse routing. ID Balancing: an Integral-Derivative load-control method built on the observation that two existing auxiliary-loss-free methods are incomplete PID controllers -- DeepSeek's loss-free method is a fixed-step integral controller and Kimi K3's Quantile Balancing is a generalized proportional controller. ID Balancing scales its integral term with load error and activates its derivative term only when imbalance worsens, giving stronger corrections for large/worsening errors and smaller updates near balance. Results (Top-10/Top-5/Top-3 routing over 768 experts): in Top-3, worst-case backbone MaxVio reduced by over 50% and training-average backbone MinVio by over 12% vs the best baselines. Scaling 18.9B -> 69.9B total params (Top-10-of-768), worst-case backbone MaxVio stays nearly unchanged, ~89.6% lower than the auxiliary-loss baseline. Maintains competitive language-modeling and downstream performance; advantages grow as sparsity increases.
- Code
KTransformers
kvcache-ai/ktransformers is a CPU-GPU hybrid inference/SFT framework (MADSys Tsinghua / Approaching.AI / 9#AISoft). Current tree exposes kt-kernel serving (AMX/AVX INT4/INT8, NUMA-aware MoE, hot-GPU/cold-CPU experts, SGLang integration) and LLaMA-Factory SFT/DPO for ultra-large MoE on limited VRAM. README: DeepSeek-R1/V3 on a single 24GB GPU plus large DRAM; SFT DeepSeek-V3 ~80GB / 3.7 it/s on 4x RTX 4090, claimed 6-12x vs ZeRO-Offload in their MoE SFT benches. SOSP 2025 paper: AMX kernels, async CPU-GPU scheduling, Expert Deferral (CPU util <75% to ~100%, up to 1.45x extra throughput, <=0.5% avg accuracy drop). Apache-2.0. Docs site kvcache-ai.github.io/ktransformers.