Downloads · 30 days
71
73% of all-time downloads
huluhuluu/qwen3-1.7b-executorch-qnn-htp
qwen3-1.7b-executorch-qnn-htp is a machine learning model from huluhuluu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for executorch. The card lists the license as apache-2.0.
Two ExecuTorch .pte artifacts of Qwen3-1.7B compiled for the Qualcomm Hexagon NPU (HTP), plus the complete 160-request latency measurement taken with them on two physical phones.
Downloads · 30 days
71
73% of all-time downloads
All-time downloads
97
Public
Repo size
3.5 GB
Likes
0
Public
Click a slice to open those files.
.pte3.5 GB · 100%
From the Hugging Face model README
Two ExecuTorch .pte artifacts of Qwen3-1.7B compiled for the Qualcomm
Hexagon NPU (HTP), plus the complete 160-request latency measurement taken with
them on two physical phones.
Both artifacts are fully measured: 160/160 requests completed on each device, with per-token device timestamps.
| File | Bytes | SHA-256 | Target |
|---|---|---|---|
sm8650/hybrid_llama_qnn.pte | 1,756,338,304 | 64992ae0461e22e420dadca6853911ffc6671d48aaf055e53812c62fc43bf0bc | Snapdragon 8 Gen 3, HTP v75 |
sm8750/hybrid_llama_qnn.pte | 1,755,494,528 | 29e73ba956a107151858621d7abd4b449e6213e3855cebf813cdfbe2f68628e5 | Snapdragon 8 Elite, HTP v79 |
Both files carry the FlatBuffer identifier ET12 at bytes 4–7 and contain
75 execution plans. Verified graph shapes (read back from the serialized
program, not from the build log):
prefill_forward : input_tokens [1, 128] attention_mask [1, 1, 128, 2048]
kv_forward : input_tokens [1, 1] attention_mask [1, 1, 1, 2048]
The filename hybrid_llama_qnn.pte is what upstream llama.py emits for
--model_mode hybrid; the llama in the name is the shared decoder harness,
not the model. This is Qwen3.
| Parameter | Value |
|---|---|
| Exporter | executorch/examples/qualcomm/oss_scripts/llama/llama.py |
--decoder_model | qwen3-1_7b |
--backend | htp |
--soc_model | SM8650 / SM8750 (one export each) |
--model_mode | hybrid |
--prefill_ar_len | 128 |
--max_seq_len | 2048 |
--max_context_len | 2048 |
--temperature | 0 (greedy) |
--num_sharding | 1 |
| Source checkpoint | Qwen/Qwen3-1.7B, converted to meta format by examples/models/qwen3/convert_weights.py (4,063,578,873 B .pth) |
--params | examples/models/qwen3/config/1_7b_config.json |
| Tokenizer | Qwen/Qwen3-1.7B tokenizer.json |
instruct_model | True |
masked_softmax | True |
transform_weight / r1 / r2 | False / False / False |
r3 | True |
seq_mse_candidates | 0 |
| Item | Value |
|---|---|
| Recipe | Qwen3_1_7BQuantRecipe (PTQ) |
| Linear / conv weights | use_16a4w_block, PER_BLOCK, block_size=(1, 16, 1, 1) |
| Other ops | use_16a4w, PER_TENSOR |
| Observer | MinMaxObserver |
| Calibration | 323 samples, batch_size=1, 323 batches, 1 h 44 m on host |
QNN SDK 2.40.0 (build_id 251030114326_189385), host torch 2.9.1+cu128,
--compile_only (compilation is host-side; no AI Hub job involved).
Serial FIFO replay, one resident runner per device, 160 requests executed contiguously with no restart. Greedy decoding, context 2048. TTFT is model-side; TPOT is the mean inter-token interval derived from adjacent device commit timestamps.
| Device | SoC / HTP | Requests | TTFT P50 | TPOT P50 | TPOT samples |
|---|---|---|---|---|---|
Redmi K70 Pro (23117RK66C) | SM8650 / v75 | 160/160 | 173.889 ms | 50.430 ms | 68,391 |
Realme (RMX5090) | SM8750 / v79 | 160/160 | 145.397 ms | 49.857 ms | 68,500 |
Per-dataset TTFT P50 / TPOT P50 (ms):
| Dataset | Redmi TTFT | Redmi TPOT | Realme TTFT | Realme TPOT |
|---|---|---|---|---|
| gsm8k | 541.589 | 49.810 | 450.768 | 49.179 |
| humaneval | 131.666 | 50.519 | 110.975 | 50.071 |
| math500 | 87.892 | 50.472 | 76.111 | 49.797 |
| mt_bench | 176.935 | 50.557 | 154.931 | 50.072 |
SLO attainment (against the per-request TTFT/TPOT targets carried in the workload): Redmi 0.3812 / 0.2301, Realme 0.3875 / 0.2398.
160 requests, 40 each from gsm8k / humaneval / math500 / mt_bench. Prompts are
pre-tokenized and replayed as input_ids, so no chat template is applied twice.
max_new_tokens is per-request from the workload (628–1849).
| File | Rows | SHA-256 |
|---|---|---|
results/redmi-sm8650/result_full.jsonl | 160 | 70360a8707f5f5b4f9d39799ba059b3355913ccb0b062ad23125ea5b8441d4e3 |
results/realme-sm8750/result_full.jsonl | 160 | ec295ac149691660c4fa010d2c2582d996a3dd644fd983cd5c6a92ae3e6cf2d7 |
results/realme-sm8750/result_full.sm8750.jsonl | 160 | 5494f8fac12cb8c88d33dca7848acde02d115d580e271a4aa88e4cc4d452c9d6 |
Known metadata defect in the Realme raw result. The deployed replay runner
wrote soc_model=SM8650 unconditionally on every row. The actual target was
SM8750/v79 with qwen3_1_7b_hybrid_sm8750.pte. result_full.jsonl is the
untouched device output and is kept as-is; result_full.sm8750.jsonl changes
only the soc_model field. An object-by-object comparison after removing
that key confirmed every other field is identical. Reports were generated from
both.
Each result row was validated for: exact workload request order, status=ok,
completion_tokens == output_tokens == len(token_trace), contiguous
token_index, and strictly increasing device_commit_ns.
python executorch/examples/qualcomm/oss_scripts/llama/llama.py \
--artifact <out> --build_folder <android-build> \
--soc_model SM8650 --backend htp \
--decoder_model qwen3-1_7b \
--checkpoint qwen3-1.7b-meta.pth \
--params executorch/examples/models/qwen3/config/1_7b_config.json \
--tokenizer_model <Qwen3-1.7B>/tokenizer.json \
--model_mode hybrid --prefill_ar_len 128 \
--max_seq_len 2048 --max_context_len 2048 \
--temperature 0 --compile_only
On device, via qnn_llama_replay_runner:
--decoder_model_version qwen3 --eval_mode 1 \
--max_context_len 2048 --temperature 0
ADSP_LIBRARY_PATH must include the runner directory alongside the platform
DSP paths, or QNN device creation fails with error 14001.
These artifacts were produced for a serial-arrival, single-request latency comparison across on-device inference frameworks. Batch size is 1 and there is no continuous batching or speculative decoding. Accuracy was not evaluated — only latency and token-trace integrity.