Last updated: 2026-07-19
CUDA Runtime
Dbg Cuda
CUDA forward-pass debug harness for the qwen35 hybrid-SSM model. Two modes:
zig build cuda-dbg -- <token> [model.gguf] Per-layer residual-norm dump at pos 0 (used to pinpoint the attention gate bug: diff vs a reference implementation eval-callback `l_out-N` reference).
zig build cuda-dbg -- gen <id,id,...> <ngen> [model.gguf] Autoregressive greedy generation from a prompt token-id list. Prefills the ids (exercising pos>0 RoPE + multi-entry attention + SSM state carry), then greedily emits ngen tokens. Diff GEN_IDS vs `/tmp/gen` (the reference implementation greedy) to validate the full decode path beyond pos 0.
Read-only w.r.t. the engine — uses only public ForwardCuda methods.
1 exports shown
function
main
pub fn main() !void No public doc comment yet.