Instructions to use unsloth/Qwen3.6-35B-A3B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Qwen3.6-35B-A3B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="unsloth/Qwen3.6-35B-A3B-NVFP4") 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("unsloth/Qwen3.6-35B-A3B-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("unsloth/Qwen3.6-35B-A3B-NVFP4", device_map="auto") 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 unsloth/Qwen3.6-35B-A3B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Qwen3.6-35B-A3B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Qwen3.6-35B-A3B-NVFP4", "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/unsloth/Qwen3.6-35B-A3B-NVFP4
- SGLang
How to use unsloth/Qwen3.6-35B-A3B-NVFP4 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 "unsloth/Qwen3.6-35B-A3B-NVFP4" \ --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": "unsloth/Qwen3.6-35B-A3B-NVFP4", "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 "unsloth/Qwen3.6-35B-A3B-NVFP4" \ --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": "unsloth/Qwen3.6-35B-A3B-NVFP4", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/Qwen3.6-35B-A3B-NVFP4 with Docker Model Runner:
docker model run hf.co/unsloth/Qwen3.6-35B-A3B-NVFP4
ValueError: moe_backend='flashinfer_b12x' is not supported for FP8 MoE.
Hello,
When running on an NVIDIA RTX PRO 6000 Blackwell GPU, I encountered the following issue:
ValueError: moe_backend='flashinfer_b12x' is not supported for FP8 MoE. Expected one of ['triton', 'deep_gemm', 'cutlass', 'flashinfer_trtllm', 'flashinfer_cutlass', 'marlin', 'humming', 'aiter', 'hpc'].
[rank0]:[W713 13:28:01.345067028 ProcessGroupNCCL.cpp:1575] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
on dgx spark the same error
@shakhizat For RTX PRO 6000 - no need for the flag - set "flashinfer_trtllm" or "flashinfer_cutlass"
@moranilt You need the latest vLLM:
uv venv unsloth-nvfp4-env --python 3.13
source unsloth-nvfp4-env/bin/activate
uv pip install "vllm>=0.25.0" "flashinfer-python>=0.6.13" "nvidia-cutlass-dsl>=4.5.2" \
--torch-backend=auto
export CUTE_DSL_ARCH=sm_121a
vllm serve unsloth/Qwen3.6-35B-A3B-NVFP4 --moe-backend flashinfer_b12x
@danielhanchen tell me what should I add for this docker compose setup. I'm using ifficial vllm image v0.25.0
qwen-dense:
image: vllm/vllm-openai:v0.25.0
container_name: qwen-dense
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
environment:
- HF_TOKEN=token
- CUTE_DSL_ARCH=sm_121a
- CUDA_VISIBLE_DEVICES=0
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
ipc: host
ports:
- "8000:8000"
command: >
--model unsloth/Qwen3.6-27B-NVFP4
--port 8000
--reasoning-parser qwen3
--dtype auto
--kv-cache-dtype fp8
--tensor-parallel-size 1
--max-num-seqs 8
--max-model-len 190000
--gpu-memory-utilization 0.7
--trust-remote-code
--enable-prefix-caching
--enable-prompt-tokens-details
--max-num-batched-tokens 65536
--enable-auto-tool-choice
--tool-call-parser qwen3_coder
--quantization compressed-tensors
--attention-backend flashinfer
--moe-backend flashinfer_b12x
--enable-chunked-prefill
--async-scheduling
--speculative-config '{"method":"mtp","num_speculative_tokens":2}'
--default-chat-template-kwargs '{"preserve_thinking":false}'