Repository navigation
Gemma 4 E4B on the Intel Arc Pro B70 (Xe2) - #1552
Conversation
…ged GPU profile, window test
… to the decode step
…a host timing line
|
Thank you @Mirrdhyn, this is a big, careful piece of work. We especially value the receipts for the other XPU models (identical machine code for the existing GEMMs, and concurrent equal to alone). We'd like to land it in 1.2.0. Two things first:
A small optional one: Everything else looks good to us. The rebase onto current main is clean, formatting and whitespace checks pass, and the new |
…sampled rows from the card
…ntion kernels, copy_match 4
…t-equal across window cuts
…e bits, qkv 20 to 14.5 us)
…th a card-against-host check of them
|
Thanks for the careful review. All three are fixed inside the commits that introduced them, so no path stays in history:
The branch diff against the previous head is these three files only (+21/-28). Rechecked on the B70 against the previous head: logits of the 14 reference prompts byte-equal ( |
|
Thank you @Mirrdhyn. This is in TensorFold 1.2.0, released today: https://github.com/ashhart/TensorFold/releases/tag/v1.2.0 It landed with your commits under your own name, so you're listed as a TensorFold contributor, and it's credited to you in the release notes and the changelog. |
What this changes
Part of #1222, on top of #1402. Gemma 4 E4B (here NVIDIA Nemotron 3.5 Bolt E4B) served on the Intel Arc Pro B70 (Xe2) through the XPU lane host: admission through the family config, loader, forward with per-layer inputs on the family's bf16 steps, DPAS dense and attention kernels, prompt cache, several streams with shared forwards,
/v1/decisionson the engine thread, and 8-bit attention projections.No converter: the engine reads
mlx_lm.convertcheckpoints. The audio tower and the DFlash drafter are not in this PR (mlx-lm drops the audio tensors, and the drafter is published only as GGUF or NVFP4); they can follow separately.Checkpoints
From
nvidia/NVIDIA-Nemotron-3.5-Bolt-E4B-BF16with mlx-lm 0.32.2 (MLX 0.32.4), 4-bit, group 64:With mlx-lm's defaults the per-layer input linears are quantized too. The engine still loads that checkpoint and prints one warning per such tensor. Against the BF16 model, over 358 positions of the 14 reference prompts, its top-1 token agrees 94.7% of the time (mean KL 0.148), against 97.2% (mean KL 0.039) with
ple16.Receipt
On this branch (main 5225426 plus 21 commits), Arc Pro B70:
zig build testpasses; the Gemma 4 host targets,test-qwen27-equality-hostandtest-flashnext-score-hostpass;zig fmtclean.ple16anda8: byte-equal across rebases on main, and between a branch build and the checkpoints written bymlx_lm.convertabove.ple16anda8); resumed prompt cache gives the same replies as fresh;/v1/decisionsreturns the same 808 keys sequential, 2 and 4 concurrent.reuse_served.py): after a tool reply the cache resumes one turn late (33/43 rows as cached as planned). That comes from the shared server code, not this engine, and is fixed separately in server: keep the history mark inside what the next turn repeats after a tool reply #1551 (43/43 on top of it).Speeds (median of 2 passes, alternated with the branch on the previous main):
ple16a8Served, 256 tokens, chat prompt, greedy, aggregate tok/s at 1 / 2 / 4 streams:
ple16140 / 253 / 426,a8122 / 223 / 380.Other XPU families
This branch touches shared XPU files (
qwen27/gemm.cl,xpu_lane.zig,xpu_nem.zig,xpu.zig,zig/build/xpu.zig); nothing outside the XPU build, kernels and natives and thegemma4_e4btools. Against main 0d51120, same B70, two alternated passes (main then branch, branch then main); after the rebase on 5225426 the host steps, Qwen3.8 27B GPTQ (oracle, served fingerprints, concurrent = alone) and the speeds above were run again with the same results:gemm.clbuilt withoclocfor BMG: the existing kernels' machine code is byte-identical; the two new kernels are only called by Gemma 4.XPU_PREFILL_INT8=1, MLX 4-bit) and Nemotron 3.5 Lightning 30B-A3B MLX 4-bit: same greedy outputs (oracle, verify/multi contracts, served fingerprints, 27B means/seam/close checks, Nemotron programs), concurrent = alone in every pass (120/120 and 56/56), single-stream prefill and decode within 0.3%.test,test-golden,test-kernel-contract,fuzz-cortheon,test-cuda-host, the server, lane and Gemma 4 steps) give the same exits and counts on both trees, plus the newxpu_configtests;test-qwen27-keep-hostaborts on both without a GPU.