Gradient clipping can erase a finite gradient in Apple MLX 0.32.2. For float16 [3072,4096] and threshold 1, the true norm is 5120 and the expected clipped vector is approximately [0.6,0.8]. The tested CPU implementation reports infinity and returns [0,0]. An actual synthetic SGD step then loses its parameter update.

A research patch scales before squaring and adjusts the arithmetic order. The main suite has 219 input scenarios and 1701 assertions: 230 failures before, zero after. Of those assertions, 633 compare numerical results; others check API properties. Another 39 compatibility and autodiff checks pass. Fresh rows match the original evidence exactly.

Report: https://www.gero.uz/research/articles/mlx-clip-grad-norm-range.html
Code, patch, references and logs: https://github.com/kadyrbekovhamit-cyber/gero-numerical-observatory/tree/main/audits/2026-09-10-mlx-clip-grad-norm-range/
Pinned source: https://github.com/ml-explore/mlx/blob/81ba1c6a0e50a9268b931579c2d4f1158b9aab5a/python/mlx/optimizers/optimizers.py#L963

CPU only, one numerical thread. Four real dtypes; JVP, VJP and second derivatives checked for float32/64. No GPU, distributed run, full-model quality measurement or large-model performance test. The complex path is preserved; standalone linalg.norm is not repaired. No claim of upstream acceptance or production readiness.

Synthetic narration: macOS Samantha, fictional Alex Vector. Original diagrams. AI-assisted research, code, writing and production. Technology Product / Xamit Kadirbekov. No sponsor or paid promotion.

#MLX #MachineLearning #NumericalComputing
