The right model for every task. Try Nexus

Research

Training-Inference Parity in MoE Models: Where Numerics Drift

Kernel fusions that are mathematically equivalent can still drift numerically. This draft walks through the parity bugs we hit across Kimi K2.5 serving and Qwen3.5-MoE training, plus the fixes that kept k3 near the noise floor.

TRAINING REFERENCEFUSED INFERENCESAME WEIGHTS + SAME INPUT, BUT A DIFFERENT REDUCTION ORDERTP partialoutputsNCCL ringreduce-scatterStandaloneRMSNormReference logprobsPER-CHUNK OWNERSGPU0 owns chunk 0GPU1 owns chunk 1NCCL ORDER ROTATESchunk 0: r0 + r3 + r2 + r1chunk 1: r1 + r0 + r3 + r2LOCAL BUFFERSbuffer 0buffer 1buffer 2LAMPORT LOCAL ORDERchunk 0: r0 + r1 + r2 + r3chunk 1: r0 + r1 + r2 + r3Scatter-writeHBM buffersLocal fixed-ordersum on every GPUFused RMSNorm+ residualServed logprobsK3 DRIFT COMPOUNDSIn an LLM, KL compares the full next-tokenprobability vector from training and inference.The top token can stay the same,but probability moving across lower-rankedtokens still makes KL grow.KL MEASURES DISTRIBUTION MISMATCH, NOT JUST TOP-1 AGREEMENTEXAMPLE TOKEN PROBABILITIESsame prompt, same decode positiontraininginferencelarger shift means larger KLtokenprobability0.00.10.20.30.4top tokenrunner-upalt token Aalt token Btraining and inference can still agree on the top token,while lower-ranked probabilities drift apart