arXiv:2602.14462cs.LGcs.AI2026-02

发现大模型训练中隐藏的参数不同步问题,提出轻量诊断方法

Silent Inconsistency in Data-Parallel Full Fine-Tuning: Diagnosing Worker-Level Optimization Misalignment

  • 通过损失、梯度范数和方向一致性三指标,检测分布式训练中的隐性不一致
  • 实验显示数据打乱方式不同可使梯度离散度上升40%以上,但全局损失仍平稳
  • 无需修改代码,适合大规模模型调参与故障排查人员使用

基于同步 all-reduce 的数据并行(DP)训练是大语言模型全参数微调的主流范式。尽管参数同步保证了每轮迭代后权重数值等价,但并不意味着各工作节点在梯度聚合前的优化动态一致。本文揭示并研究了这种潜在的不一致现象,称为‘隐性不一致’——跨工作节点的损失与梯度差异在常规聚合监控下不可见。为此,我们提出一种轻量、模型无关的诊断框架,利用标准训练流程中已有的信号量化工作节点间的一致性。具体引入三个互补指标:损失离散度、梯度范数离散度,以及通过工作节点间余弦相似度衡量的梯度方向一致性。该框架开销极低,无需修改模型结构、同步机制或优化算法。我们在8个NPU上对10亿参数的openPangu-Embedded-1B-V1.1模型在tatsu-lab/alpaca数据集上进行全微调,通过控制跨进程随机性扰动验证。结果表明,随着数据打乱方式与随机种子逐渐不同步,损失/梯度离散度显著上升,方向一致性下降,而全局平均损失曲线仍保持平滑。这证明所提指标能有效暴露大规模数据并行微调中的隐藏不稳定状态,提升诊断与配置评估可靠性。

原文摘要 · Abstract (English)

Data-parallel (DP) training with synchronous all-reduce is a dominant paradigm for full-parameter fine-tuning of large language models (LLMs). While parameter synchronization guarantees numerical equivalence of model weights after each iteration, it does not necessarily imply alignment of worker-level optimization dynamics before gradient aggregation. This paper identifies and studies this latent mismatch, termed \emph{silent inconsistency}, where cross-worker divergence in losses and gradients can remain invisible under conventional aggregated monitoring signals. We propose a lightweight, model-agnostic diagnostic framework that quantifies worker-level consistency using training signals readily available in standard pipelines. Specifically, we introduce three complementary metrics: loss dispersion, gradient-norm dispersion, and gradient-direction consistency measured by inter-worker cosine similarity. The proposed metrics incur negligible overhead and require no modification to model architecture, synchronization mechanisms, or optimization algorithms. We validate the framework by fully fine-tuning the 1B-parameter \texttt{openPangu-Embedded-1B-V1.1} model on the \texttt{tatsu-lab/alpaca} dataset using an 8-NPU DP setup, under controlled perturbations of cross-rank stochasticity. Experimental results show that progressively desynchronized data shuffling and random seeds lead to substantial increases in loss/gradient dispersion and reduced directional alignment, despite smooth globally averaged loss curves. These findings demonstrate that the proposed indicators provide actionable visibility into hidden instability modes in large-scale DP fine-tuning, enabling more reliable diagnosis and configuration assessment.

分布式训练模型微调诊断工具

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