Repository navigation
PD image decode: MRoPE delta reaches decode positions, cache_seed gate, handoff key checks - #155
Conversation
…checks A decode leg has no mrope_positions, so ScheduledBatch dropped its handed-off mrope_position_delta and the decode builder ran it at text positions: keep a seq whose delta is nonzero. Preprocess the media of a decode leg that carries no cache_seed, reject a non-integer cache_seed or mrope_position_delta with a 400, and let preemption read Sequence.media_on_prefill_instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ruling: #147 (comment). Brief updated: Named result. |
|
Ruling: #147 (comment). Brief updated: Named result. |
|
Round 3 pushed bbe6a6e. No new commit: the Ruling changed only the named result.
|
|
APPROVE @ bbe6a6e. Checked: the whole head against #147 as the second Ruling left it. Items 1 to 3 of valarLip's review are fixed as asked. Item 4 is answered by the M3.1 MMStar run, with Qwen3.5 in #156. |
Closes #147. Ready for review. No blocking issues.
Why
An image request split across a prefill and a decode server ran its decode at text positions on MRoPE models, because the handed-off position offset never reached the batch. A decode leg missing the prefill's image identity hashed its image blocks as plain text, and malformed handoff values failed deep in the engine instead of at the request.
What changed
ScheduledBatch.mrope_position_deltas).cache_seed; otherwise the image is processed as before (_chat_completions).cache_seedormrope_position_deltais a 400 before enqueue (check_media_handoff, called byresolve_prompt_token_ids).Sequence.media_on_prefill_instance;generate_async_multimodalreadskv_transfer_params_outputdirectly.These answer items 1 to 3 of valarLip's review on ROCm#3410.
Review focus
media_on_prefill_instanceis fixed at construction: a local image seq also dropsmultimodal_dataonce its prefill is scheduled.check_media_handoffsits inresolve_prompt_token_ids, so it covers chat and completions only.Testing
Item 4 per the Ruling: MiniMax-M3.1 full MMStar through a 1P1D pair behind ATOMesh scores 0.7305, within two combined standard errors of the single instance's 0.7070, with 0 failed requests. Details and the single-request runs are under Evidence.
bbe6a6e: gate green, pytest 13772 passed, 1478 skipped, 2 deselected; cargo ok; black and ruff clean.
Follow-ups
Dev record
mrope_positions, so the batch dropped its delta. Qwen3.5 P/D does not transfer GDN state (Qwen3.5 P/D: GDN recurrent state is not transferred, D decodes from a stale slot #156).kv_transfer_params_output=None, asRequestOutputalways has it. The oldergetattrreads outside feat(engine): multimodal PD through the chat path ROCm/ATOM#3410's diff stay.--privilegedfor my first container; it ran without it.Evidence
MMStar (1500), MiniMax-M3.1-Flash-Quark-MXFP4 (
/share_nfs/models/amd/MiniMax-M3.1-Flash-Quark-MXFP4), TP4 on pit2-p03-g07, ATOM and ATOMesh from bbe6a6e,rocm/atom-dev:nightly_202611151511, recipe flags with DSpark:1P1D vs ATOMesh single: +0.0234 against 2 combined stderr 0.0328; vs direct: +0.0184 against 0.0327. The KV crossed RDMA: 79.65 GB out of P's HCAs and into D's. P loaded the multimodal processor; D never did, so every decode leg took the media-less path.
Commands, from the PR worktree with the harness from
fork/EPDat 8e00a49 (tests/accept/atomesh_mm/, untracked; its client trusts the lmms-eval checkout assafe.directory):Single-request runs, MMStar index 0, temperature 0, direct 1P1D. M3.1 with DSpark (single, then D):
The same M3.1 instance sent the same request differs from itself: image runs split at 84 to 272 characters, text runs at character 0 or 68, with and without DSpark, quick-reduce INT4 and
ATOM_FORCE_ATTN_TRITON.Qwen3.5-35B-A3B-FP8, one GPU each for single, P and D: the handoff carries
cache_seedandmrope_position_delta=-176to D, but D diverges from the third token because the GDN state is not transferred (#156). D log:has_slot_regions=False, block_regions=20, slot_regions=0.Revert-red (test file on the g07 GPU image, so the positions test runs; one line removed each time, then restored):
or getattr(seq, "mrope_position_delta", 0)inScheduledBatchtest_handed_off_mrope_delta_reaches_the_batch:{} == {0: -2};test_handed_off_mrope_delta_offsets_decode_positions:[[4], [4], [4]] == [[2], [2], [2]]and "cache_seed" in handoffin_chat_completionstest_decode_without_cache_seed_preprocesses_the_media:0 == 1check_media_handoff(...)calltest_non_integer_handoff_key_is_400_before_enqueue[*]:200 == 400The positions test skips in the CPU gate (no aiter or triton) and passes on g07.
🤖 Generated with Claude Code