Expand description
Compatibility exports for the canonical Etalon Qwen engine.
Structs§
- QsaState
- Persistent cache for one QSA layer. Keys are RoPE-rotated before entry; indexer keys deliberately remain raw because pooling precedes its norm and positional rotation. Storage is supplied by the runtime owner.
- Streamed
QsaBuffers - Reused scratch for one QSA step.
selectedandscoresare bounded by the caller-owned cache capacity; no logits or cache-sized heap object is created by the operator.
Enums§
Constants§
- QWEN4EXP_
QSA_ COMPRESS_ RATIO - QWEN4EXP_
QSA_ HEAD_ DIM - QSA is 24×256 GQA, separate from the GatedDeltaNet 48×128 geometry.
- QWEN4EXP_
QSA_ INDEXER_ HEADS - QWEN4EXP_
QSA_ INDEXER_ HEAD_ DIM - The lightweight indexer remains four 128-wide heads.
- QWEN4EXP_
QSA_ KV_ HEADS - QWEN4EXP_
QSA_ MAX_ SELECTED - Maximum tokens reachable per step:
token_topkblock members plus the open group’s causal tail (ratio - 1), matchingselect_width. - QWEN4EXP_
QSA_ QUERY_ HEADS - QWEN4EXP_
QSA_ ROTARY_ DIM - Qwen4Exp rotates only the first 64 dims of each attention/indexer head
(partial NeoX RoPE,
qwen4exp.rope.dimension_count). - QWEN4EXP_
QSA_ TOP_ BLOCKS - Complete blocks selectable per step (
index_budget // index_ratio). - QWEN4EXP_
QSA_ TOP_ K - Trained indexer budget in TOKENS (
qwen4exp.attention.indexer.top_k= 2048): complete four-token blocks compete forTOP_K / COMPRESS_RATIOslots and the members of the still-open trailing group are always visible.
Functions§
- execute_
streamed_ qsa - Execute one causal QSA decode step.
rope_thetais explicit so the bounded operator cannot silently invent a positional encoding policy; the Qwen4Exp runtime passes the GGUF model value (10,000,000 for this model).