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).
Mojo struct
GatedDeltaRecurrenceVerifyRingFwd
struct GatedDeltaRecurrenceVerifyRingFwd
Gated DeltaNet recurrence over a speculative verify window.
Produces the same recurrence_output as gated_delta_recurrence_fwd
without writing recurrent_state. Each token writes its decay, raw key
and delta factor to its request's ring row, which
gated_delta_state_fold applies to the pool once acceptance is known.
The verify width K is the length of verify_width, whose contents are
never read. At K == 0 there is no draft to reject, so this runs
gated_delta_recurrence_fwd on recurrent_state instead and writes no
ring record. The fold skips at the same width. At K > 0 a row of at
most one token and its drafts records; a longer row, as a prompt mixed
into a verify batch, records nothing and commits its state at its last
real token, so the graph folds it with zero. With skip_long_rows such
a row writes zeros over its outputs and leaves the state to the
caller's chunked forward.
Tensor Shapes: - recurrence_output : [total_seq_len, value_dim] (OUT) - qkv_conv_output : [total_seq_len, conv_dim] - decay_per_token : [total_seq_len, num_value_heads] - beta_per_token : [total_seq_len, num_value_heads] - recurrent_state : [max_slots, num_value_heads, KD, VD] (MUT) - ring : [ring_rows, num_key_heads, RING_LEN, record_stride] (MUT) - slot_idx : [batch_size] uint32 - ring_slot_idx : [batch_size] uint32 - input_row_offsets : [batch_size + 1] uint32 - verify_width : [K] int64
Implemented traitsโ
Methodsโ
executeโ
static def execute[skip_long_rows: Bool = False](recurrence_output: T, qkv_conv_output: T, decay_per_token: T, beta_per_token: T, recurrent_state: T, ring: T, slot_idx: T, ring_slot_idx: T, input_row_offsets: T, verify_width: T, ctx: DeviceContext)