Instructions to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP") model = AutoModelForMultimodalLM.from_pretrained("sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP
- SGLang
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with Docker Model Runner:
docker model run hf.co/sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP
Broken chat_template tool calling and thinking
I was having a lot of problems with silent ends of my coding agents. It seems to do with chat_template as per https://www.reddit.com/r/Qwen_AI/comments/1stt081/fixed_jinja_chat_templates_for_qwen_35_and_36/
https://github.com/abysslover/qwen36_tool_calling_failure/tree/main
So I think it is worth to include this fixes into the repo.
Thanks for the report and for pointing to the Qwen3.6 chat template/tool-calling issue.
I reviewed the shipped chat_template.jinja and confirmed that these Qwen3.6-27B-family NVFP4 repos were still using the upstream Qwen3.6 template, so they could inherit the reported coding-agent/tool-calling and thinking-toggle problems.
I have prepared and rolled out a conservative patched chat_template.jinja for the affected Qwen3.6-27B-family releases. The patch keeps Qwen's existing XML-like tool-call format and preserves the original vision/text rendering, while adding fixes for:
- leading
developermessages by folding them into the system block <|think_on|>/<|think_off|>handling without exposing those control tokens to the modelenable_thinking=falsebehavior- historical
assistant.tool_callsserialization for both mapping and JSON-string arguments - including the tool/function name in tool responses when available
I also tested the template rendering locally for normal chat, VLM/image content, tool calls with mapping arguments, tool calls with JSON-string arguments, and thinking-off cases before applying it.
Thanks again for catching this.
— Tonoken3 / LNA-LAB
Thanks for the report and for pointing to the Qwen3.6 chat template/tool-calling issue.
I reviewed the shipped
chat_template.jinjaand confirmed that these Qwen3.6-27B-family NVFP4 repos were still using the upstream Qwen3.6 template, so they could inherit the reported coding-agent/tool-calling and thinking-toggle problems.I have prepared and rolled out a conservative patched
chat_template.jinjafor the affected Qwen3.6-27B-family releases. The patch keeps Qwen's existing XML-like tool-call format and preserves the original vision/text rendering, while adding fixes for:
- leading
developermessages by folding them into the system block<|think_on|>/<|think_off|>handling without exposing those control tokens to the modelenable_thinking=falsebehavior- historical
assistant.tool_callsserialization for both mapping and JSON-string arguments- including the tool/function name in tool responses when available
I also tested the template rendering locally for normal chat, VLM/image content, tool calls with mapping arguments, tool calls with JSON-string arguments, and thinking-off cases before applying it.
Thanks again for catching this.
— Tonoken3 / LNA-LAB
Thanks for help!! Does it also include fix for this? https://huggingface.co/Qwen/Qwen3.6-27B/discussions/16
Quick follow-up: I also checked the Qwen3.6-35B-A3B-family NVFP4 releases.
The official Qwen/Qwen3.6-35B-A3B chat_template.jinja is byte-identical to the Qwen3.6-27B template, so the same tool-calling / thinking-toggle issues can be inherited there as well. I have now rolled out the same conservative patched template to the affected 35B-A3B-family repos too.
This keeps the upstream vision/text rendering and Qwen XML-like tool-call format, while adding the same fixes for leading developer messages, <|think_on|> / <|think_off|>, enable_thinking=false, historical tool-call argument serialization, and function names in tool responses.
— Tonoken3 / LNA-LAB
does it also apply this? https://huggingface.co/Qwen/Qwen3.6-27B/discussions/20 It is known bug that qwen halucinate block into from time to time and this should be addressed as well.
Quick follow-up: I also checked the Qwen3.6-35B-A3B-family NVFP4 releases.
The official
Qwen/Qwen3.6-35B-A3Bchat_template.jinjais byte-identical to the Qwen3.6-27B template, so the same tool-calling / thinking-toggle issues can be inherited there as well. I have now rolled out the same conservative patched template to the affected 35B-A3B-family repos too.This keeps the upstream vision/text rendering and Qwen XML-like tool-call format, while adding the same fixes for leading
developermessages,<|think_on|>/<|think_off|>,enable_thinking=false, historical tool-call argument serialization, and function names in tool responses.— Tonoken3 / LNA-LAB
i am testing your fixed chat template and so far i see MUCH more robust chats, no silent drops yet!! Thanks
I had issues with lack of prompt caching... 0%. I changed over to this chat template from https://huggingface.co/RedHatAI/Qwen3.6-35B-A3B-NVFP4 and all is good now.
Edit: idk now it is fine prompt caching is at 80% so probably skill issue on my end.
Edit; redhat template is stopping silently as wel..
Now using this fixed template https://github.com/allanchan339/vLLM-Qwen3.5-27B/blob/main/qwen3.5-enhanced.jinja
and --tool-call-parser qwen3_xml . Going for 2 hrs without silent stop on opencode.
https://www.reddit.com/r/LocalLLM/comments/1sv6cqk/follow_up_tested_tool_calling_fixes_for_qwen/ THIS IS WORKING WITH LATEST VLLM NIGHTLY DOCKER IMAGE
Hi @livepeer-ren ,
Thank you for the screenshot and for the Reddit reference. I read through the follow-up post as well.
The distinction around preserve_thinking is especially useful. It sounds like there are two related but different serving paths that should not be mixed accidentally:
The current Qwen3.6 / vLLM nightly path using
reasoning_parser=qwen3,tool_call_parser=qwen3_coder, and reasoning separation.The
qwen3.5-enhanced.jinjapath, wherepreserve_thinking=falseis mandatory, andqwen3_coderis preferred for Qwen3.6 because it can catch tool calls even when the model leaves a thinking block unclosed.
That is a very helpful clarification. I’ll avoid documenting this as a single universal recipe until I compare both paths more carefully.
The driver / NCCL notes from the Reddit post are also important, especially the warning that NVIDIA Studio Driver 595.79 deadlocks can look like tool-calling failures. I’ll keep that in mind when testing and documenting the recommended setup.
For now, I’ll treat the latest vLLM nightly Docker image plus qwen3_coder as the most promising direction, and I’ll test whether the model repos should keep the conservative template, adopt the enhanced template, or document both variants depending on preserve_thinking.
Thanks again. This is exactly the kind of real agentic workflow report that helps make the model card recommendations practical.
Best,
Tonoken3 / LNA-LAB
I just run another test. With qwen_xml and this worked 180k context agentic task in opencode without any hiccups. chat_template.jinja from https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/discussions/2 with this fix to also work with openclaw. Works well finally! latest image: vllm/vllm-openai:nightly is mandatory! also with --preserve thinking true
Quick follow-up: I also checked the Qwen3.6-35B-A3B-family NVFP4 releases.
The official
Qwen/Qwen3.6-35B-A3Bchat_template.jinjais byte-identical to the Qwen3.6-27B template, so the same tool-calling / thinking-toggle issues can be inherited there as well. I have now rolled out the same conservative patched template to the affected 35B-A3B-family repos too.This keeps the upstream vision/text rendering and Qwen XML-like tool-call format, while adding the same fixes for leading
developermessages,<|think_on|>/<|think_off|>,enable_thinking=false, historical tool-call argument serialization, and function names in tool responses.— Tonoken3 / LNA-LAB
I can confirm that the base model also has this issue. It's kinda rare - I see it maybe 2 to 6 times per 1000 requests.
