Qwen3-0.6B: QNN HTP produces degenerate output at all precisions (XNNPACK correct on same device)
š Describe the bug
Qwen3-0.6B produces token id 0 every decode step through QNN HTP, at both 16a4w and 8a8w. Same weights/device/binary via XNNPACK produces correct output.
Environment
Snapdragon XR2 Gen 2 (SXR2230P), HTP v69, QNN SDK 2.37, Quest 3, ExecuTorch main.
Same-device A/B
XNNPACK and QNN .pte exported from the same edge program. Weights, tokenizer, runner binary all identical.
Ruled out
- Quantization ā 8a8w (near-lossless) equally broken
- Model def / weights / export ā shared with XNNPACK path, which is correct
- Softmax ā forced all 28 softmax ops to CPU, still degenerate
Qwen3 features that differ from Llama (suspects)
- XNNPACK (CPU, same device): ā Correct tool call, stops on EOS
- QNN HTP (qnn_8a8w): ā Token id 0 every step, never stops
- QNN HTP (qnn_16a4w): ā Same
Gemma 3 (1B) shares qk-norm and head_dim mismatch ā testing on HTP to narrow urther.
Ask
Per-layer intermediate tensor diff (QNN vs CPU reference, fixed input) to find the first diverging op. Op-skipping can't isolate further ā skipping RMSNorm/RoPE
Versions
cc @cccclai @cbilgin @abhinaykukkadapu
@psiddh this looks like the right kind of failure to debug with device-backed intermediate checks, not another export sanity pass.
The important detail is: Qwen3-0.6B returns token id 0 every decode step on QNN HTP for both qnn_8a8w and qnn_16a4w, but the same weights/tokenizer/runner binary produce correct output through XNNPACK on the same Quest 3 / Snapdragon XR2 Gen 2 setup. Since 8a8w is also broken and forcing all 28 softmax ops to CPU did not change it, Iād stop treating this as a generic quantization or softmax issue.
The next check Iād run is first-divergence evidence from a fixed prompt: QNN HTP vs CPU reference, per-layer tensor diff, with op residency captured so you can see whether the failing layer actually stayed on HTP or silently moved.
EdgeGate is built for exactly that NPU residency + per-layer diff gate: https://edgegate.frozo.ai