Instructions to use Qwen/Qwen3.6-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen3.6-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.6-27B") 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("Qwen/Qwen3.6-27B") model = AutoModelForMultimodalLM.from_pretrained("Qwen/Qwen3.6-27B") 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]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
- Local Apps Settings
- vLLM
How to use Qwen/Qwen3.6-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen3.6-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.6-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Qwen/Qwen3.6-27B
- SGLang
How to use Qwen/Qwen3.6-27B 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 "Qwen/Qwen3.6-27B" \ --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": "Qwen/Qwen3.6-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Qwen/Qwen3.6-27B" \ --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": "Qwen/Qwen3.6-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Qwen/Qwen3.6-27B with Docker Model Runner:
docker model run hf.co/Qwen/Qwen3.6-27B
Dense 60-120B
Qwen3.6-27B says that to see a significant improvement, a minimum target of 60-80B parameters would be required and an ideal target, for major gains, would be 100-130B.
Motivation:
- High RAM/memory prices, especially RAM.
- A dense model provides a much better performance for a given parameter size (see¹ for what it's worth) vs a MoE model.
- My 70 GB (64 GB RAM + 12 GB VRAM - 6 GB for the OS + x GB for the context) can't fit a good, UD-Q4_K_M, 122B quant, but can easily fit the better performing (at least according to¹ and also various comments) 27B quant.
- For me and from comments, for many, speed can be much less relevant for a high quality answer.
- That being said, a 60B Q4_K_M quant (approx. 40 GB) will still fit in a 2 x 24 GB setup and run pretty fast.
- The 6.4 times (5984744/932498) higher monthly download count for the 27B dense vs 122B MoE may confirm the limited memory for many (yes, the 27B is the newer Qwen3.6, but the 3.5-122B has never been as popular as 3.5-27B (2452527 monthly downloads)).
Well… the thing is that a 27B dense model will reliably outperform a 35B MoE (or larger) model as long as the payload stays within a reasonable range — say, up to ~128k tokens. Once you cross that line, a small dense model may (or may not) start losing a bit of attention stability (minor language slips, small factual inconsistencies, etc.) Not because it’s “stupid”, but simply because it’s too small to maintain a perfectly stable attention matrix at very large context sizes — mathematics always wins.
Moreover, in real‑world use I would never choose a Q4‑quantized 60B over a smaller dense BF16/FP16 model for strictly logical, multi‑layer reasoning tasks where a high-quality answer is expected. Quantization noise (plus MoE routing noise) accumulates, and deep causal reasoning suffers.
A genuinely intelligent model (see Qwen3.6 27B) doesn’t need a full Wikipedia baked into its weights — it can compensate for missing knowledge through external tools. Intelligence is the most valuable property of Qwen3.6, unless the model is used purely for casual chatbot tasks.
Regards,
/WS