Dory - NVIDIA's Looped Transformer

NVIDIA’s Dory is a 4-billion-parameter looped transformer model that increases effective depth by repeatedly looping a recurrent block of layers per token, enabling deeper computation without increasing unique parameters or GPU memory usage. This approach allows elastic compute at inference, improves reasoning and output quality with more loops, and shows competitive performance against larger models, suggesting a scalable alternative to traditional transformer architectures.

The video discusses NVIDIA’s Dory, a 4-billion-parameter looped transformer model that introduces a novel approach to scaling transformer depth by looping the same set of layers multiple times per token. Unlike traditional transformers that process each layer once, Dory divides its layers into three blocks: an input block, a recurrent block that loops multiple times, and an output block. This looping mechanism allows the model to refine token representations progressively, effectively increasing model depth without increasing the number of unique parameters or GPU memory usage. The number of loops can be adjusted at inference time, enabling elastic compute where more loops mean more compute per token but the same memory footprint.

Dory’s architecture consists of 16 layers in the input block, 40 layers in the recurrent block, and 16 layers in the output block. The recurrent block’s weights are shared and reused across loops, similar to residual connections in ResNet models, which helps the model “reread” and refine its understanding of the input. This design allows the model to achieve effective depths of up to 192 layers with four loops, while still fitting within the memory constraints of a 4B parameter model. However, the KV cache size grows with the number of loops, which can impact memory usage during inference.

Performance-wise, Dory competes well against larger models like the 26B-parameter Gemma 4, especially in tasks involving instruction following and long-context reasoning. While it does not outperform larger mixture-of-experts models on knowledge-intensive benchmarks, the looped transformer approach shows promise for agentic tasks that benefit from iterative reasoning. The video demonstrates that increasing the number of loops generally improves output quality and reasoning detail, though the improvements are not uniform across all prompts or tasks.

The presenter also explores the internal workings of Dory by extracting intermediate states from each loop iteration, revealing that the model becomes more confident and precise in its token predictions with more loops. This insight suggests potential for adaptive inference strategies, where easier queries could be processed with fewer loops and harder ones with more, optimizing compute resources dynamically. Currently, running multiple loop configurations requires separate instances, but future systems might automatically route queries to the appropriate loop depth.

In conclusion, Dory exemplifies a promising direction in transformer model design by enabling deeper computation without increasing parameter count or memory footprint significantly. This looped transformer concept could offer a scalable alternative to large mixture-of-experts models, especially as model sizes grow. The video encourages further exploration of looped transformers, including training strategies and broader applications, and speculates that future models like GPT-6 might adopt similar architectures. The presenter invites feedback and interest in more detailed coverage of looped transformers in upcoming videos.

Useful Links