Skip to content

conformance: a Qwen3.8-27B XPU profile for the Arc Pro B70 - #2677

Closed
Mirrdhyn wants to merge 1 commit into
ashhart:mainfrom
hygurlabs:xpu-qwen27-conformance-profile
Closed

Mirrdhyn wants to merge 1 commit into
ashhart:mainfrom
hygurlabs:xpu-qwen27-conformance-profile

Conversation

@Mirrdhyn

@Mirrdhyn Mirrdhyn commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

What this changes

Adds tools/conformance_profiles/qwen27-xpu.json, the served-exactness profile for Qwen3.8-27B on the Intel Arc XPU backend, derived from qwen27-metal.json: GPTQ 4-bit group 128 with its DFlash2 drafter, --parallel 4 --no-thinking, levels 1/2/4, a 2 GiB prompt cache. It has no fresh_env: TF_QWEN27_SLOT_RESUME is only read in zig/src/native/qwen27_slots.zig, which the XPU path does not import.

It sets conversation_context_items: 600. Without it the resumed gate fails on this backend with cached_tokens [0, 64, 0, 64] (measured this morning on 006820408 and on #2672's branch, identically). With it, every resumed turn is cached (4,032 to 4,160 tokens). Why, from reading the code (not instrumented at run time): zig/src/native/xpu.zig builds the prompt cache with .planned = true, .grid = 64, and in zig/src/core/prompt_cache.zig a planned store keeps and resumes states only at multiples of 64 tokens (usable, startAt). The short chat's first turn has a history of about 25 tokens, which snaps to 0, so nothing is kept for turn 2; a long first turn puts the history past a grid point. This is not the 4,096-token floor the CUDA profiles needed (2c6b1135): min_prompt does not apply to planned stores.

Suggested CHANGELOG line: Conformance: a Qwen3.8-27B XPU profile (tools/conformance_profiles/qwen27-xpu.json, GPTQ 4-bit group 128 with its DFlash2 drafter, four streams on an Arc Pro B70); its first turn carries a 600-item document because the XPU prompt cache keeps states only at multiples of 64 tokens.

Checks on this head

  • Head commit: 80e4823c (one file, the profile)
  • tools/pr_check.py --base origin/main: 1 changed file; lean 386 vs 386, 0 new; 0 errors, 0 warnings
  • Tests: python3 -m unittest tools.tests.test_bench_conformance, 23 run, 23 pass
  • CI: not run yet

Receipt

A test profile only, no change to inference; the receipt is the profile run on main.

  • Environment: main f184c7b3d, Zig 0.17.0, zig build xpu-native -Doptimize=ReleaseFast -Dxpu-dpas=true, binary md5 3d3d78f09fc182902adfb240a4c8c56a; one Intel Arc Pro B70 (32 GB, PCIe 4.0 x4), the host's other card masked out; Qwen3.8-27B GPTQ 4-bit group 128 with z-lab/Qwen3.8-27B-DFlash2.
  • Command: python3 tools/conformance.py tools/conformance_profiles/qwen27-xpu.json --binary BIN --model-dir MODEL --drafter DRAFTER --output receipt.json
PASS drafted == plain: 10/10 equal, 0 unequal, 0 unverified; 455 of 2895 drafts accepted
PASS repeat == first: 10/10 equal, 0 unequal, 0 unverified
PASS concurrent == solo: 44/44 equal, 0 unequal, 0 unverified (levels [1, 2, 4], drafted and plain, 16 with a long prompt among decoders)
PASS resumed == fresh: 6/6 equal, 0 unequal, 0 unverified; resumed cached_tokens [4032, 4160, 4032, 4160]
PASS refusals: 4/4 refused as listed
qwen27-xpu: 5 passed, 0 failed
  • Licence of new weights or drafter: n/a.

@ashhart

ashhart commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Thank you @Mirrdhyn. The profile follows the Metal one where it should, and your reading of the 64-token grid matches the code, so the long first turn is the right fix for this gate. Your B70 run passing all five gates is the evidence it needs. It's on the landing queue, with the CHANGELOG line credited to you.

@ashhart

ashhart commented Nov 9, 2026

Copy link
Copy Markdown
Owner

@Mirrdhyn, our landing tool can't push to this fork (403), so your commit lands unchanged as #2690, with your authorship kept. This one closes when that lands. Thank you.

@Mirrdhyn

Mirrdhyn commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@ashhart thanks for landing it as #2690. For next time: GitHub doesn't offer "allow edits by maintainers" on organisation-owned forks, which is likely the 403. I'm happy to give your landing tool write access to hygurlabs/TensorFold-working-branches (that repo only, no branch protection on it). Does it push as your account, or as a bot or GitHub App I should add or install instead?

@ashhart

ashhart commented Nov 10, 2026

Copy link
Copy Markdown
Owner

@Mirrdhyn thanks for the offer. The landing tool pushes as my account (ashhart), not a bot, so adding ashhart as a collaborator on hygurlabs/TensorFold-working-branches would let it update your branches directly next time. No need to change anything for this one, though: landing from #2690 keeps your authorship.

One new ask before it lands. Since your run, main gained two lifecycle gates, cancel (a reply cut mid-prompt leaves the server like a fresh one) and evict (an evicted prompt state leaves no trace). Every profile now has to run each one or say why not, so #2690's CI fails on qwen27-xpu.json with ['cancel', 'evict'] != [].

Could you run the two gates on the B70 with the same server settings? On CUDA, tools/conformance_profiles/qwen35-cuda.json uses:

"cancel": {"prompt": "count", "tokens": 256, "after_chunks": 4, "rounds": 2, "settle_s": 60},
"evict": {"fill_prompts": 10, "fill_items": 900, "fill_tokens": 1, "settle_s": 60}

If they pass, post the result and we'll add those two blocks to #2690 with your numbers. If evict can't run on 32 GB (the 27B Metal profile skips it on a 36 GB Mac because memory pressure stops new kept states), a "skip": {"evict": "<why>"} with the reason is fine too. No hurry: main is frozen for the 1.2.6 release right now, so this lands just after it.

@ashhart

ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks @Mirrdhyn! This landed as #2690 and is in TensorFold 1.2.7, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.7

  • Synthena (Ash's Agent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants