Instructions to use unsloth/Qwen3.8-27B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use unsloth/Qwen3.8-27B-NVFP4 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/Qwen3.8-27B-NVFP4 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/Qwen3.8-27B-NVFP4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/Qwen3.8-27B-NVFP4 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="unsloth/Qwen3.8-27B-NVFP4", max_seq_length=2048, )
Qwen3.8-27B Serving Configs: DGX Spark vLLM NVFP4
Nvidia DGX Spark config with vLLM
name: unsloth-qwen38-27b-nvfp4
services:
vllm:
image: vllm/vllm-openai@sha256:c96082d33456ceeae7ec0d4faf2b5e47fb806a103decf94f9fbc9b35fd7d6b25
container_name: unsloth-qwen3.8-27b-nvfp4
restart: unless-stopped
ipc: host
devices: [nvidia.com/gpu=all]
ports: ["127.0.0.1:8000:8000"]
environment:
HF_HUB_OFFLINE: "1"
TRANSFORMERS_OFFLINE: "1"
NVIDIA_DRIVER_CAPABILITIES: compute,utility
volumes:
- /home/erdal/Documents/models/unsloth-Qwen3.8-27B-NVFP4:/model:ro
- vllm-cache:/root/.cache
command:
- /model
- --served-model-name
- unsloth/Qwen3.8-27B-NVFP4
- --host
- 0.0.0.0
- --port
- "8000"
- --tensor-parallel-size
- "1"
- --max-model-len
- "262144"
- --max-num-seqs
- "4"
- --gpu-memory-utilization
- "0.50"
- --kv-cache-dtype
- fp8
- --reasoning-parser
- qwen3
- --enable-auto-tool-choice
- --tool-call-parser
- qwen3_coder
- --speculative-config
- '{"method":"mtp","num_speculative_tokens":2}'
healthcheck:
test: [CMD, curl, -fsS, http://127.0.0.1:8000/health]
interval: 30s
timeout: 10s
retries: 20
start_period: 15m
stop_grace_period: 2m
volumes:
vllm-cache:
Nice!
gpu-memory-utilization can be lowered to 0,42. Rules of thumb I go by are:
- Look at the storage size it requires on https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4/tree/main (it says 23,4GB)
- From 23,4, add 16 (for 261k tokens, approximately) = 39,4
- Set the context memory rounded to that number = 0,39
I haven't tested lower than 0,42 though.
gpu-memory-utilizationcan be lowered to 0,42. Rules of thumb I go by are:
- Look at the storage size it requires on https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4/tree/main (it says 23,4GB)
- From 23,4, add 16 (for 261k tokens, approximately) = 39,4
- Set the context memory rounded to that number = 0,39
I haven't tested lower than 0,42 though.
I tried 0.40 and it seems to be working on my DGX Spark.
I'm very far from an expert on this but it seems to be working fine for my hermes agents' api calls.
From my docker config:
vllm-qwen38:
<<: *vllm-common
profiles: ["qwen38"]
container_name: vllm-qwen38
ports:
- "8000:8000"
command:
- ${QWEN38_MODEL:-unsloth/Qwen3.8-27B-NVFP4}
- "--host"
- "0.0.0.0"
- "--port"
- "8000"
- "--served-model-name"
- "${QWEN38_SERVED_NAME:-spark-coder}"
- "--tensor-parallel-size"
- "${QWEN38_PAR_SIZE:-1}"
- "--max-model-len"
- "${QWEN38_MAX_MODEL_LEN:-262144}"
- "--gpu-memory-utilization"
- "${GPU_MEM_UTIL:-0.40}"
- "--max-num-seqs"
- "${MAX_NUM_SEQS:-4}"
- "--enable-auto-tool-choice"
- "--tool-call-parser"
- "${QWEN38_TOOL_PARSER:-qwen3_coder}"
- "--kv-cache-dtype"
- "fp8"
- "--reasoning-parser"
- "qwen3"
- "--language-model-only"
- "--speculative-config"
- '{"method":"mtp","num_speculative_tokens":2}'
- "--api-key"
- "${VLLM_API_KEY:-spark-local-change-me}"
- "--trust-remote-code"
Here's mine:
services:
vllm:
container_name: vllm
image: vllm/vllm-openai:qwen38
ipc: host
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ports:
- "8000:8000"
environment:
- HF_TOKEN=${HF_TOKEN}
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
configs:
- source: vllm_runtime_config
target: /etc/vllm/config.yaml
command: --config /etc/vllm/config.yaml
configs:
vllm_runtime_config:
content: |
model: "unsloth/Qwen3.8-27B-NVFP4"
trust_remote_code: true
gpu_memory_utilization: 0.8
enable_per_request_metrics: true
enable_return_routed_experts: true
max_model_len: 262144
reasoning_parser: "qwen3"
# needed?
default_chat_template_kwargs: '{"preserve_thinking": true}'
enable_auto_tool_choice: true
tool_call_parser: "qwen3_coder"
# for effectively serving concurrent requests
enable_prefix_caching: true
# JSON string converted to native YAML map
speculative_config:
method: "mtp"
num_speculative_tokens: 2
Single Spark. Single request is 15-23 tokens/s. I've hand-wavey measured 5 concurrent requests before tokens/s/request begin to consistently drop below 15.
I have a warning log message in my vLLM execution on DGX Spark:
Model unsloth/Qwen3.8-27B-NVFP4 is treated as multimodal but has no registered multimodal processor; running in text-only mode.
Does anyone know how to fix this? At the moment my model cannot read image inputs.
I have a warning log message in my vLLM execution on DGX Spark:
Model unsloth/Qwen3.8-27B-NVFP4 is treated as multimodal but has no registered multimodal processor; running in text-only mode.
Does anyone know how to fix this? At the moment my model cannot read image inputs.
I didn't even know this, but honestly, this model is just broken in so many ways, it's best to wait until they release post-training/adjustments/etc. Just stick with 3.6 for now.