Skip to content

Experimental Qwen3.6 vision DFlash - #1

Merged
Nuked88 merged 11 commits into
mainfrom
agent/qwen36-vision-dflash
Aug 1, 2026
Merged

Experimental Qwen3.6 vision DFlash#1
Nuked88 merged 11 commits into
mainfrom
agent/qwen36-vision-dflash

Conversation

@Nuked88

@Nuked88 Nuked88 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

What changed

  • carries native Qwen3.6 mmproj support from upstream PR feat(vision): native mmproj multimodal chat for Qwen35 Luce-Org/lucebox#571;
  • adds opt-in single-GPU image decode through DFLASH_VISION_DFLASH=1;
  • fixes final argmax/logits row selection after multimodal prefill;
  • fixes the logits offset for final text chunks split by the prefill micro-batch;
  • documents source commit, tested RTX 3090 settings, VRAM guidance, and known limitations.

Provenance

The vision implementation is taken directly from PR
Luce-Org#571 by David Roth, using head commit
122393626cf7bc488e6a27d2ea7069ff15316312 from
davidmroth/lucebox-hub:feat/vision-native-mmproj.

The DFlash opt-in and final-prefill-row corrections are the additional changes
in this fork.

Validation

  • CUDA image built from the pinned PR head with DFLASH27B_MMPROJ=ON on sm_86;
  • native AR vision identified a synthetic image correctly;
  • experimental DFlash path ran with non-zero acceptance;
  • 5,024-token text + image request completed on an RTX 3090 using Q8_0 mmproj,
    Q4_0 K/V cache, 61,440 context, and prefill chunk/micro-batch 256;
  • git diff --check passed.

Limitations

Image acceptance was often only 10-17%, and one deterministic comparison
diverged semantically from AR. Vision DFlash remains disabled by default and
is intended for evaluation. Layer-split/multi-GPU vision remains AR-only.

davidmroth and others added 11 commits July 31, 2026 23:01
Load mmproj alongside draft, parse image_url in HTTP server, inject vision
embeddings in Qwen35 prefill, and keep speculative decode for text-only
requests while forcing AR on multimodal turns.
Agent payloads (38+ tools) tokenize into a single large mtmd text chunk.
Prefilling it in one graph build reserved ~8.7GB VRAM and failed on dual-GPU
deploys. Sub-chunk text segments with DFLASH27B_PREFILL_UBATCH (same as text
prefill) and release scratch buffers before multimodal prefill starts.
Wire mmproj through the layer-split adapter and backend so dflash_server
can run vision prefill across sharded GPUs with mRoPE/bidirectional masks.
…per.

Forward-declare LayerSplitAttnPrefillOpts via layer_split_forward.h and use
the shared build_bidirectional_mask from attn_masks.h in qwen35_backend.
GENERATE_MULTIMODAL checked ModelBackend::supports_multimodal(), but
LayerSplitBackend never delegated to the adapter, so vision failed with
vision_not_configured even after mmproj loaded successfully.
vision_ only exists when mmproj is enabled; ggml-only builds must not
reference it from the inline override.
Layer-split and Qwen35 overrides need a base virtual; without it MMPROJ
builds fail with 'marked override, but does not override'.
@Nuked88
Nuked88 marked this pull request as ready for review August 1, 2026 20:21
@Nuked88
Nuked88 merged commit 546c796 into main Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants