VLM load failed: [concatenate] All the input array dimensions must match exactly except for the concatenation axis.

#1
by appleseedered - opened

T512 받아서 oMLX에서 실행해 봤는데 이런 오류가 뜨면서 실행이 안 됩니다.
VLM load failed: [concatenate] All the input array dimensions must match exactly except for the concatenation axis. However, the provided shapes are (128,6144,1152), (1,6144,1536), and the concatenation axis is 0.

  1. oMLX에서 원래 안 되는건지?
  2. 제가 뭔갈 잘못 하고 있는 건지? (T512 브랜치의 모든 파일 다 받아서 oMLX에서 모델 로드 했더니 오류 떴습니다)
  3. 모델의 오류인지?
    잘 모르겠습니다. 간단하게라도 알려 주시면 감사하겠습니다.

Fixed — please re-download the t512 branch (or main).

You did nothing wrong; this was on our side. Root cause:

The published builds kept the always-on shared expert at 8-bit while the routed experts were 6-bit (t512) / 3-bit (main), using an unpacked MoE layout. oMLX (and stock mlx-vlm) unconditionally re-pack the shared expert into the 129-wide routed SwitchLinear, and an MLX packed bank can only hold one bit-width — so it tried to concatenate a 6-bit routed bank (128, 6144, 1152) with an 8-bit shared expert (1, 6144, 1536) and the packed widths didn't match. That is the exact error you saw. It's not a config mistake and not really an oMLX bug — the unpacked mixed-bit layout simply requires a patched loader.

What changed: main, t512, and t512ref are re-shipped with the shared expert packed at routed bits. They now load on stock mlx-vlm and oMLX with no fork or patch:

pip install -U mlx-vlm
mlx_vlm.generate --model avlp12/MiniMax-M3-Alis-MLX-Dynamic --revision t512 \
  --prompt "안녕하세요" --max-tokens 128

Verified loading + generating on stock mlx-vlm 0.6.7 (128 routed + 1 packed shared = 129 experts, image path intact). The tiny quality cost of packing the shared expert is negligible at t512 (routed already 6-bit) and bounded at main (3-bit). If you want the 8-bit-shared variant, it can be rebuilt with pack_shared_expert=false on the patched mlx-vlm (Blaizzy/mlx-vlm#1544), but it is not hosted.

Thanks for the clear report with the exact shapes — that pinned it immediately.

Thank you very much for this, is there any chance you could upload the other two as well? I am only seeing the T256, and I really need the T512 and T512REF.

Much appreciated.

Thank you very much for this, is there any chance you could upload the other two as well? I am only seeing the T256, and I really need the T512 and T512REF.

Much appreciated.

Files and versions -> click main -> select t512

Resolved: the packed compat builds (main, t512, t512ref) load on stock mlx-vlm and oMLX. Closing — please reopen if it recurs.

avlp12 changed discussion status to closed

Sign up or log in to comment