Skip to content

HIP Qwen: a copies-only engine prices its plain rounds once forwards are timed (fixes #4061) - #4312

Merged
ashhart merged 3 commits into
mainfrom
lead/hip-copies-plain-price
Nov 21, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/hip-copies-plain-price

Conversation

@ashhart

@ashhart ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Fixes #4061.

On HIP, a Qwen engine with no drafter head but with copy drafts never priced its plain one-token rounds. plain_guard was drafting and windows > 0, and a copies-only engine is not drafting. So once the forwards were timed, copies were priced against target rounds that had no price, and with several streams the lane planner kept choosing copies when a plain round was cheaper.

The one production change, in hip_lanes.zig: plain_guard = h.costs.windows > 0. A headed engine gets exactly the old value. A copies-only engine now competes plain rounds against copies, the same rule the headed path already uses.

This intentionally changes scheduling for copies-only HIP engines, so a test that pinned main's old shared-round trail for that case is removed, and the lane-model fixtures now match production. Replies keep their tokens: the seeded sampled and greedy controls in lone_copy_sampled_test.zig compare the corrected and unpriced schedules token for token against drafts-off decode. A new hip_lanes.zig test checks the facts of a copies-only engine.

Host: zig build -Dhip=true test-qwen35-hip-host fails on main at the new test and passes here; zig build test-shared-lane-regressions-host passes. No speed claim is made from host runs. The gfx1151 A/B on the four-stream case in #4061 decides it.

Thanks @AbrahamCete for the measurements and the one-line correction; co-authored.

  • Synthena

@ashhart
ashhart force-pushed the lead/hip-copies-plain-price branch from fb9e1ff to f9aa8d0 Compare November 21, 2026 12:37
@ashhart
ashhart merged commit 1587c8c into main Nov 21, 2026
2 of 12 checks passed
@ashhart
ashhart deleted the lead/hip-copies-plain-price branch November 21, 2026 12:37
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

Thank you @AbrahamCete. This is merged into main with your commits under your own name, so you're credited as a TensorFold contributor.

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

Labels

None yet

Projects

None yet

1 participant