Qwen3-0.6B: QNN HTP produces degenerate output at all precisions (XNNPACK correct on same device)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 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
attach logs and repro configs in comments.
cc @cccclai @cbilgin @abhinaykukkadapu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QNN HTP and XNNPACK paths for the shared Qwen3-0.6B edge program, using a fixed input and the CPU reference. Compare per-layer intermediate tensors to identify the first divergence, then document the diverging op and confirm whether it explains the token-id-0 output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- machine-learning, python
- Domain
- embedded-iot, machine-learning, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100