Instructions to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "deepsweet/Qwen3.6-35B-A3B-MLX-oQ8-FP16" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
🛠️ revert chat template to the original one
#1
by deepsweet - opened
- README.md +1 -4
- chat_template.jinja +14 -47
README.md
CHANGED
|
@@ -14,10 +14,7 @@ base_model: Qwen/Qwen3.6-35B-A3B
|
|
| 14 |
>
|
| 15 |
> Please use [deepsweet/Qwen3.6-35B-A3B-MLX-oQ8](https://huggingface.co/deepsweet/Qwen3.6-35B-A3B-MLX-oQ8) if you have M3+ Apple Silicon.
|
| 16 |
|
| 17 |
-
This model was converted to MLX format from [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) using
|
| 18 |
-
|
| 19 |
-
- [oMLX v0.36.0](https://github.com/jundot/omlx/releases/tag/v0.3.6)
|
| 20 |
-
- fully [fixed](https://huggingface.co/froggeric/Qwen3.5-35B-A3B-Uncensored-FernflowerAI-MLX-8bit/blob/main/chat_template.README.md) `chat_template.jinja` by [@froggeric](https://huggingface.co/froggeric)
|
| 21 |
|
| 22 |
Settings:
|
| 23 |
|
|
|
|
| 14 |
>
|
| 15 |
> Please use [deepsweet/Qwen3.6-35B-A3B-MLX-oQ8](https://huggingface.co/deepsweet/Qwen3.6-35B-A3B-MLX-oQ8) if you have M3+ Apple Silicon.
|
| 16 |
|
| 17 |
+
This model was converted to MLX format from [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) using [oMLX v0.36.0].
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
Settings:
|
| 20 |
|
chat_template.jinja
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
{%- if do_vision_count %}
|
| 13 |
{%- set image_count.value = image_count.value + 1 %}
|
| 14 |
{%- endif %}
|
| 15 |
-
{%- if add_vision_id
|
| 16 |
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 17 |
{%- endif %}
|
| 18 |
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
|
|
@@ -23,7 +23,7 @@
|
|
| 23 |
{%- if do_vision_count %}
|
| 24 |
{%- set video_count.value = video_count.value + 1 %}
|
| 25 |
{%- endif %}
|
| 26 |
-
{%- if add_vision_id
|
| 27 |
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 28 |
{%- endif %}
|
| 29 |
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
|
|
@@ -39,10 +39,6 @@
|
|
| 39 |
{{- raise_exception('Unexpected content type.') }}
|
| 40 |
{%- endif %}
|
| 41 |
{%- endmacro %}
|
| 42 |
-
{%- set ns_flags = namespace(enable_thinking=true) %}
|
| 43 |
-
{%- if enable_thinking is defined %}
|
| 44 |
-
{%- set ns_flags.enable_thinking = enable_thinking %}
|
| 45 |
-
{%- endif %}
|
| 46 |
{%- if not messages %}
|
| 47 |
{{- raise_exception('No messages provided.') }}
|
| 48 |
{%- endif %}
|
|
@@ -55,30 +51,16 @@
|
|
| 55 |
{%- endfor %}
|
| 56 |
{{- "\n</tools>" }}
|
| 57 |
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 58 |
-
{%- if messages[0].role == 'system'
|
| 59 |
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 60 |
-
{%- if '<|think_off|>' in content %}
|
| 61 |
-
{%- set ns_flags.enable_thinking = false %}
|
| 62 |
-
{%- set content = content.replace('<|think_off|>', '').strip() %}
|
| 63 |
-
{%- elif '<|think_on|>' in content %}
|
| 64 |
-
{%- set ns_flags.enable_thinking = true %}
|
| 65 |
-
{%- set content = content.replace('<|think_on|>', '').strip() %}
|
| 66 |
-
{%- endif %}
|
| 67 |
{%- if content %}
|
| 68 |
{{- '\n\n' + content }}
|
| 69 |
{%- endif %}
|
| 70 |
{%- endif %}
|
| 71 |
{{- '<|im_end|>\n' }}
|
| 72 |
{%- else %}
|
| 73 |
-
{%- if messages[0].role == 'system'
|
| 74 |
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 75 |
-
{%- if '<|think_off|>' in content %}
|
| 76 |
-
{%- set ns_flags.enable_thinking = false %}
|
| 77 |
-
{%- set content = content.replace('<|think_off|>', '').strip() %}
|
| 78 |
-
{%- elif '<|think_on|>' in content %}
|
| 79 |
-
{%- set ns_flags.enable_thinking = true %}
|
| 80 |
-
{%- set content = content.replace('<|think_on|>', '').strip() %}
|
| 81 |
-
{%- endif %}
|
| 82 |
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
|
| 83 |
{%- endif %}
|
| 84 |
{%- endif %}
|
|
@@ -98,14 +80,7 @@
|
|
| 98 |
{%- endif %}
|
| 99 |
{%- for message in messages %}
|
| 100 |
{%- set content = render_content(message.content, true)|trim %}
|
| 101 |
-
{%- if
|
| 102 |
-
{%- set ns_flags.enable_thinking = false %}
|
| 103 |
-
{%- set content = content.replace('<|think_off|>', '').strip() %}
|
| 104 |
-
{%- elif '<|think_on|>' in content %}
|
| 105 |
-
{%- set ns_flags.enable_thinking = true %}
|
| 106 |
-
{%- set content = content.replace('<|think_on|>', '').strip() %}
|
| 107 |
-
{%- endif %}
|
| 108 |
-
{%- if message.role == "system" or message.role == "developer" %}
|
| 109 |
{%- if not loop.first %}
|
| 110 |
{{- raise_exception('System message must be at the beginning.') }}
|
| 111 |
{%- endif %}
|
|
@@ -122,7 +97,7 @@
|
|
| 122 |
{%- endif %}
|
| 123 |
{%- endif %}
|
| 124 |
{%- set reasoning_content = reasoning_content|trim %}
|
| 125 |
-
{%- if loop.index0 > ns.last_query_index
|
| 126 |
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 127 |
{%- else %}
|
| 128 |
{{- '<|im_start|>' + message.role + '\n' + content }}
|
|
@@ -141,21 +116,13 @@
|
|
| 141 |
{%- else %}
|
| 142 |
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 143 |
{%- endif %}
|
| 144 |
-
{%- if tool_call.arguments is defined
|
| 145 |
-
{%-
|
| 146 |
-
{
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
{{- '\n</parameter>\n' }}
|
| 152 |
-
{%- endfor %}
|
| 153 |
-
{%- endif %}
|
| 154 |
-
{%- elif tool_call.arguments is defined and tool_call.arguments is string %}
|
| 155 |
-
{%- if tool_call.arguments|trim|length > 0 %}
|
| 156 |
-
{{- tool_call.arguments }}
|
| 157 |
-
{{- '\n' }}
|
| 158 |
-
{%- endif %}
|
| 159 |
{%- endif %}
|
| 160 |
{{- '</function>\n</tool_call>' }}
|
| 161 |
{%- endfor %}
|
|
@@ -179,7 +146,7 @@
|
|
| 179 |
{%- endfor %}
|
| 180 |
{%- if add_generation_prompt %}
|
| 181 |
{{- '<|im_start|>assistant\n' }}
|
| 182 |
-
{%- if
|
| 183 |
{{- '<think>\n\n</think>\n\n' }}
|
| 184 |
{%- else %}
|
| 185 |
{{- '<think>\n' }}
|
|
|
|
| 12 |
{%- if do_vision_count %}
|
| 13 |
{%- set image_count.value = image_count.value + 1 %}
|
| 14 |
{%- endif %}
|
| 15 |
+
{%- if add_vision_id %}
|
| 16 |
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 17 |
{%- endif %}
|
| 18 |
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
|
|
|
|
| 23 |
{%- if do_vision_count %}
|
| 24 |
{%- set video_count.value = video_count.value + 1 %}
|
| 25 |
{%- endif %}
|
| 26 |
+
{%- if add_vision_id %}
|
| 27 |
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 28 |
{%- endif %}
|
| 29 |
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
|
|
|
|
| 39 |
{{- raise_exception('Unexpected content type.') }}
|
| 40 |
{%- endif %}
|
| 41 |
{%- endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
{%- if not messages %}
|
| 43 |
{{- raise_exception('No messages provided.') }}
|
| 44 |
{%- endif %}
|
|
|
|
| 51 |
{%- endfor %}
|
| 52 |
{{- "\n</tools>" }}
|
| 53 |
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 54 |
+
{%- if messages[0].role == 'system' %}
|
| 55 |
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
{%- if content %}
|
| 57 |
{{- '\n\n' + content }}
|
| 58 |
{%- endif %}
|
| 59 |
{%- endif %}
|
| 60 |
{{- '<|im_end|>\n' }}
|
| 61 |
{%- else %}
|
| 62 |
+
{%- if messages[0].role == 'system' %}
|
| 63 |
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
|
| 65 |
{%- endif %}
|
| 66 |
{%- endif %}
|
|
|
|
| 80 |
{%- endif %}
|
| 81 |
{%- for message in messages %}
|
| 82 |
{%- set content = render_content(message.content, true)|trim %}
|
| 83 |
+
{%- if message.role == "system" %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
{%- if not loop.first %}
|
| 85 |
{{- raise_exception('System message must be at the beginning.') }}
|
| 86 |
{%- endif %}
|
|
|
|
| 97 |
{%- endif %}
|
| 98 |
{%- endif %}
|
| 99 |
{%- set reasoning_content = reasoning_content|trim %}
|
| 100 |
+
{%- if (preserve_thinking is defined and preserve_thinking is true) or (loop.index0 > ns.last_query_index) %}
|
| 101 |
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 102 |
{%- else %}
|
| 103 |
{{- '<|im_start|>' + message.role + '\n' + content }}
|
|
|
|
| 116 |
{%- else %}
|
| 117 |
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 118 |
{%- endif %}
|
| 119 |
+
{%- if tool_call.arguments is defined %}
|
| 120 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 121 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 122 |
+
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
|
| 123 |
+
{{- args_value }}
|
| 124 |
+
{{- '\n</parameter>\n' }}
|
| 125 |
+
{%- endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
{%- endif %}
|
| 127 |
{{- '</function>\n</tool_call>' }}
|
| 128 |
{%- endfor %}
|
|
|
|
| 146 |
{%- endfor %}
|
| 147 |
{%- if add_generation_prompt %}
|
| 148 |
{{- '<|im_start|>assistant\n' }}
|
| 149 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 150 |
{{- '<think>\n\n</think>\n\n' }}
|
| 151 |
{%- else %}
|
| 152 |
{{- '<think>\n' }}
|