Skip to content

qwen vision CUDA: read the tower under Hugging Face tensor names too - #1151

Closed
MiaAI-Lab wants to merge 1 commit into
ashhart:mainfrom
MiaAI-Lab:qwen-vision-hf-tower-names
Closed

MiaAI-Lab wants to merge 1 commit into
ashhart:mainfrom
MiaAI-Lab:qwen-vision-hf-tower-names

Conversation

@MiaAI-Lab

Copy link
Copy Markdown
Contributor

What this changes

The Qwen3.5 vision tower on CUDA read only the MLX layout (vision_tower.*, patch weight [hidden, T, P, P, C]). It now also reads Hugging Face names: if model.visual.patch_embed.proj.weight exists it loads model.visual.* with the patch weight [hidden, C, T, P, P] uploaded as stored; otherwise it opens the MLX prefix exactly as before. Needed by the EXL3 checkpoint in #1150 (https://huggingface.co/Mia-AiLab/Ornith-1.5-122B-EXL3-EAQv1-4-bpw, converted straight from the HF model), but independent of it. Tracking issue: #1149.

Receipt

  • Environment: TensorFold d1018b3 plus this commit; GB10, nvcr.io/nvidia/pytorch:26.07-py3, Zig 0.17.0; checkpoint Mia-AiLab/Ornith-1.5-122B-EXL3-EAQv1-4-bpw @ 9c5c913b3de1eef901520d6fedaf450044ea0423.
  • Exactness: with this commit and qwen3_5 cuda: serve ExLlamaV3 (EXL3) Qwen3.5-MoE checkpoints #1150, one image request (a 672x224 PNG, temperature 0, --vision, 64 tokens) returned a coherent description identical to that from a build carrying my unsubmitted patches. The MLX-named path was not re-run on a GPU.
  • Decode speed / prompt speed: n/a, the change only affects tower load.
  • Tests run: zig build test 211/211 steps succeeded (with qwen3_5 cuda: serve ExLlamaV3 (EXL3) Qwen3.5-MoE checkpoints #1150 applied: 703 of 709 tests passed, 6 skipped); zig fmt --check clean; lean_check.py 444 problems before and after (the file is 598 lines).
  • Not run, and why: no new unit test, because the naming choice needs a checkpoint fixture; no MLX-named vision checkpoint run on this branch.

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
  • Drafted/resumed/concurrent equality: n/a, load-time only.
  • No precision traded for speed.
  • No GPU kernel added or changed.
  • Prompt processing is no slower than the last release.
  • Platforms: CUDA on GB10 only; Metal not run.
  • New tests: none, see above.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

The Qwen3.5 vision tower loaded only the MLX layout (`vision_tower.*`, patch weight [hidden, T, P, P, C]). A checkpoint converted straight from the Hugging Face model keeps `model.visual.*` and the patch weight as [hidden, C, T, P, P], which is the layout the tower wants, so it is uploaded as stored. The loader picks the naming by whether `model.visual.patch_embed.proj.weight` exists and otherwise opens the MLX prefix as before; MLX checkpoints load exactly as they did.
ashhart added a commit that referenced this pull request Oct 24, 2026
@ashhart

ashhart commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Landed on main as 167cb96 with a maintainer fix-up (23d8e05) that proves tower names and tensor bytes without a device, thank you @MiaAI-Lab. The Qwen vision CUDA tower now reads under Hugging Face's tensor names too, and the host suites pass on current main.

- Synthema, Ash's AI Assistant.

@ashhart ashhart closed this Oct 24, 2026
@ashhart

ashhart commented Oct 24, 2026

Copy link
Copy Markdown
Owner

This shipped in TensorFold 1.1.4: https://github.com/ashhart/TensorFold/releases/tag/v1.1.4

Thank you @MiaAI-Lab for the contribution.

- Synthema, Ash's AI Assistant.

@ashhart ashhart added the landed Landed on main by the maintainers; the commits keep the contributor's authorship label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

landed Landed on main by the maintainers; the commits keep the contributor's authorship

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants