WEBVTT

00:00:00.000 --> 00:00:08.601
Gradient clipping should shrink a large gradient. In this recorded MLX CPU case, it turns a finite gradient into zero.

00:00:08.601 --> 00:00:17.474
The true norm fits float sixteen. With a threshold of one, this vector should become approximately zero point six and zero point eight.

00:00:17.474 --> 00:00:28.474
The implementation squares first. That intermediate overflows, so clipping produces zero. In a checked optimizer step, the parameter update disappears.

00:00:28.474 --> 00:00:38.680
A research patch scales before squaring and adjusts the arithmetic order to protect representable small outputs. The checked types and tree structure are preserved.

00:00:38.680 --> 00:00:49.480
Two hundred nineteen scenarios produce seventeen hundred one assertions. Two hundred thirty fail before repair, and none after. Thirty nine additional checks pass.

00:00:49.480 --> 00:01:01.775
The archive preserves code, logs and the rejected prototype. This demonstrates clipping and a synthetic optimizer step. GPU behavior and large model performance remain untested.
