Skip to content

model: Qwen3.8's machine is workstation::placed_on with the route scratch on top - #512

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:fix-review-bot-issue-509-placement
Oct 19, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:fix-review-bot-issue-509-placement

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

Qwen3.8 배치의 machine_for_experts가 workstation::placed_on과 같은 one-card Machine을 손으로 만들던 중복(#509)을 placed_on 호출로 바꾸는 PR입니다.

What and why

Fixes #509. machine_for_experts (crates/model/src/arch/qwen35moe/place.rs) built a Machine literal that is the one workstation::placed_on builds: every layer, the head and the token embedding on the card, the workstation's context, margin and granule, the card's own node and no expert tier. Only the scratch differs by model. The function now keeps its Experts match for the card route's scratch and calls workstation::placed_on(card, layers, card_scratch_bytes(ubatch) + route). The unused CONTEXT and MARGIN imports go, and the doc comment of machine points at placed_on.

No behavior changes: the machine has the same fields and values as before. The change does not touch workstation.rs, so it does not overlap #508, which adds placed_with_arena beside placed_on and keeps placed_on as it is.

What I ran

The tests ran on fba1ea08. The PR head ce811c92 is that commit rebased onto current main with an unchanged diff, so these results carry. The contribution check ran on ce811c92.

  • cargo test --release -p bloomery-model --lib arch::qwen35moe: test result: ok. 92 passed; 0 failed.
  • cargo test --release -p bloomery-model --test fixture (calls machine_for_experts): test result: ok. 16 passed; 0 failed; 23 ignored.
  • Contribution check t0 on ce811c92: DONE tier=t0 total=94 red=0.

What I ran into

None of this blocks the PR. There is no FAIL-first test: the issue is a duplicate, not a wrong value, so behavior is unchanged. The existing the_machine_of_plan_bp test compares machine_bp with machine_for_experts field by field.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

…atch on top

machine_for_experts built the same one-card machine as workstation::placed_on: every layer, the head and the token
embedding on the card, the workstation's context, margin and granule, no expert tier and the card's own node. It now
calls placed_on with card_scratch_bytes(ubatch) plus the card route's scratch; the route match, the one part that is
Qwen3.8's own, stays.
@github-actions github-actions Bot added the model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja label Oct 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: Reusing workstation::placed_on preserves every machine field and the model's route scratch.

Checked

Duplicates: 0 new items; dryer reported 0 pairs. The removed literal matches the existing common owner field by field.
Complexity: crapper flagged no functions; the existing two-arm routing match is unchanged.
Silent failure: 0 new sites. An integrated card without a free-memory reading still reaches the named panic.
Tests: no tests changed; mutation checks are not applicable. The existing placed-load test rejects a missing token embedding or incorrect scratch value.
Gates: no gates, cases, thresholds or pins changed.
Escape catalog: no patterns matched.
Adversarial checks: zero layers, host/card routing, census metadata and unified memory preserve the base behavior. This is load-time code.

Notes

Tests were not run locally. The PR reports 92 model unit tests and 16 fixture tests passing, with 23 fixture tests ignored, plus a successful t0 contribution check.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit adf56be into midagedev:main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja

Projects

None yet

Development

Successfully merging this pull request may close these issues.

placement: Qwen3.8 duplicates workstation::placed_on

1 participant