Instructions to use nyamkhuu/Qwen3.5-9B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nyamkhuu/Qwen3.5-9B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nyamkhuu/Qwen3.5-9B-FP8") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("nyamkhuu/Qwen3.5-9B-FP8") model = AutoModelForMultimodalLM.from_pretrained("nyamkhuu/Qwen3.5-9B-FP8", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nyamkhuu/Qwen3.5-9B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nyamkhuu/Qwen3.5-9B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyamkhuu/Qwen3.5-9B-FP8", "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/nyamkhuu/Qwen3.5-9B-FP8
- SGLang
How to use nyamkhuu/Qwen3.5-9B-FP8 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 "nyamkhuu/Qwen3.5-9B-FP8" \ --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": "nyamkhuu/Qwen3.5-9B-FP8", "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 "nyamkhuu/Qwen3.5-9B-FP8" \ --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": "nyamkhuu/Qwen3.5-9B-FP8", "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 nyamkhuu/Qwen3.5-9B-FP8 with Docker Model Runner:
docker model run hf.co/nyamkhuu/Qwen3.5-9B-FP8
Qwen3.5-9B FP8 (W8A8) + FP8 KV cache
Qwen/Qwen3.5-9B quantized with llm-compressor 0.15.0 into compressed-tensors format, then served, verified, benchmarked and evaluated on vLLM 0.33 and SGLang 0.5.23 on one NVIDIA RTX PRO 6000 Blackwell. Code, method and full results: https://github.com/d-nyamkhuu/qwen3.5-quantization.
Recipe
FP8 E4M3 weights (per-channel scales) and dynamic per-token FP8 activations on every text Linear, plus static per-tensor FP8 KV-cache scales for the 8 full-attention layers. The vision tower, embeddings, the 32-wide Gated DeltaNet gates, conv1d, norms and the MTP head stay
in BF16. Calibrated on 512 samples (up to 8,192 tokens) of a 2,048-sample set of the model's own reasoning
traces and tool calls, multi-turn chat and instruction data, rendered with its chat template.
Serving
vllm serve nyamkhuu/Qwen3.5-9B-FP8 --language-model-only --max-model-len 32768 \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder
python -m sglang.launch_server --model-path nyamkhuu/Qwen3.5-9B-FP8 --context-length 32768 \
--reasoning-parser qwen3 --tool-call-parser qwen3_coder
Verified inside both engines
- vLLM: weights as stored in every projection; FP8 KV cache with the checkpoint's scales in 8/8 layers;
CutlassFP8ScaledMMLinearKernelร128 - SGLang: weights as stored in every projection; FP8 KV cache with the checkpoint's scales in 8/8 layers;
CompressedTensorsW8A8Fp8ร128
Results vs BF16 (one RTX PRO 6000)
| Engine | Variant | Single-user tokens/s | Peak tokens/s | KV-cache tokens | MATH-100 | GPQA-D-100 | BFCL | JSON exact |
|---|---|---|---|---|---|---|---|---|
| vLLM | FP8 | 128 | 5,602 | 3,348,070 | 80% | 41% | 92.0% | 78% |
| vLLM | BF16 | 83 | 4,004 | 1,746,137 | 81% | 37% | 91.7% | 78% |
| SGLang | FP8 | 81 | 4,293 | 2,472,435 | 80% | 38% | 91.7% | 78% |
| SGLang | BF16 | 85 | 3,346 | 1,126,073 | 81% | 39% | 91.1% | 78% |
1,024 tokens in, 512 out. MATH and GPQA use thinking capped at 16,384 tokens (ยฑ5 points standard error at n=100); BFCL v3 non-live has 1,000 questions; JSON is NousResearch/json-mode-eval.
- Downloads last month
- 34