DEV Community

Sarthak Agrawal
Sarthak Agrawal

Posted on

Two days of kernel debugging ended at one default value

Browser training plateaued near a loss of 2.45. The curve was smooth enough to look like a model or kernel limit.

The WebGPU kernels were not the cause. The browser used a learning rate of 3e-3 while the Python reference used 3e-4. The default had drifted by a factor of ten.

Kernel parity tests covered the numerical operations, but nothing compared the configuration defaults. That gap made a correct implementation behave like a broken model. The reference path needed to be the authority for hyperparameters as well as math.

The same investigation found two more boundaries. The default corpus was only 863 bytes, which hid model capacity behind a tiny dataset. The Memory64 benchmark exercised an allocation path but not the browser bridge used by the product.

All three failures had the same shape: a narrow test passed while the real workflow remained wrong. The repair was to add end-to-end checks at the configuration, data, and integration boundaries.

The full debugging record is at https://posttrainllm.com/devlog.

Top comments (0)