For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
gated_delta_state_fold
gated_delta_state_fold()
max.nn.state_space.gated_delta_state_fold(recurrent_state, ring, row_ids, ring_row_ids, num_accepted, verify_width)
Applies a verify’s accepted ring records to the state pool.
Advances recurrent_state over the first num_accepted[b] records
written by gated_delta_recurrence_verify_ring_fwd(), for every
layer in one launch. A row with num_accepted[b] == 0 is left
unchanged. Nothing runs at a verify width of zero, where the verify wrote
no records.
-
Parameters:
-
- recurrent_state (BufferValue) – The
[max_slots, nv, KD, VD]live pool, folded in place. - ring (BufferValue) – The
[ring_rows, nk, RING_LEN, record_stride]ring pool. - row_ids (TensorValue) – The
[num_layers, batch_size]live pool rows. - ring_row_ids (TensorValue) – The
[num_layers, batch_size]ring rows. - num_accepted (TensorValue) – The
[batch_size]records to fold. A count pastRING_LENnames a row the verify was too long to record and committed itself, and is skipped. - verify_width (TensorValue) – The operand
verify_width_operand()returns.
- recurrent_state (BufferValue) – The
-
Return type:
-
None