Qwen3-4B-Thinking-2507 for ExecuTorch
ExecuTorch exports of Qwen/Qwen3-4B-Thinking-2507 (revision 768f209d9ea8) for on-device inference with the openweights Android app or any ExecuTorch 1.5.1 runtime.
Files
Windows in this repo: XNNPACK (CPU) at 2k to 32k; Vulkan (GPU) at 2k to 32k. The window is fixed inside the file: the runtime allocates the whole KV cache at load, so pick the largest window the device can hold (fits_phone_budget in each folder's config.json is the estimate against a 5 GB budget).
| Backend | Target | File | Window | Size | Smoke test |
|---|---|---|---|---|---|
| XNNPACK (CPU) | any arm64 | xnnpack/Qwen3-4B-Thinking-2507-8da4w-gptq-2k.pte |
2,048 tokens | 2.66 GB | passed ("Paris") |
| XNNPACK (CPU) | any arm64 | xnnpack/Qwen3-4B-Thinking-2507-8da4w-gptq-4k.pte |
4,096 tokens | 2.66 GB | passed ("Paris") |
| XNNPACK (CPU) | any arm64 | xnnpack/Qwen3-4B-Thinking-2507-8da4w-gptq-8k.pte |
8,192 tokens | 2.67 GB | passed ("Paris") |
| XNNPACK (CPU) | any arm64 | xnnpack/Qwen3-4B-Thinking-2507-8da4w-gptq-16k.pte |
16,384 tokens | 2.69 GB | passed ("Paris") |
| XNNPACK (CPU) | any arm64 | xnnpack/Qwen3-4B-Thinking-2507-8da4w-gptq-32k.pte |
32,768 tokens | 2.72 GB | passed ("Paris") |
| Vulkan (GPU) | any arm64 | vulkan/Qwen3-4B-Thinking-2507-vulkan-8da4w-gptq-2k.pte |
2,048 tokens | 3.42 GB | structure checked (no host NPU runtime) |
| Vulkan (GPU) | any arm64 | vulkan/Qwen3-4B-Thinking-2507-vulkan-8da4w-gptq-4k.pte |
4,096 tokens | 3.43 GB | structure checked (no host NPU runtime) |
| Vulkan (GPU) | any arm64 | vulkan/Qwen3-4B-Thinking-2507-vulkan-8da4w-gptq-8k.pte |
8,192 tokens | 3.46 GB | structure checked (no host NPU runtime) |
| Vulkan (GPU) | any arm64 | vulkan/Qwen3-4B-Thinking-2507-vulkan-8da4w-gptq-16k.pte |
16,384 tokens | 3.51 GB | structure checked (no host NPU runtime) |
| Vulkan (GPU) | any arm64 | vulkan/Qwen3-4B-Thinking-2507-vulkan-8da4w-gptq-32k.pte |
32,768 tokens | 3.61 GB | structure checked (no host NPU runtime) |
Tokenizer: tokenizer.json, copied unchanged from the source repo. Each backend folder has a config.json listing every window as a variant with the metadata the .pte reports, and an export-report-<window>.json per file with the full export record.
Memory
- XNNPACK (CPU) at 2,048 tokens: the KV cache costs 294,912 bytes per token (fp32), 603,979,776 bytes for the whole window, allocated in full when the model loads.
- XNNPACK (CPU) at 4,096 tokens: the KV cache costs 294,912 bytes per token (fp32), 1,207,959,552 bytes for the whole window, allocated in full when the model loads.
- XNNPACK (CPU) at 8,192 tokens: the KV cache costs 294,912 bytes per token (fp32), 2,415,919,104 bytes for the whole window, allocated in full when the model loads.
- XNNPACK (CPU) at 16,384 tokens: the KV cache costs 294,912 bytes per token (fp32), 4,831,838,208 bytes for the whole window, allocated in full when the model loads.
- XNNPACK (CPU) at 32,768 tokens: the KV cache costs 294,912 bytes per token (fp32), 9,663,676,416 bytes for the whole window, allocated in full when the model loads.
- Vulkan (GPU) at 2,048 tokens: the KV cache costs 294,912 bytes per token (fp32), 603,979,776 bytes for the whole window, allocated in full when the model loads.
- Vulkan (GPU) at 4,096 tokens: the KV cache costs 294,912 bytes per token (fp32), 1,207,959,552 bytes for the whole window, allocated in full when the model loads.
- Vulkan (GPU) at 8,192 tokens: the KV cache costs 294,912 bytes per token (fp32), 2,415,919,104 bytes for the whole window, allocated in full when the model loads.
- Vulkan (GPU) at 16,384 tokens: the KV cache costs 294,912 bytes per token (fp32), 4,831,838,208 bytes for the whole window, allocated in full when the model loads.
- Vulkan (GPU) at 32,768 tokens: the KV cache costs 294,912 bytes per token (fp32), 9,663,676,416 bytes for the whole window, allocated in full when the model loads.
How it was made
- XNNPACK (CPU) any arm64: ExecuTorch 1.5.1
export_llm: 8-bit dynamic activations and 4-bit weights in groups of 32, int8 per-channel embeddings, XNNPACK with extended ops, prefill chunk 2048, fp32 KV cache. - Vulkan (GPU) any arm64: ExecuTorch 1.5.1
export_llm: 8-bit dynamic activations and 4-bit weights in groups of 32, int8 per-channel embeddings, the Vulkan delegate, prefill chunk 2048, fp32 KV cache.
License
A quantized derivative of Qwen/Qwen3-4B-Thinking-2507, distributed under the same terms (apache-2.0).
The upstream license files are included unchanged: LICENSE.
- Downloads last month
- 188
Model tree for experimentalmachines/Qwen3-4B-Thinking-2507-ExecuTorch
Base model
Qwen/Qwen3-4B-Thinking-2507