Qwen3.5-9B-XeFP4

Qwen/Qwen3.5-9B quantized to XeFP4, an open 4-bit weight format for Intel Arc GPUs. It runs on XeQ Runtime, the OpenCL engine for XeFP4: https://github.com/kinoqdev/XeFP4.

These files do not load in transformers, llama.cpp or vLLM. They need XeQ Runtime. This repository contains the text model only.

Files

File Size SHA-256 (.bin) Content
q35_xe8g32e.bin + .json 5,086,524,416 B 836be8828035e06335172770423cf3c1a49eec4a70ef1906aa0022e589ef5b04 main model (revision 2)
q35_mtp_xe8.bin + .json 124,672,000 B 618855959c215c74dfcb7da151471e7ad042890a7ef6273e5dbecce3669fc640 MTP head for speculative decoding (optional)
vocab_order.npy 993,408 B b40ec3751835a586b201f86e4ef489d8e911c930a265dc66869d3beab5fb6314 token order used by the MTP draft step
tokenizer.json, tokenizer_config.json, chat_template.jinja from the source model
LICENSE, NOTICE

.json header SHA-256: q35_xe8g32e.json 9efb271ffbe9aab594735ce4bf477b1c8ba6926da282faf306375403465cd2d9, q35_mtp_xe8.json c2a4b472ee475b89d92eede248213243e9dbe4cf9cbef7fc29fd2e7629874782.

Revision 2 (2026-11-20): the main model was re-encoded with an error-compensating encoder and multilingual calibration data (see Quantization). The file format, size and speed are unchanged; perplexity loss against BF16 dropped from +4.9% to +2.0%. The MTP head, tokenizer and vocab_order.npy are unchanged. The first release (.bin SHA-256 d9fcd99cdfe154e7bfbe2a89b5e18eb977c47f0db6a1355331ec7b878b161bcf) stays in the repository history.

Usage

git clone https://github.com/kinoqdev/XeFP4 && cd XeFP4
pip install -r requirements.txt
python -m xeq selftest <path to this repository>
python -m xeq run <path to this repository> -p "Explain Rayleigh scattering in two sentences."
python -m xeq serve <path to this repository> --port 8080 --ctx 32768

MTP is used automatically when q35_mtp_xe8.bin is present (--no-mtp turns it off).

Quantization

Part Format
all linear layers XeFP4-8: E2M1 values, block 32, 3-bit block factor, FP16 row scale (4.097 bits/weight)
embedding XeFP4-8
lm_head INT8, per-row FP32 scale
MTP layer XeFP4-8 (fc split by input half)
norms, gates, conv, A_log, dt_bias FP32

Linear layers use an error-compensating (GPTQ-style) encoder: columns are encoded in order and each column's rounding error is passed on to the columns not yet encoded, weighted by the layer's input statistics; block factors and row scales are chosen with the same statistics. Calibration: 128 sequences ร— 512 tokens, none from the evaluation sets: English web text (FineWeb, 28), Korean (Wikipedia, news, chat; 33), code in 12 languages and Markdown (Stack-Edu, 28), and multilingual chat in 15 languages (OpenAssistant oasst2, 39). The embedding uses the specification's reference encoder. Any XeFP4 decoder reads the file; only the choice of stored values differs. The format is specified in XEFP4_SPEC.md.

Performance

Intel Arc A770 16 GB (driver 32.0.101.9150), batch 1, greedy decoding, scripted benchmark (2026-11-17, first release). Revision 2 has the same size and kernels, so MTP-off speed is the same (checked on the Arc 140T). MTP-on speed depends on the draft acceptance rate, which changes slightly with the re-encoded model (see the note under the table).

decode tok/s prefill tok/s
XeFP4, MTP off 65.7 2,499 (2K tokens)
XeFP4, MTP on (acceptance 0.91) 94.2
llama.cpp b11053 SYCL, Q4_K_M (6.2 GB) 37.9 836 (512)
llama.cpp b11053 SYCL, IQ4_XS (5.5 GB) 35.5 834 (512)
OpenVINO 2026.4.1 GenAI INT4, MTP off / on 46.0 / 56.7 2,448

Long context (Korean text):

