Optimizing Large Language Model Training Using FP4 Quantization
ELVIA analysis
Independent review pending
A source-based examination of the DGE derivation, clipping justification, performance arithmetic, and available implementation. Local corrections are established; linkage of the acquired code to the reported residual-compensated experiments remains unresolved.
Problem 1. Scaling derivation omits weight-dependent scale derivative
MinorEvidence and reasoning
Problem statement
Inspection subject recorded in the report
The derivative of the scaled objective must include the scale's dependence on the weight unless the analysis explicitly freezes that scale.
Proof
Appendix C.2, equations (18)–(22), describes its result as the true weight gradient, but omits derivatives through the weight-dependent absmax scale in equation (1).
Writing and direct differentiation of a smooth surrogate gives The second term couples a column through its maximum. For a positive, unique maximum and E2M1 maximum and so exactly and its total derivative is At the paper’s interval surrogate has endpoint derivative the frozen-scale formula instead gives This is a counterexample to the unconditional chain-rule claim, not to using as a chosen surrogate update. Explicitly stopping differentiation through repairs the derivation’s intended scope. The acquired code uses a power-of-two scale, piecewise constant away from scale transitions, and a custom backward pass; this is relevant counterevidence against imputing a historical training error from the paper’s absmax formula.
Possible revision
Not available
Problem 2. Clipping and smoothing are not equivalent
MinorEvidence and reasoning
Problem statement
Inspection subject recorded in the report
The paper describes bounded smoothing and clipping as mathematically equivalent transformations. Their functions must therefore agree on the stated input domain.
Proof
Appendix C.3, equation (28) and its following paragraph, infers equivalence from equal peak bounds. This does not establish equality of the gradient functions.
Let and Setting makes both peaks equal Nevertheless, at whereas For these values are and Their agreement at a single point cannot prove equivalence in a neighborhood. Both are bounded positive surrogate gradients, so the practical cap remains well defined. Equation (7) itself has an infinite derivative at the midpoint; it is continuous but not differentiable there. No convergence or superior gradient-accuracy guarantee follows merely from boundedness.
Possible revision
Not available
Problem 3. Speedup substitutions and DGE count need correction
MinorEvidence and reasoning
Problem statement
Inspection subject recorded in the report
The adjusted-speedup substitutions and DGE operation count should equal the expressions evaluated at the stated parameters.
Proof
With the displayed adjusted-speedup formula on page 15 evaluates to not Its OCC overhead ratio is not
The unadjusted ratio is and the stated DGE ratio is consistent with the rounded and These are arithmetic checks of the printed model, not hardware benchmarks. Moreover, the DGE operation applies to weight entries (equations (6), (22) and the inspected backward code), whereas its overhead is counted as activation-shaped elements. For the standard dense block counted in Table 5, the corresponding six weight matrices contain entries, giving scalar-operation units under the paper’s eight-operation assumption. This assumption itself treats nonlinear operations as equal-cost FLOPs. Clarify the counted objects, precision throughput baseline, quantile-sort and memory costs before interpreting the estimate as runtime. The paper explicitly excludes native FP4 measurements, which substantially limits the consequence of this issue.
Possible revision
Not available
Problem 4. Acquired Megatron path does not enable residual compensation
Needs EvidenceEvidence and reasoning
Problem statement
Inspection subject recorded in the report
The acquired Megatron training path must enable the residual-compensation operation before that path identifies the described compensated training recipe.
Verification
The acquired Azure/MS-AMP commit is `9746ea85289f8e6233646e73ace35f730d1245d5` ( December ), later than the conference proceedings. Static inspection covered `msamp/operators/fp4_quantize/fp4_quantize.py` lines – its CUDA kernel lines – `msamp/megatron/layers.py` lines – and `msamp/common/tensor/meta.py` lines –
The CUDA lookup thresholds agree with Appendix A, including upward ties. The piecewise DGE derivative is capped at and evaluated on saved scaled weights. The API correctly interprets the clamping parameters as empirical quantiles, resolving the ambiguity in equation (9), whose literal bounds would otherwise clip negative activations incorrectly.
Needs Evidence: OCC reproduction path. The Megatron activation call (line ) enables clipping but omits `residual_compensation`; the callee defaults that argument to false (line ). The forward function then passes the quantized input to one FP8 GEMM and adds only bias (lines –). Thus this inspected entry point discards the clipped residual and does not realize the sparse residual multiplication described in Section 3.2. The optional API can add a residual back before casting, but that is not selected here, and is not by itself the stated high-precision sparse GEMM. A paper-matched configuration/commit and compensation implementation are needed to connect this release to Tables 1–3. This is an observed release limitation; the historical runs may have used different code, and no effect on their scores is inferred.
Figures 3–6 were inspected as images. Figure 5 supports a small positive FP4 loss gap, with transient spikes, rather than exact equality. Table 2’s mean accuracy is sometimes higher under FP4; Table 3’s average perplexity is worse for 7B and 13B, so “comparable” is more defensible than uniform superiority. The ablations separate weight and activation mechanisms and vary and quantization granularity. Their lack of run-level uncertainty and raw checkpoints prevents a significance or reproducibility conclusion. Figures 11–14 visibly support heterogeneous activation tails and channel outliers; they do not alone establish a distribution-wide optimal clipping quantile.
Possible revision
Not available
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Experimental results demonstrate that our FP4 framework achieves accuracy comparable to BF16 and FP8, with minimal degradation, scaling effectively to 13B-parameter LLMs trained on up to 100B tokens.
PMLR volume 267 published original; retrieved exact supplied PDF URL; PDF p. 1, Abstract
Actual review scope
The recorded inspection concerns these source locations: Eq.1 Appendix C.2 Eqs.18-22; Appendix C.3 Eqs.26-28; Appendix B p. 15; msamp/megatron/layers.py:67,108-116 fp4_quantize.py:114,174-175.