B200 profiling limits the HBM benefits of shared recurrent weights
AI summary
Profiling on an NVIDIA B200 found that a chain of eight matrix multiplications sharing one 72 MiB weight ran 24% faster than the same chain with eight copies while reading almost nothing from HBM. The advantage disappeared with a 288 MiB weight that exceeded L2 capacity, while a teaching implementation of Huginn Core reread weights from HBM across eight iterations, indicating that weight sharing saves storage but does not automatically reduce memory traffic.
In-depth insight
The results provide a concrete systems-level caution that recurrent weight reuse only reduces HBM reads when the relevant data remains cache-resident, based on one implementation and GPU platform.
| Do looped transformers, which reuse the same weights at every iteration, also save HBM traffic? In my new post I cover the looped architecture (Huginn), then model and measure its performance on a B200: how much data each iteration reads from memory, how long it takes, and why the shared weights usually don't stay on chip until the next iteration. A few results: - A chain of eight matmuls with one shared 72 MiB weight ran 24% faster than the same chain with eight identical copies, and read almost nothing from HBM. At 288 MiB, larger than L2, the difference disappeared. - In a full Huginn Core (teaching implementation, random weights), eight iterations took about eight times as long as one and read about eight times as much data from HBM. - Sharing saves storage, but by itself it doesn't stop the GPU from reading the weights from HBM again at every iteration. 👀Post: https://dinara-dl.github.io/posts/looped-transformer/ 🤖Code and raw Nsight Compute data: https://github.com/dinara-dl/looped-transformer I'd be curious whether anyone has tried keeping recurrent weights on chip across iterations, for example with a persistent kernel. submitted by /u/2dayyy6 [link] [comments] |