Views
No views yet
mlx_lm.convert. This conversion uses mlx_vlm.convert, preserving the full vision tower (420M params, 27 blocks) alongside the quantized language model.| Spec | Value |
|---|---|
| Architecture | Qwen3.5 MoE — 60 layers, 4096 hidden, 512 experts, 17B active/token |
| Vision encoder | 27-block ViT, 420M params, fp16 (unquantized) |
| Quantization | 4-bit language model, 8-bit MoE routing gates, fp16 vision encoder |
| Average bits/weight | 4.513 |
| Total size | 209 GB (46 safetensor shards) |
| Generation speed | 33–36 tok/s (M3 Ultra 512GB) |
| Prompt processing | ~104 tok/s (with image) |
| Peak RAM | 224.4 GB |
| Context length | 262,144 tokens |
| Languages | 201 |
mlx-vlm >= 0.3.12:pip install mlx-vlm1from mlx_vlm import load, generate
2
3model, processor = load("RockTalk/Qwen3.5-397B-A17B-mlx-vlm-4bit")
4
5messages = [{"role": "user", "content": [{"type": "text", "text": "Explain quantum entanglement simply."}]}]
6prompt = processor.apply_chat_template(
7 messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
8)
9output = generate(model, processor, prompt, max_tokens=300)
10print(output)1from mlx_vlm import load, generate
2
3model, processor = load("RockTalk/Qwen3.5-397B-A17B-mlx-vlm-4bit")
4
5messages = [{"role": "user", "content": [
6 {"type": "image", "image": "photo.jpg"},
7 {"type": "text", "text": "Describe this image in detail."}
8]}]
9prompt = processor.apply_chat_template(
10 messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
11)
12output = generate(model, processor, prompt, image="photo.jpg", max_tokens=300)
13print(output)enable_thinking=False to enable the model's chain-of-thought reasoning (tokens go to <think> tags before the answer).Qwen/Qwen3.5-397B-A17B (bf16, 807 GB)mlx_vlm.convert v0.3.121python3 -m mlx_vlm.convert \
2 --hf-path Qwen/Qwen3.5-397B-A17B \
3 --mlx-path ./Qwen3.5-397B-A17B-VL-4bit-MLX \
4 --quantize --q-bits 4--dtype float16. The model's native dtype is bfloat16. Forcing float16 causes quantization scales to overflow in the MoE layers, producing NaN logits and garbage output (all ! characters — token ID 0). Let mlx_vlm use the model's native bfloat16 dtype for scales.--dtype float16 produces a model that loads, passes config checks, but outputs nothing useful."tokenizer_class": "TokenizersBackend" which requires transformers >= 5.0. This has been patched to "PreTrainedTokenizerFast" in the included tokenizer_config.json so it works with current versions.Qwen/Qwen3.5-397B-A17B IS multimodal (tagged image-text-to-text). But mlx-community conversions used mlx_lm.convert which only handles text models — it silently drops all model.visual.* weights. Using mlx_vlm.convert instead invokes the qwen3_5 model handler which:model.visual.* → vision_tower.*model.language_model.* → language_model.model.*| Config | RAM | Notes |
|---|---|---|
| M3/M4 Ultra 512GB | 224 GB | Comfortable, room for other apps |
| M3/M4 Ultra 256GB | 224 GB | Tight but works |
| M2 Ultra 192GB | — | Not enough RAM |