Repository navigation
api: send the image pixels with every n>1 choice (vision-fidelity multi-choice-image red on main since #174) - #201
Merged
Conversation
vision-fidelity `multi-choice-image` has failed on main since #174 (bisected 2026-10-21 on sparky: f3ea6f0 passes 10/10, b9a7eda is the first bad commit, 9/10 on Qwen/Qwen3.6-35B-A3B-FP8 and on every other vision model tried). The blocking path runs one scheduler request per choice and gave the pixels to choice 0 only; the later choices had no media of their own and silently reused choice 0's leftover encoder rows. #174 made a request without media clear that per-request vision state in single-rank serving, which is the right guard against splicing a stale image, so choice 1 now prefills its image pad tokens with nothing and answers as if no picture were attached. Each choice now carries its own pixels and is encoded on its own. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vision-fidelityhas been red on main: integrity 9/10 onmulti-choice-image, "choice(s) [1] did not answer about the image". It fails on every vision model I ran: Qwen3.6-35B-A3B-FP8 (the gate subject), Qwen3.8-Flash-Next NVFP4 and FP4-Local. Main's last committed record (.benchmarks/vision-fidelity/2026-09-29-d5472821c8.json) passed 10/10.Bisect (sparky GB10,
spark benchmark run vision-fidelity --pull-request-gate, first-parent, 2026-10-21):d5472821c8: re-tested on this box first, 10/10, so the failure is not environmental.1d33249896good,f3ea6f0bb0good.f95b729a09bad,50c6124e5bbad.b9a7edad8(qwen3.8-flash-next: two-GB10 TP=EP=2 (Enntity series + RC16) with RDMA GID and cuBLASLt startup fixes #174).Mechanism:
chat_blocking::run_blocking_pathsends one scheduler request per choice and gave the image pixels to choice 0 only. Choices 1.. carried no media and silently prefilled their image pad tokens from choice 0's leftover encoder rows.ep_broadcast_vision_state_for_seq(enabled = false)clears that per-request vision state, in single-rank serving too, for any request without media. That clearing is the right guard, since a request without media should never splice a stale image, so choice 1 now gets nothing.f3ea6f0bbchoice 1's first token equals choice 0's (13602); onb9a7edad8it does not (8725).Fix: every choice carries its own pixels and is encoded on its own (
crates/spark-server/src/api/chat_blocking.rs). The benchmark's doc comment (media_integrity::multi_choice) is updated to match. n=1 is unchanged.Evidence
vision-fidelity --pull-request-gate, default subjectQwen/Qwen3.6-35B-A3B-FP8, alternating, 180 s cooldown.6b09b40aa(binary sha25694a1b8c0a3043dfe) vs this branch (4c7fd94187268ca3).run-1792575629041714855run-1792575886530913767run-1792576144127996550run-1792576398694970202Test plan
cargo fmt --all -- --check(1.93.1),cargo clippy -p spark-server --testsGenerated with Devin