arXiv:2511.13761cs.DCcs.AI2025-11被引 2

用轻量版ChatGPT测试分布式训练,发现通信优化会引发不可逆性能下降。

What happens when nanochat meets DiLoCo?

  • 在nanochat上加DiLoCo,多本地训练后才同步,大幅减少通信
  • 预训练稳定但中后期任务指标明显变差,对齐能力受损
  • 适合研究分布式训练副作用,或想验证算法鲁棒性的开发者

尽管大模型训练通常依赖高带宽中心化计算,但新兴方法尝试在通信受限的分布式环境下进行。本文以开源的nanochat项目(8K行代码的完整聊天模型实现)为基准,将其作为可调控的实验平台。在nanochat训练循环上添加DiLoCo算法,即每个工作节点执行多步本地更新后再与外部优化器同步,实现通信量降低数个数量级。该方法与标准数据并行(DDP)对比显示,虽能稳定收敛且预训练损失相近,但在中段训练和微调后,MMLU、GSM8K和HumanEval等指标显著下降。进一步实验表明,使用DiLoCo预训练权重再切换回DDP无法恢复性能,揭示异步更新导致表征漂移,影响下游对齐效果。相关代码已作为官方分支发布于GitHub。

原文摘要 · Abstract (English)

Although LLM training is typically centralized with high-bandwidth interconnects and large compute budgets, emerging methods target communication-constrained training in distributed environments. The model trade-offs introduced by this shift remain underexplored, and our goal is to study them. We use the open-source nanochat project, a compact 8K-line full-stack ChatGPT-like implementation containing tokenization, pretraining, fine-tuning, and serving, as a controlled baseline. We implement the DiLoCo algorithm as a lightweight wrapper over nanochat's training loop, performing multiple local steps per worker before synchronization with an outer optimizer, effectively reducing communication by orders of magnitude. This inner-outer training is compared against a standard data-parallel (DDP) setup. Because nanochat is small and inspectable, it enables controlled pipeline adaptations and allows direct comparison with the conventional centralized baseline. DiLoCo achieves stable convergence and competitive loss in pretraining but yields worse MMLU, GSM8K, and HumanEval scores after mid-training and SFT. We discover that using DiLoCo-pretrained weights and running mid- and post-training with DDP fails to recover performance, revealing irreversible representation drift from asynchronous updates that impairs downstream alignment. We provide this implementation as an official fork of nanochat on GitHub.

分布式训练模型压缩训练优化表征漂移

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。