Can the model’s weights run gradient descent?

qwenGPU trained a two-weight predictor on four labeled points, going through the examples three times. The GPU calculated the prediction, error and gradient, updated its weights, and used the result to predict four new points.

Error as the GPU learns

Training updates

● Training · ● Held-out · mean squared error

The curves are calculated afterward from the GPU’s recorded weights. The GPU receives only the training labels.

Fitted prediction

x = −2x = +2 Slice through the fitted plane at y = 1. Green is the learned predictor. Dashed purple is the target.

How the GPU runs this update

Last stored weights
Predictions after training
PointGPU predictionTarget

Playback is accelerated. The whole launch was timed. Gold marks compiled circuit placement. Registers and memory writes come from the model trace.
Arithmetic and checks

The predictor has two weights and no bias. It minimizes half squared error using stochastic gradient descent with a learning rate of 1/16. Weights and labels use signed fixed-point integers with 256 units per whole number. Each gradient is divided by 16 and rounded toward zero before subtraction.

All four GPU lanes train from zero on the same examples. Their identical history writes share output addresses. Each lane uses its own learned weights to predict one held-out point in the same launch. The Mac supplies inputs and reads the completed output.

We checked every training prediction, error, weight update and final prediction against an independent reference. As a separate check on the gradient, we nudged each weight one fixed-point unit in either direction and compared the change in squared loss with the gradient in the GPU register. We also matched the complete model token stream against the machine interpreter. A fresh launch with reversed labels had to negate the complete output.

Security implications

A fixed model checkpoint can execute an iterative learning algorithm during inference and use the resulting parameters. An audit that checks only whether the checkpoint changed would miss these learned parameters in working memory.