Tool Calling Failure: Qwen3.6-35B-A3B-OptiQ-4bit on oMLX

#2
by thunderhit - opened

I downloaded mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit today. It worked fine for regular chat conversations, but failed to function with tool calling. I had to switch back to mlx-community/Qwen3.6-35B-A3B-4bit in the end.
My device is a MacBook Pro with M2 Max and 96GB of memory, and I use the oMLX client.The tools I tested include OpenCode and Claude Code.

MLX Community org

This should be fixed now, try again and let me know if you still have issues.

Hi.
I get into endless loops on this model with Hermes. Any specific settings I should change in LM Studio?

MLX Community org

Hi @Optionailed — the endless-loop issue you're seeing is almost certainly an old quant + LM Studio sampler defaults. Since the quants on this repo were pushed, generation_config.json now ships with the Qwen non-thinking instruct recipe (temp=0.7, top_p=0.8, top_k=20, min_p=0.0) — but LM Studio doesn't always read that file. You can try using https://mlx-optiq.com/ it works there

pip install mlx-optiq
optiq serve --model mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit --mtp

optiq_lab_chat_demo

Hi.
Any way to achieve this with LMStudio (prefer to stay, if possible).
I am using Hermes agent, and I sometimes use models you don't have listed on your page.
Thanks!

MLX Community org

temp=0.7, top_p=0.8, top_k=20, min_p=0.0

Try with these settings does it still give the issue?

MLX Community org

Btw which other models did you use that don’t have optiq quants in mlx-community?

Get below error when using on my MacBook Pro M4 and 48GB of unified memory with oMLX and Claude Code:

API Error: 409 Model 'Qwen3.6-35B-A3B-OptiQ-4bit' is unavailable after a previous load failure: VLM load failed: Missing 1281 parameters:
language_model.lm_head.biases,
language_model.lm_head.scales,
language_model.lm_head.weight,
language_model.model.layers.10.input_layernorm.weight,
language_model.model.layers.10.linear_attn.A_log,
language_model.model.layers.10.linear_attn.conv1d.weight,
language_model.model.layers.10.linear_attn.dt_bias,
language_model.model.layers.10.linear_attn.in_proj_a.biases,
language_model.model.layers.10.linear_attn.in_proj_a.scales,
language_model.model.layers.10.linear_attn.in_proj_a.weight,
language_model.model.layers.10.linear_attn.in_proj_b.biases,
language_model.model.layers.10.linear_attn.in_proj_b.scales,
language_model.model.layers.10.linear_attn.in_proj_b.weight,
language_model.model.layers.10.linear_attn.in_proj_qkv.biases,
language_model.model.layers.10.linear_attn.in_proj_qkv.scales,
language_model.model.layers.10.linear_attn.in_proj_qkv.weight…

Also loading same model in LM Studio gives below error:

Failed to load last used model.

Failed to load model.

Error when loading model: Exception: Encountered fatal exception in the backend generation thread: Traceback (most recent call last):
  File "/Users/<username>/.lmstudio/extensions/backends/vendor/_amphibian/app-mlx-generate-mac14-arm64@32/lib/python3.11/site-packages/mlx_engine/model_kit/batched_vision/model_kit.py", line 360, in _generate_with_exception_handling
    self._generate()
  File "/Users/<username>/.lmstudio/extensions/backends/vendor/_amphibian/app-mlx-generate-mac14-arm64@32/lib/python3.11/site-packages/mlx_engine/model_kit/batched_vision/model_kit.py", line 607, in _generate
    self._load_model()
  File "/Users/<username>/.lmstudio/extensions/backends/vendor/_amphibian/app-mlx-generate-mac14-arm64@32/lib/python3.11/site-packages/mlx_engine/model_kit/batched_vision/model_kit.py", line 224, in _load_model
    self.model = mlx_vlm.utils.load_model(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<username>/.lmstudio/extensions/backends/vendor/_amphibian/app-mlx-generate-mac14-arm64@32/lib/python3.11/site-packages/mlx_vlm/utils.py", line 663, in load_model
    model.load_weights(list(weights.items()), strict=strict)
  File "/Users/<username>/.lmstudio/extensions/backends/vendor/_amphibian/app-mlx-generate-mac14-arm64@32/lib/python3.11/site-packages/mlx/nn/layers/base.py", line 185, in load_weights
    raise ValueError(
ValueError: Received 37 parameters not in model: 
mtp.fc.weight,
mtp.layers.0.input_layernorm.weight,
mtp.layers.0.mlp.experts.down_proj,
mtp.layers.0.mlp.experts.gate_up_proj,
mtp.layers.0.mlp.gate.biases,
mtp.layers.0.mlp.gate.scales,
mtp.layers.0.mlp.gate.weight,
mtp.layers.0.mlp.shared_expert.down_proj.biases,
mtp.layers.0.mlp.shared_expert.down_proj.scales,
mtp.layers.0.mlp.shared_expert.down_proj.weight,
mtp.layers.0.mlp.shared_expert.gate_proj.biases,
mtp.layers.0.mlp.shared_expert.gate_proj.scales,
mtp.layers.0.mlp.shared_expert.gate_proj.weight,
mtp.layers.0.mlp.shared_expert.up_proj.biases,
mtp.layers.0.mlp.shared_expert.up_proj.scales,
mtp.layers.0.mlp.shared_expert.up_proj.weight,
mtp.layers.0.mlp.shared_expert_gate.biases,
mtp.layers.0.mlp.shared_expert_gate.scales,
mtp.layers.0.mlp.shared_expert_gate.weight,
mtp.layers.0.post_attention_layernorm.weight,
mtp.layers.0.self_attn.k_norm.weight,
mtp.layers.0.self_attn.k_proj.biases,
mtp.layers.0.self_attn.k_proj.scales,
mtp.layers.0.self_attn.k_proj.weight,
mtp.layers.0.self_attn.o_proj.biases,
mtp.layers.0.self_attn.o_proj.scales,
mtp.layers.0.self_attn.o_proj.weight,
mtp.layers.0.self_attn.q_norm.weight,
mtp.layers.0.self_attn.q_proj.biases,
mtp.layers.0.self_attn.q_proj.scales,
mtp.layers.0.self_attn.q_proj.weight,
mtp.layers.0.self_attn.v_proj.biases,
mtp.layers.0.self_attn.v_proj.scales,
mtp.layers.0.self_attn.v_proj.weight,
mtp.norm.weight,
mtp.pre_fc_norm_embedding.weight,
mtp.pre_fc_norm_hidden.weight.
MLX Community org
edited 26 days ago

There were two issues:

LM Studio Received 37 parameters not in model (the mtp.* tensors): those are optiq mtp.safetensors speculative-decoding head, which used to sit at the repo root where a *.safetensors glob picked it up. They were moved it into optiq/ on 11 July. You can delete the local copy and re-download.

oMLX Missing N parameters ... vision_tower.*: this is due to mlx-vlm only loading the shards named in model.safetensors.index.json, and the optiq bf16 vision tower sat in a sidecar the index never listed, so the loader built a vision_tower with no weights. This is now fixed in the quant. After re-downloading, mlx-vlm / oMLX / LM Studio can load the vision tower, mlx-lm text is unchanged, and mtp.safetensors stays hidden.

Note vision may still not generate correctly in oMLX: mlx-vlm 0.6.4 garbles a stock (non-OptiQ) Qwen3.5 quant too, which matches oMLX #1464 and #72. The change removes the load error. For text+images you can use, optiq serve --model <repo> which gives an OpenAI-compatible endpoint that accepts images.

Sign up or log in to comment

Free AI Image Generator No sign-up. Instant results. Open Now