Memory64 moved the browser ceiling and exposed an ABI gap
A 32-bit WebAssembly heap put the browser playground near a 4 GB ceiling. With weights and AdamW state, that limited the fp32 model size to roughly 250 million parameters. Compiling the same C++ source with Memory64 and BigInt support changed the pointer width. One measured run allocated 473,244,160 parameters in 3.7 seconds, completed a training step in 82.2 seconds, and freed the allocation…
Memory64 pushed the boundaries of the browser's WebAssembly capabilities, revealing a significant issue in the application binary interface (ABI). A 32-bit WebAssembly heap limited the browser ecosystem to a 4 GB cap, restricting the size of floating-point, 32-bit models to around 250 million parameters. However, by utilizing Memory64 and BigInt support, the pointer width changed, allowing for a larger allocation of 473,244,160 parameters in a mere 3.7 seconds. A full training step followed in 82.2 seconds before the memory was successfully freed.
While the 32-bit module could not achieve this feat, the discovery had broader implications. The JavaScript-to-WebAssembly bridge in the browser remained untested in the Node benchmark, causing pointer values to switch between Number and BigInt formats. Consequently, larger in-browser settings resorted to the 32-bit path, limiting their potential.
The outcome of this experiment revealed two crucial facts: Memory64 raised the theoretical allocation ceiling, and the product path still faced an ABI integration challenge. Despite this one-time success, it did not guarantee a seamless browser workflow. For further details, refer to https://posttrainllm.com/devlog.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.