Repository navigation
qwen3_vl: per-group timestamped video prompt + t=1 MRoPE planes (3.8-27B video-fidelity 13/13; video gate back on the NVIDIA checkpoint) - #202
Merged
Conversation
…its own MRoPE plane HF's Qwen3VLProcessor replaces the video's compact vision_start/pad/vision_end triple with timestamp text + an inner start/pads/end per temporal group, and get_rope_index splits video_grid_thw into t=1 planes per group. Atlas emitted a flat pad run with one T-per-group video plane, which dropped per-group ordering information the model uses — the video-fidelity mixed-media leg lost a colour (red, blue, yellow on Atlas; 4/4 through vLLM). - PreprocessedVideo.timestamps_hf: HF's mean-of-first/last-frame rule per group (GLM's floor timestamps untouched). - expand_qwen3vl_vision_placeholders: the nested expansion, images unchanged. - mrope_pos::build_qwen3vl: every contiguous pad run is a t=1 plane; boundary/timestamp tokens are text positions. Dispatch on is_qwen3vl_video, resolved from the checkpoint's preprocessor config. - Fixes the stale Qwen2-VL doc on mrope_pos::build. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…the unmeasured unsloth declarations With the Qwen3-VL reference video prompt, the NVIDIA 3.8-27B passes video-fidelity 13/13 under its own gate recipe (run-1792578413095376992), so it takes the gate's required subject back from the unsloth 3.6-27B pack, which stood in for it only because Atlas's flat video prompt made 3.8 look one colour short. The unsloth video entry stays as a non-default measured record. The two never-measured unsloth declarations (dense concurrency-sweep, default=true, and agentic-webserver) are removed: the dense halves of both gates are measured on the NVIDIA 3.8-27B. Thresholds unchanged; BENCH.toml is outside the closure hash. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The Qwen3-VL timestamp work pushed the file past CI's cap. The timestamp rules (GLM floor, HF mean) live in timestamps.rs, the payload type and frame-index arithmetic in types.rs. Behaviour unchanged. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
AzeezIsh
added a commit
that referenced
this pull request
Oct 29, 2026
…video bounds Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403 (AGPL-3.0-only), on top of #202's already-landed expansion machinery. - decode_with_plan returns each emitted frame's real PTS from ffmpeg's showinfo instead of the plan's assumed positions — identical on CFR, materially different on VFR. - The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a huge side inside any per-side bound). - read_declared_pixels reads both bounds of one modality from whichever processor file declares the max: image min_pixels beside longest_edge, video_processor's from video_preprocessor_config.json or processor_config.json [video_processor]. Startup installs them on VisionConfig (min_pixels, video_pixels) next to max_pixels; the operator's --vision-max-pixels still overrides the image max only. #202 already covered: the per-group timestamp expansion machinery (qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit timestamp sample plan, and the decode_frames/decode_with_plan shape. Their tests ported where our surface matches (the frames.rs-dependent cases are Enntity's separate refactor and stay out).
6 tasks done
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
The bug: Atlas rendered Qwen3.5/3.6/3.8 video in the Qwen2-VL shape: one
<|vision_start|>+ all temporal groups' pads +<|vision_end|>, no timestamps, with T = base + g. The checkpoints' own processor does something else:Qwen3VLProcessor.replace_video_tokenemits, per temporal group,<{t:.1f} seconds><|vision_start|>+ the group's pads +<|vision_end|>, inside the item's outer start/end pair.Qwen3VLModel.get_rope_indexsplitsvideo_grid_thwinto one t=1 plane per group.<|vision_start|> <0.2 seconds><|vision_start|> pad×49 <|vision_end|> … <3.6 seconds><|vision_start|> pad×49 <|vision_end|> <|vision_end|>.What it cost. On
nvidia/Qwen3.8-27B-NVFP4, video-fidelitymixed-media(a gray still, then a 4-colour clip) readred, blue, yellow(green missing) on every build, GIF and MP4 alike. That one-colour miss is why the gate's subject was moved to the unsloth 3.6-27B pack on 2026-08-15. Same request, same box (sparky, GB10):e29809db9)eugr/spark-vllm-b12x, model-card flags)The remaining 15 tokens are the still image. HF's
shortest_edgeminimum upscales the 224 px gray still to 256 px (64 tokens; Atlas uses 49). That's a separate image-side difference, not touched here.Changes:
video_preprocessor_config.json/preprocessor_config.json/processor_config.json(video_processor_type: Qwen3VLVideoProcessororprocessor_class: Qwen3VLProcessor), read at serve time. No new flag. Other families are untouched; GLM-5's per-frame path is unchanged and its tests are green.tokenizer/chat_impl/qwen3vl_vision.rs): nested per-group expansion with HF-rule timestamps. Each group's time is the mean of its first and last kept frame's source time,{:.1}. Images expand exactly as before.prefill_b/mrope_pos.rs::build_qwen3vl): each group is a t=1 plane (T = base, H/W = base + row/col, advance max(gh, gw)). Timestamp and marker tokens are text positions. Built over the full prompt and sliced per chunk, like GLM-5, so a chunk boundary between groups is safe. The stale "matches Qwen3-VL" claim on the Qwen2-VLbuildis corrected.atlas-pluginvideogeometry::check_proportional):plane, but it required(t2 − t1) % plane == 0. That premise ("one group = plane tokens") only holds for flat formats; a Qwen3-VL group costs plane + 8 (timestamp + inner marker pair).0..=16, so legacy formats resolve at k=0 exactly as before, and the 30-token non-multiple case is still refused. Linearity (t4 − t2 == 2·(t2 − t1)) and the overhead consistency check are unchanged.BENCH.tomlonly, outside the closure hash):video-fidelity's required subject goes back tonvidia/Qwen3.8-27B-NVFP4.unsloth/Qwen3.6-27B-NVFP4becomes a non-default measured record.concurrency-sweep(which wasdefault = true) andagentic-webserver, are removed. Both gates' dense halves are measured on the NVIDIA 27B.Evidence
sparky, 2026-10-21, this branch (binary
0be1bf12f1c3a1a1):video-fidelity --pull-request-gate --checkpoint nvidia/Qwen3.8-27B-NVFP4: PASS 13/13,run-1792578413095376992.Yellow, Blue, Green, Red.video-fidelity --pull-request-gate --checkpoint Qwen/Qwen3.6-35B-A3B-FP8: PASS 13/13,run-1792578198608303669.unsloth/Qwen3.6-27B-NVFP4), which is not on this box.Supporting experiments from the same session, same request:
red, blue). Attention precision moves an edge case both ways; the prompt format is the structural difference.Test plan
mrope_pos17/17 (new Qwen3-VL two-group, image-is-t1, chunk-boundary cases),qwen3vl_vision3/3, GLM-5 14/14, atlas-plugin video 44/44 (new Qwen3-VL proportionality + k>16 refusal), atlas-plugin gate 225/225cargo fmt --all -- --check(1.93.1),cargo clippy -p spark-server -p spark-model -p atlas-plugin --testsGenerated with Devin