Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ base_model: microsoft/Phi-tiny-MoE-instruct
|
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
---
|
| 7 |
|
| 8 |
-
# Phi-tiny-MoE — Hexagon v79 NPU bundle (QHexRT)
|
| 9 |
|
| 10 |
**microsoft/Phi-tiny-MoE-instruct** (PhiMoEForCausalLM, 3.8 B total / **1.1 B active**, 16 experts top-2)
|
| 11 |
compiled to run on the **Qualcomm Hexagon v79 NPU** (Snapdragon 8 Elite / SM8750, e.g. Galaxy S25) through
|
|
@@ -76,3 +76,21 @@ adb shell "cd /data/local/tmp/phimoe && export ADSP_LIBRARY_PATH='/data/local/tm
|
|
| 76 |
coherent (the prior-port finding — int8 is the accuracy/memory sweet spot, W4 too coarse).
|
| 77 |
|
| 78 |
Built with the `npu-forge` toolkit (weights → oracle-gated NPU graphs). Base model + tokenizer © Microsoft (MIT).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
---
|
| 7 |
|
| 8 |
+
# Phi-tiny-MoE — Hexagon v79 + v81 NPU bundle (QHexRT)
|
| 9 |
|
| 10 |
**microsoft/Phi-tiny-MoE-instruct** (PhiMoEForCausalLM, 3.8 B total / **1.1 B active**, 16 experts top-2)
|
| 11 |
compiled to run on the **Qualcomm Hexagon v79 NPU** (Snapdragon 8 Elite / SM8750, e.g. Galaxy S25) through
|
|
|
|
| 76 |
coherent (the prior-port finding — int8 is the accuracy/memory sweet spot, W4 too coarse).
|
| 77 |
|
| 78 |
Built with the `npu-forge` toolkit (weights → oracle-gated NPU graphs). Base model + tokenizer © Microsoft (MIT).
|
| 79 |
+
|
| 80 |
+
## v81 (SM8850 / soc_model 87) — DECODE-ONLY
|
| 81 |
+
|
| 82 |
+
Device-validated on SM8850: *"What is the capital of France?"* -> **"The capital of France is Paris. It is not
|
| 83 |
+
only the country's largest city but also a global center for art"** — coherent, greedy first token 450 (= the
|
| 84 |
+
PyTorch gold), **~5.7 tok/s** decode (matches v79), TTFT 1.7 s for a 10-token prompt (decode-over-prompt).
|
| 85 |
+
|
| 86 |
+
**Why decode-only:** the full 7-context bundle (64 graphs incl. batched prefill) **crashes the v81 cDSP** — the
|
| 87 |
+
unsigned protection-domain heap is exhausted during `Graph::setup_vtcm` in `libQnnHtpV81Skel.so` (fastrpc
|
| 88 |
+
`0x8000040d` AEE_ENOMEMORY -> remoteproc-cdsp fatal, recovery disabled -> full device reboot). NOT host RAM
|
| 89 |
+
(12.7 GB free). The `v81/` bundle therefore ships the **4 decode contexts only** (a_lo/a_hi/ffn2/lmhead_ar1);
|
| 90 |
+
`phimoe_generate` auto-falls-back to decode-over-prompt (the batched-prefill graphs are optional). Trade-off:
|
| 91 |
+
slower TTFT on long prompts; identical decode quality/speed. (v79 keeps the full batched-prefill bundle.)
|
| 92 |
+
|
| 93 |
+
### Files (`v81/`)
|
| 94 |
+
`phimoe.json` (decode-only manifest) · `a_lo.bin` `a_hi.bin` (decode attn+router a0..a31) · `ffn2.bin` (fused
|
| 95 |
+
2-expert FFN) · `lmhead_ar1.bin` (final-norm + lm-head, input `h`) · `experts_i8.bin` (int8 experts, host) ·
|
| 96 |
+
`experts_scale.f32` · `embed_f16.bin` · `tokenizer.json` (+ config/special-tokens).
|