context prefill tok/s decode, MTP off decode, MTP on
2K 2,499 63.6 86.2
8K 2,362 56.5 84.8
16K 2,107 49.7 76.0
32K 1,738 39.7 62.7
  • llama.cpp Q4_K_M decode at depth 16K: 27.4 tok/s.
  • MTP-on figures depend on the text (the draft acceptance rate varies). The long-context rows were measured on Korean prose; reproduce with python -m xeq bench <folder> --text <file>.
  • MTP speculative decoding gives the same output tokens as greedy decoding without MTP (checked at every length above).
  • Arc 140T (Xe-LPG+, Core Ultra iGPU, driver 32.0.101.9033): decode 13.8 tok/s (MTP off) / 23.0 tok/s (MTP on, short prompt); 32K context 7.1 tok/s (MTP off); prefill 2K tokens in 2.9 s (about 700 tok/s), 16K in 30 s (first release).
  • XeQ Runtime update (2026-11-20), revision 2: prefill on the A770 at 2K / 8K / 16K / 32K tokens 3,117 / 2,903 / 2,532 / 2,021 tok/s (the 11-17 engine in the same run: 2,494 / 2,358 / 2,104 / 1,735); decode unchanged (66.0 tok/s, MTP 99.0); output tokens unchanged. Arc 140T: 4K-token prefill about 670โ€“780 tok/s. A follow-up chat turn reuses the previous prompt (chat cache): 5K-token conversation, next turn prefilled in 0.32 s (A770) / 0.7 s (140T).
  • XeQ Runtime update (2026-11-21): MTP drafts two tokens per step: decode with MTP on the A770 108.4 tok/s (99 with one draft), MTP off unchanged (66.0). Prefill at 2K / 8K / 16K / 32K tokens 3,129 / 3,017 / 2,827 / 2,509 tok/s (new prefill attention; FP16 KV cache by default). Output tokens unchanged.
  • Revision 2 on the Arc 140T, four chat prompts, 200 tokens: MTP off 14.4โ€“14.5 tok/s; MTP on 19.4 (English explanation), 21.6 (code), 21.6 (math), 18.6 (Korean) tok/s. Draft acceptance changed from the first release by โˆ’0.09 (English), 0.00 (code), +0.03 (math) and +0.02 (Korean).

Accuracy

Perplexity on 16 FineWeb documents ร— 512 tokens (lower is better):

size perplexity
BF16 โ€“ 11.164
XeFP4 revision 2 (this model) 5.09 GB 11.388 (+2.0%)
XeFP4 first release 5.09 GB 11.707 (+4.9%)
GGUF IQ4_XS 5.5 GB 11.341 (+1.6%)
GGUF Q4_K_M 6.2 GB 11.267 (+0.9%)

The XeFP4 rows were measured with XeQ Runtime on an Arc 140T (token by token). BF16 and GGUF rows come from a reference evaluation on the same documents; the same reference evaluation gave 11.682 for the first release, so the two methods differ by about 0.2%.

Other text types, XeQ Runtime on the Arc 140T, 8 sequences ร— 512 tokens each (not in the calibration data):

first release revision 2
Korean Wikipedia 4.400 4.331 (โˆ’1.6%)
code (Python, C++, JavaScript, Rust, Java, Go, TypeScript, Swift) 2.640 2.619 (โˆ’0.8%)
Markdown 8.186 7.963 (โˆ’2.7%)
multilingual chat (en, es, ru, zh, de, fr, pt, ca; oasst2 validation) 4.866 5.083 (+4.5%)

The chat result is dominated by a few tokens in one document (a list with a repeated "rating: x/10" line); without tokens whose loss changed by more than 3 nats it is +2.7%. With one document per language, per-language figures are noisy.

HumanEval-C++ (first release; not re-run for revision 2) (161 problems, greedy, up to 1,024 new tokens, then up to 2 retries with the compiler or test error):

first attempt after retries
INT8 weights (reference, same prompts) 134 / 161 143 / 161
XeFP4 (this model), MTP on 126 / 161 136 / 161

Measured on an Arc 140T. On the same problems, 11 passed only with INT8 and 3 only with XeFP4 (first attempt, exact McNemar p = 0.057).

Sampling

Decoding is greedy by default (same output every time; best for code, facts, translation and tool calls). For open-ended chat, writing and thinking mode (--think), turn on sampling with --temperature, --top-p, --top-k, --min-p, --presence-penalty, --repetition-penalty and --seed (the server reads the same fields from the request). Source model recommendations: non-thinking chat temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5; thinking mode temperature 1.0, top_p 0.95, top_k 20, presence_penalty 1.5 (0.6 / 0.95 / 20 / 0 for precise coding). top_k is capped at 64. Since the 2026-11-21 engine, sampled requests decode without MTP (the two-draft MTP is greedy only; XEQ_Q35_MTPN=1 restores one-draft MTP, which keeps the output distribution of plain decoding); sampling itself costs 2โ€“3% of decode speed. The benchmarks above use greedy decoding.

Limitations

  • Tested on Intel Arc A770 (Xe-HPG) and Arc 140T (Xe-LPG+). Other Intel GPUs are untested.
  • Text only. The source model's vision encoder is not included.
  • Batch size 1.
  • Prefill and token-by-token decoding differ slightly numerically, so greedy output can differ at near-tie positions.
  • Accuracy is close to GGUF IQ4_XS and below Q4_K_M (see above).
  • Revision 2 output tokens were checked on the Arc 140T and the Arc A770 (same tokens).

License and attribution

  • Derived from Qwen3.5-9B by the Qwen team (Alibaba Cloud), licensed under Apache-2.0.
  • The weights were modified by quantization to the XeFP4 format.
  • See LICENSE and NOTICE.
  • XeFP4 and XeQ Runtime are not affiliated with or endorsed by Alibaba Cloud or Intel.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for KINOQ/Qwen3.5-9B-XeFP4

Finetuned
Qwen/Qwen3.5-9B
Quantized
(749)
this model