Abstract: 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.

Author: AI-assisted technical review

Title: Technical review: FP4 language-model training

# Scope and result

This review concerns I25-43733, the 21-page PMLR version of Optimizing Large Language Model Training Using FP4 Quantization. The principal contribution is an empirical training recipe: E2M1 weights and activations, a surrogate weight derivative (DGE), and activation outlier clamping with residual compensation (OCC). The actual experiments emulate FP4 using FP8 hardware; a native FP4 end-to-end speedup is not measured. The inspected evidence supports several local corrections and an unresolved implementation-to-experiment linkage, rather than a demonstrated failure of the reported learning curves. Assessment: Minor; scientific adjudication remains pending.

# DGE mathematics

Problem 1 (Minor: the scaling derivative requires a frozen-scale convention).  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 \(s=s(w)\) and \(F_i(w)=Q(sw_i)/s\), direct differentiation of a smooth surrogate gives \[dF_i=Q'(sw_i)\,dw_i+
 \left\{w_iQ'(sw_i)/s-Q(sw_i)/s^2\right\}ds.\] The second term couples a column through its maximum. For a positive, unique maximum \(w_1\) and E2M1 maximum 6, \(s=6/w_1\) and \(Q(6)=6\), so \(F_1=w_1\) exactly and its total derivative is 1. At \(k=5\), the paper’s interval surrogate has endpoint derivative \(1/k=0.2\); the frozen-scale formula instead gives 0.2. This is a counterexample to the unconditional chain-rule claim, not to using 0.2 as a chosen surrogate update. Explicitly stopping differentiation through \(s\) 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.

Problem 2 (Minor: bounded smoothing and clipping are not mathematically equivalent).  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 \(u=2x/\delta-1\), \(g_c(u)=\min\{k^{-1}|u|^{1/k-1},c\}\), and \(g_\epsilon(u)=k^{-1}(u^2+\epsilon^2)^{(1/k-1)/2}\). Setting \(\epsilon=(kc)^{-k/(k-1)}\) makes both peaks equal \(c\). Nevertheless, at \(|u|=\epsilon\), \(g_c=c\) whereas \(g_\epsilon=c\,2^{(1/k-1)/2}\). For \(k=5,c=3\), these values are \(3\) and \(2.273575\). 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. A precise repair is to call the implemented update a clipped surrogate and state its boundedness directly, without a smoothing-equivalence claim. No convergence or superior gradient-accuracy guarantee follows merely from boundedness.

# Performance calculation

Problem 3 (Minor: two numerical substitutions in Appendix B are incorrect).  With \(h=4096,s=2048,\alpha=0.99\), the displayed adjusted-speedup formula on page 15 evaluates to \(3.027292\), not \(2.95\). Its OCC overhead ratio is \(0.028206\), not \(5.6\%\).

The unadjusted ratio is \(3.115460\) and the stated DGE ratio is \(0.000918\), consistent with the rounded \(3.12\) and \(0.1\%\). 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 \(96bsh\) activation-shaped elements. For the standard dense block counted in Table 5, the corresponding six weight matrices contain \(12h^2\) entries, giving \(96h^2\) 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.

# Static implementation and empirical scope

The acquired Azure/MS-AMP commit is `9746ea85289f8e6233646e73ace35f730d1245d5` (1 December 2025), later than the conference proceedings. Static inspection covered `msamp/operators/fp4_quantize/fp4_quantize.py` lines 1–186, its CUDA kernel lines 1–140, `msamp/megatron/layers.py` lines 1–218, and `msamp/common/tensor/meta.py` lines 37–56. No author program or test was executed.

The CUDA lookup thresholds agree with Appendix A, including upward ties. The piecewise DGE derivative is capped at 3 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 \(1-\alpha,\alpha\) would otherwise clip negative activations incorrectly.

Needs Evidence: OCC reproduction path. The Megatron activation call (line 67) enables clipping but omits `residual_compensation`; the callee defaults that argument to false (line 114). The forward function then passes the quantized input to one FP8 GEMM and adds only bias (lines 108–116). 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 \(k\), \(\alpha\), 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.

# Supporting checks

The review read the central methodology and experiment sections (pages 1–7), relevant related-work/conclusion portions, Appendix A–C (pages 13–18), and Appendix D’s explanation and displayed activation distributions (pages 20–21). The dense weight histograms on page 19 were not visually audited in full; references and external cited work were not exhaustively checked. Independent scalar calculations tested the scale derivative, clipping/smoothing counterexample, and speedup arithmetic. The positive alternative interpretations—frozen scales, bounded surrogate gradients, explicitly hypothetical hardware throughput, and a later public code release—are included above to prevent stronger unsupported conclusions.

Publisher PDF SHA-256: `ad874f1297ae67fb3d84af51f6a76ebd765aff4b595479e09a79c571980c4245`. Evidence consists of the hash-checked source mirror, saved code excerpts, independent calculation script/output, and source-image inspection record. Other revisions, inaccessible separate OpenReview attachments, full training reproduction, and hardware timing remain outside this review. This is an initial review, with no human decision or independent acceptance claimed.
