Downloads · 30 days
14
61% of all-time downloads
mlboydaisuke/Qwen3.5-4B-ExecuTorch
Qwen3.5-4B-ExecuTorch is a text generation model from mlboydaisuke. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Downloads · 30 days
14
61% of all-time downloads
All-time downloads
23
Public
Repo size
5.6 GB
Likes
0
Public
Click a slice to open those files.
.pte2.8 GB · 100%
From the Hugging Face model README
qwen3_5_4b_xnnpack_8da4w_e8.pte (2810.9 MB)
embedding_quantize: "8,0"). The
248320-row embedding is the reason: left in fp32 it is a gigabyte on its own, and at this
vocabulary size that is most of what a small model weighs.export_llm, static shape (seq_len=1), max_seq_length 2048,
XNNPACK extended_opsllm_params/qwen3_5_4b_xnnpack_8da4w_e8.yamlllm_params/gen_static.py, token-by-token prefill then greedy decode, a fresh process per
prompt so no answer is read through the previous one's cache:
| prompt | answer | decode |
|---|---|---|
| capital of France? | opens a <think> block, reasons, answers Paris | 19.10 tok/s |
| 日本の首都は? | reads the question back in both languages, then answers | 19.10 tok/s |
This size reaches for its thinking mode on questions the 2B answers outright, so a short
max_new may cut it off mid-thought. Budget for it.
Chat template: ChatML, bos 248045, eos [248046, 248044].
Not measured on a phone, and at 2.8 GB it is the largest text model on this shelf. The
0.8B was measured at 10.5
tok/s on an iPhone 17 Pro, but on its earlier build, before use_sdpa_with_kv_cache was
turned on; the 2B is the middle
of the three.
Both rates above are from one run with nothing else on the machine.
use_sdpa_with_kv_cache: True. Upstream's own qwen3_5 config has it off with no reason
given, while the equally hybrid lfm2 config has it on. Measured on the 2B in one run:
8.20 tok/s off, 16.64 on.
That it is only a kernel swap and not a different model was checked three ways: three of four prompts came out token-identical; the first-step logits agree at corr 0.995 with the same top-1; and 338 tokens deep they agree at corr 0.990, same top-1 and top-2. The fourth prompt differs where a thinking model decides how long to think, which is a near-tie either way.
python llm_params/gen_static.py \
--pte qwen3_5_4b_xnnpack_8da4w_e8.pte \
--tokenizer tokenizer.json \
--prompt $'<|im_start|>user\nWhat is the capital of France?<|im_end|>\n<|im_start|>assistant\n' \
--eos_ids "[248046,248044]"
The 8-bit embedding needs from executorch.kernels import quantized before the program is
loaded. Without it the method will not even load — kernel 'quantized_decomposed::embedding_byte.dtype_out' not found — which reads like a broken
export rather than a runtime missing its kernels.
(conversion scripts: executorch-models · iOS sample: executorch-samples)