Skip to content

Expose Qwen media preparation and request-owned positions - #351

Closed
jonathan308 wants to merge 1 commit into
fix/cluster-event-bound-logprobsfrom
fix/cluster-qwen27-native-media
Closed

jonathan308 wants to merge 1 commit into
fix/cluster-event-bound-logprobsfrom
fix/cluster-qwen27-native-media

Conversation

@jonathan308

Copy link
Copy Markdown

Qwen cluster workers need the original image/video processor and vision tower without constructing a second language model. This change exposes shared preprocessing, a vision-only serial loader, and request-owned embedding/three-axis position forwards. The existing multimodal wrapper reuses the processor; ordinary text calls retain their existing path.

Depends on SDK #350. The matching provider integration remains separate. This draft does not establish full-artifact, paired-device or endpoint media qualification.

Before

flowchart LR
    Input[Image or video] --> Wrapper[Combined vision and language wrapper]
    Worker[Cluster worker] --> Missing[No isolated processor and tower interface]
    Text[Text forward] --> Cache[Cache-derived positions]
Loading

After

flowchart LR
    Input[Image or video] --> Processor[Shared processor and geometry]
    Processor --> Tower[Vision-only serial loader]
    Tower --> Request[Request-owned embeddings and positions]
    Request --> Forward[Explicit language forward]
    Wrapper[Existing multimodal wrapper] --> Processor
    Text[Ordinary text forward] --> Cache[Existing cache-derived positions]
Loading

Validation: nine focused CPU tests cover preprocessing geometry, processor precedence, serial tensor loading, exact tiny-wrapper parity, explicit positions and malformed-cache refusal; full MLXLLM/MLXVLM modules compiled. Published production changes match those independently reviewed sources, preserving an existing formatting-only parent change. Test organization and fork coverage pass (1,944/1,944 files). Full image/video tower execution and cross-Mac parity remain required.

Independent refactor/correctness review is clear for the frozen native-media export and the narrow publication delta. No model downloads or hardware qualification are implied by these component tests.

javiech1 pushed a commit to javiech1/mlx-swift-lm that referenced this pull request Oct 24, 2026
* Add Qwen3.5 MTP speculative decoding
* Harden Qwen3.5 MTP decoding
* Fix Qwen MTP verification fidelity
* Preserve caller MTP cache ownership
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.

1 participant