pymllm.layers.attention.gdn_chunkwise ===================================== .. py:module:: pymllm.layers.attention.gdn_chunkwise .. autoapi-nested-parse:: Chunkwise parallel GDN extend (prefill) using WY representation. Implements the WY decomposition from the Gated DeltaNet paper to parallelize the GDN recurrent scan over token chunks. Within each chunk the key operations (output and state computation) are expressed as batch matrix multiplications, enabling efficient GPU utilisation. The inter-chunk state propagation remains sequential, but reduces the number of iterations from T to ceil(T / C) where C is the chunk size. Algorithm (per chunk of C tokens with initial state S_0) --------------------------------------------------------- 1. **WY construction** (sequential, O(C²K) per head): w_i = β_i k_i - K_{