Skip to main content

Module qwen_testing

Module qwen_testing 

Source
Expand description

Developer/debug Qwen4Exp numerical probes and explicitly selected developer decode. Diagnostic probe commands use NativeDecodeRequest::Developer; product generation uses –authority.

Functions§

run_decode_qwen4exp
Real multi-token Qwen4Exp generation: prompt → token embedding → PLE → all 48 trained layers (HC → GDN|QSA → HC → MoE) → final HC mixer → streamed output.weight argmax → native tokenizer decode. Every step streams rows from the C: PLE payload and E: trunk; no model residency.
run_probe_qwen4exp_gdn_moe_layer
Execute a fully connected trained recurrent/MoE layer. The explicit bounded scratch belongs to the CLI decode owner; core hot operators receive only caller-owned slices.
run_probe_qwen4exp_qsa
Execute the real QSA projection, four-cell indexer and sparse causal GQA path at position zero. It is deliberately a component probe: its cache is local to this call and no text/token-rate claim is made from it.
run_probe_qwen4exp_trace
Lab instrument: trace one real token step end-to-end. Every earlier prompt token runs through the full graph first so the traced step sees the same recurrent/cache state generation would; the traced step then reports a per-layer fingerprint/RMS/abs-max table plus the top-k vocabulary logits — this localizes which stage corrupts the forward signal instead of asserting aggregate correctness.