Gated DeltaNet: Projections and Head Shapes
Easy · Solved in PyTorch · Machine learning coding practice
Problem
Implement the input branches of Gated Delta Networks: Improving Mamba2 with Delta Rule (Yang, Kautz and Hatamizadeh, 2024). Six independent linear maps split the hidden state x of shape (B,T,D) into per-head query, key, value, retention, write, and output-gate streams. weights holds the six matrices in output-by-input layout, num_heads is H, and beta_bias has shape (H,).
Topics: gated-deltanet, linear-attention, llm-internals
The full statement, worked examples, hints and the test suite are available once you sign in. You can then solve Gated DeltaNet: Projections and Head Shapes in the browser and run it against the tests.