Instructions to use froggeric/Qwen-Fixed-Chat-Templates with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use froggeric/Qwen-Fixed-Chat-Templates with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Qwen-Fixed-Chat-Templates froggeric/Qwen-Fixed-Chat-Templates
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
LM studio MLX based models
This happens because LM Studio handles GGUF and MLX through two completely different engines under the hood.
For GGUF models, LM Studio uses llama.cpp, which parses custom Jinja templates and XML tool calls without any trouble. But for its MLX backend, LM Studio does not have an XML parser hooked up. It expects tool calls in standard JSON format. When Qwen outputs its native XML (<function=...><parameter=...>), LM Studio fails to recognise it as a tool call, dumps the raw text into the chat window, and simply stops.
A couple of ways round this:
Stick with the GGUF in LM Studio: On Apple Silicon, Metal performance on GGUFs is pretty much identical to MLX, and tool calling works out of the box with this template.
Force JSON in the template: If you want to keep using the MLX model inside LM Studio, you can edit ** line 2** of chat_template.jinja before pasting it into LM Studio's prompt settings. Change:
{%- set _tool_format = tool_call_format if tool_call_format is defined else 'xml' %}
to:
{%- set _tool_format = 'json' %}
This will tell the model to output Hermes JSON ({"name": "...", "arguments": {...}}) instead of XML, which LM Studio's MLX runner should be able to catch.
or:
Use standalone MLX tools: If you run the model outside LM Studio using mlx-lm or omlx, custom Jinja and tool parsing work as intended.
LM Studio's MLX backend does not have an XML parser hooked up, so it only understands JSON tool calls. If you set _tool_format = 'json' at the top of chat_template.jinja before pasting it into LM Studio, it will output Hermes JSON and tool calls should work.
