Instructions to use neurosquad/Qwen3.5-9B-SEEDPACK with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Desktop
Qwen3.5-9B-SEEDPACK
The complete unsloth/Qwen3.5-9B-GGUF repository in one 12.40 GB archive instead of 147.81 GB. That covers the BF16 model, all 21 quants from UD-IQ2_XXS to UD-Q8_K_XL, the vision projector in BF16, F16 and F32, the imatrix and the README. The archive is 8.39% of the original size and smaller than the repository's largest single file, Qwen3.5-9B-UD-Q8_K_XL.gguf (12.97 GB).
Every file is restored byte for byte. The SHA-256 of each file matches unsloth/Qwen3.5-9B-GGUF; the full list is below.
What is SeedPack?
SeedPack is a lossless GPU archiver for GGUF model repositories, made by NeuroSquad.
A GGUF repository ships the same weights 20โ30 times: the BF16 model plus every quantization of it. SeedPack uses the fact that every quant is a deterministic function of the same weights:
- The seed is stored once. The BF16 model is coded with an entropy coder built for BF16 weights: 17.92 GB โ 11.73 GB (65.4%).
- Quants are grown, not stored. Each quant is computed again from the seed on the GPU with a bit-exact CUDA port of llama.cpp's quantizers (
ggml-quants.c) and the repository's importance matrix. - Only the difference is kept. Where a re-derived quant differs from the published file, SeedPack stores a residual coded with the quantizer's own probabilities. Here all 21 quants together cost 68.0 MB on top of the seed.
- Big models are streamed. The BF16 model is larger than a 12 GB GPU, so packing and unpacking go through it in windows of about 1 GB of tensors. The BF16 file is never held whole, in RAM or on disk, unless you extract it.
- Everything is verified. Unpacking checks the BLAKE3 hash of every file and the CRC32 of every chunk.
How to use
1. Install SeedPack
pip install "seedpack>=0.2.2"
Requirements:
- An NVIDIA GPU, Turing (RTX 20xx) or newer, with a CUDA 13 driver (R580 or newer). The model does not have to fit in GPU memory.
- Python 3.11+.
- Windows 10/11 or Linux. Tested on an RTX 5070 (12 GB) under Windows 10. No CUDA Toolkit is needed.
- Disk space for the archive (12.40 GB) plus the files you extract.
The first run compiles the GPU quantizers for your card (about 15 s) and caches them.
2. Extract quants or the whole repository
SeedPack reads the archive straight from this repository. list fetches only the index; x downloads the archive once into the Hugging Face cache.
seedpack list hf://neurosquad/Qwen3.5-9B-SEEDPACK # what is inside
seedpack x hf://neurosquad/Qwen3.5-9B-SEEDPACK Qwen3.5-9B-Q4_K_M.gguf -o models # one quant
seedpack x hf://neurosquad/Qwen3.5-9B-SEEDPACK "*Q4_K_M*" mmproj-F16.gguf -o models # several, by name or mask
seedpack x hf://neurosquad/Qwen3.5-9B-SEEDPACK -o models # the whole repository
seedpack test hf://neurosquad/Qwen3.5-9B-SEEDPACK # decode and verify everything, write nothing
A downloaded copy works the same way:
hf download neurosquad/Qwen3.5-9B-SEEDPACK Qwen3.5-9B.seedpack --local-dir .
seedpack x Qwen3.5-9B.seedpack Qwen3.5-9B-Q4_K_M.gguf -o models
3. Run the model
The extracted files are the original Unsloth GGUFs, so any GGUF runtime works:
llama-cli -m models/Qwen3.5-9B-Q4_K_M.gguf --mmproj models/mmproj-F16.gguf --jinja
Ollama, LM Studio, Jan and KoboldCpp open the extracted .gguf files directly. Recommended settings are in the original card below.
Speed
Measured on an NVIDIA RTX 5070 (12 GB), an Intel Core i7-8700K (6 cores / 12 threads), 32 GB RAM and Windows 10, with the archive on two SATA SSDs in a stripe (about 1 GB/s) and a cold OS cache. Times include process start and file writes; a single extracted quant goes to another SATA SSD (about 380 MB/s, which is most of its time).
| Operation | Time | Speed |
|---|---|---|
| Pack the whole repository (147.81 GB) | 232 s | 637 MB/s |
| Extract one quant (Q4_K_M, 5.68 GB) | 21 s | 271 MB/s |
| Extract the whole repository | 227 s | 651 MB/s |
| Test the whole repository (decode and verify, no writes) | 140 s | 1,056 MB/s |
Peak GPU memory is 9.5 GB when packing and 6.3 GB when unpacking. Extracting one quant reads the whole coded BF16 model (11.73 GB), so on a slower disk it takes about as long as reading that much. IQ quants take longer: their quantizers are slow even on the GPU (UD-IQ2_XXS: about 23 s).
The archive was made with SeedPack 0.2.1.
Contents of the archive
28 files, 147.81 GB. Click to expand.
| File | Size | In the archive | SHA-256 |
|---|---|---|---|
Qwen3.5-9B-BF16.gguf |
17.92 GB | 11.73 GB | daebe40eeea7057c1cdf35ac56d13f507d8bf12171bbb7a6b6b0d3f05439159a |
Qwen3.5-9B-IQ4_NL.gguf |
5.37 GB | 3.1 MB | 12fd6b43e298ae4c8d374e64e8c2406c252d109ead47dffb46e75be3566ed0e5 |
Qwen3.5-9B-IQ4_XS.gguf |
5.17 GB | 2.3 MB | 7e918aeca06c52bcb528ea6b04b4ec957e75ee8c0a73138854c0dfcf371ea429 |
Qwen3.5-9B-Q3_K_M.gguf |
4.67 GB | 3.6 MB | 8fed90306e4f019e2bf35f3766470b7bc59ea1a9dae00f5ceb20b43cb5514393 |
Qwen3.5-9B-Q3_K_S.gguf |
4.32 GB | 3.2 MB | 162050d39ebae6b8a87435f282bcb7a0e3fab7b2444db730966b3fef1ed0179e |
Qwen3.5-9B-Q4_0.gguf |
5.38 GB | 3.3 MB | 17670346b4260ddcb0173965145155885024f3c9a4a24389a3370751edbcde24 |
Qwen3.5-9B-Q4_1.gguf |
5.84 GB | 4.9 MB | 5fb62c51d47454ac1dd2fab6b40cedb94755232b553c2f245a7e13e3991b252a |
Qwen3.5-9B-Q4_K_M.gguf |
5.68 GB | 4.0 MB | 03b74727a860a56338e042c4420bb3f04b2fec5734175f4cb9fa853daf52b7e8 |
Qwen3.5-9B-Q4_K_S.gguf |
5.39 GB | 4.1 MB | 023713a5240bf58a84d2890a30deb2e0485abb5b9b9c33ba67596e9248b35f80 |
Qwen3.5-9B-Q5_K_M.gguf |
6.58 GB | 3.8 MB | dc2a39aef291f91a9116ad214058da0d86eb648743a124bd8c333787c4b9c91c |
Qwen3.5-9B-Q5_K_S.gguf |
6.36 GB | 4.1 MB | be88613a50ba792bd5a2bc07b74bcd97c9ed9dbac028d27a44c6888e712323c3 |
Qwen3.5-9B-Q6_K.gguf |
7.46 GB | 3.2 MB | 91898433cf5ce0a8f45516a4cc3e9343b6e01d052d01f684309098c66a326c59 |
Qwen3.5-9B-Q8_0.gguf |
9.53 GB | 294.5 KB | 809626574d0cb43d4becfa56169980da2bb448f2299270f7be443cb89d0a6ae4 |
Qwen3.5-9B-UD-IQ2_M.gguf |
3.65 GB | 7.1 MB | a31b6b4c603ddd66b5496ee065c9dd13b2b6de77dce9e5d59609aef8d39868e7 |
Qwen3.5-9B-UD-IQ2_XXS.gguf |
3.19 GB | 1.6 MB | 570ce2bbc92545cffbcb01df43cba59d86093dadc34c25da9f554d256bc70b91 |
Qwen3.5-9B-UD-IQ3_XXS.gguf |
4.02 GB | 3.3 MB | 40d0f32cd3030b04f0784139a589fb63e876cfbf8667d56311b79783c74fd149 |
Qwen3.5-9B-UD-Q2_K_XL.gguf |
4.12 GB | 3.0 MB | fcea605227c939525a4145349a082f603d7e5df639be3d88b7aa1e883517552c |
Qwen3.5-9B-UD-Q3_K_XL.gguf |
5.05 GB | 3.2 MB | aae0879e1be99ce93f0d56217f8185a399e25ad68a8ebbc095f362706283062f |
Qwen3.5-9B-UD-Q4_K_XL.gguf |
5.97 GB | 3.6 MB | 6f5d30666c2d8ae16a306e616d95341dcf3cc46810df84d7e6f5a7d1e4c1b293 |
Qwen3.5-9B-UD-Q5_K_XL.gguf |
6.74 GB | 3.6 MB | 96cf42ddb97f9572410a72b9ed6f2299b1e887ee08da4c2a6c01e897cfa9f673 |
Qwen3.5-9B-UD-Q6_K_XL.gguf |
8.76 GB | 2.4 MB | 33b0050fb9c19abcf815647a78464dad959a06dadaecb0b96af798669f9074d4 |
Qwen3.5-9B-UD-Q8_K_XL.gguf |
12.97 GB | 399.8 KB | 2c4e08e0e72c68d8c1835a26f5be4075894df9ea5be9cc20a246517afd6a0cb6 |
mmproj-BF16.gguf |
921.7 MB | 598.5 MB | 853698ce7aa6c7ba732478bad280240969ddf7b0fcbf93900046f63903a83383 |
mmproj-F16.gguf |
918.2 MB | 28.2 KB | f70dc3509053962b0d0d3ee8a7eacebf5d60aa560cad78254ae8698516ae029f |
mmproj-F32.gguf |
1.82 GB | 57.8 KB | a1cd5c1625b44dd0facaec998020e9b36cb78c2225eaee701e73bf2e5b051ce2 |
.gitattributes |
3.1 KB | (bundle) | git blob 51b8133947a4829519fceb38c81356a7f43fb5e0 |
README.md |
78.9 KB | (bundle) | git blob b876513d670a4d8a0b63b2f3016dea1a5659b245 |
imatrix_unsloth.gguf_file |
5.2 MB | (bundle) | 0c1bd74975ad7cf1135ad0cab1219dd5b6a8529488e5b9b207aa37c0e5396834 |
README.md and .gitattributes are in the small-files bundle (2.7 MB with the imatrix).
Original model card
The original card of unsloth/Qwen3.5-9B-GGUF follows, unchanged. The model is by the Qwen team (Apache 2.0), and the GGUF quantizations are by Unsloth.
To run Qwen3.5 locally - Read our Guide!
Unsloth Dynamic 2.0 achieves superior accuracy & outperforms other leading quants.
- You can now also fine-tune the model locally with Unsloth.
- Read our Qwen3.5 fine-tuning guide here.
Qwen3.5-9B
This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format.
These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, KTransformers, etc.
Over recent months, we have intensified our focus on developing foundation models that deliver exceptional utility and performance. Qwen3.5 represents a significant leap forward, integrating breakthroughs in multimodal learning, architectural efficiency, reinforcement learning scale, and global accessibility to empower developers and enterprises with unprecedented capability and efficiency.
Qwen3.5 Highlights
Qwen3.5 features the following enhancement:
Unified Vision-Language Foundation: Early fusion training on multimodal tokens achieves cross-generational parity with Qwen3 and outperforms Qwen3-VL models across reasoning, coding, agents, and visual understanding benchmarks.
Efficient Hybrid Architecture: Gated Delta Networks combined with sparse Mixture-of-Experts deliver high-throughput inference with minimal latency and cost overhead.
Scalable RL Generalization: Reinforcement learning scaled across million-agent environments with progressively complex task distributions for robust real-world adaptability.
Global Linguistic Coverage: Expanded support to 201 languages and dialects, enabling inclusive, worldwide deployment with nuanced cultural and regional understanding.
Next-Generation Training Infrastructure: Near-100% multimodal training efficiency compared to text-only training and asynchronous RL frameworks supporting massive-scale agent scaffolds and environment orchestration.
For more details, please refer to our blog post Qwen3.5.
Model Overview
- Type: Causal Language Model with Vision Encoder
- Training Stage: Pre-training & Post-training
- Language Model
- Number of Parameters: 9B
- Hidden Dimension: 4096
- Token Embedding: 248320 (Padded)
- Number of Layers: 32
- Hidden Layout: 8 ร (3 ร (Gated DeltaNet โ FFN) โ 1 ร (Gated Attention โ FFN))
- Gated DeltaNet:
- Number of Linear Attention Heads: 32 for V and 16 for QK
- Head Dimension: 128
- Gated Attention:
- Number of Attention Heads: 16 for Q and 4 for KV
- Head Dimension: 256
- Rotary Position Embedding Dimension: 64
- Feed Forward Network:
- Intermediate Dimension: 12288
- LM Output: 248320 (Padded)
- MTP: trained with multi-steps
- Context Length: 262,144 natively and extensible up to 1,010,000 tokens.
Benchmark Results
Language
| GPT-OSS-120B | GPT-OSS-20B | Qwen3-Next-80B-A3B-Thinking | Qwen3-30BA3B-Thinking-2507 | Qwen3.5-9B | Qwen3.5-4B | |
|---|---|---|---|---|---|---|
| Knowledge & STEM | ||||||
| MMLU-Pro | 80.8 | 74.8 | 82.7 | 80.9 | 82.5 | 79.1 |
| MMLU-Redux | 91.0 | 87.8 | 92.5 | 91.4 | 91.1 | 88.8 |
| C-Eval | 76.2 | 71.4 | 89.7 | 87.4 | 88.2 | 85.1 |
| SuperGPQA | 54.6 | 48.5 | 60.8 | 56.8 | 58.2 | 52.9 |
| GPQA Diamond | 80.1 | 71.5 | 77.2 | 73.4 | 81.7 | 76.2 |
| Instruction Following | ||||||
| IFEval | 88.9 | 88.2 | 88.9 | 88.9 | 91.5 | 89.8 |
| IFBench | 69.0 | 65.1 | 61.5 | 51.5 | 64.5 | 59.2 |
| MultiChallenge | 45.3 | 40.1 | 51.3 | 46.5 | 54.5 | 49.0 |
| Long Context | ||||||
| AA-LCR | 50.7 | 30.7 | 51.7 | 49.0 | 63.0 | 57.0 |
| LongBench v2 | 48.2 | 45.6 | 48.0 | 44.8 | 55.2 | 50.0 |
| Reasoning & Coding | ||||||
| HMMT Feb 25 | 90.0 | 76.7 | 73.7 | 63.1 | 83.2 | 74.0 |
| HMMT Nov 25 | 90.0 | 81.8 | 81.2 | 73.8 | 82.9 | 76.8 |
| LiveCodeBench v6 | 82.7 | 74.6 | 68.7 | 66.0 | 65.6 | 55.8 |
| OJBench | 41.5 | 36.3 | 29.7 | 25.1 | 29.2 | 24.1 |
| General Agent | ||||||
| BFCL-V4 | -- | -- | 49.7 | 42.4 | 66.1 | 50.3 |
| TAU2-Bench | -- | -- | 57.4 | 41.9 | 79.1 | 79.9 |
| VITA-Bench | -- | -- | 29.5 | 14.1 | 29.8 | 22.0 |
| DeepPlanning | -- | -- | 0.4 | 4.9 | 18.0 | 17.6 |
| Multilingualism | ||||||
| MMMLU | 78.2 | 69.7 | 81.3 | 78.4 | 81.2 | 76.1 |
| MMLU-ProX | 74.5 | 67.3 | 73.6 | 69.1 | 76.3 | 71.5 |
| NOVA-63 | 51.1 | 48.7 | 53.3 | 52.5 | 55.9 | 54.3 |
| INCLUDE | 74.0 | 65.3 | 78.3 | 74.4 | 75.6 | 71.0 |
| Global PIQA | 84.1 | 79.8 | 83.5 | 80.2 | 83.2 | 78.9 |
| PolyMATH | 54.0 | 30.9 | 62.4 | 52.6 | 57.3 | 51.1 |
| WMT24++ | 74.4 | 67.8 | 57.4 | 69.3 | 72.6 | 66.6 |
| MAXIFE | 83.7 | 80.1 | 79.9 | 77.4 | 83.4 | 78.0 |
* TAU2-Bench: we follow the official setup except for the airline domain, where all models are evaluated by applying the fixes proposed in the Claude Opus 4.5 system card.
* MMLU-ProX: we report the averaged accuracy on 29 languages.
* WMT24++: a harder subset of WMT24 after difficulty labeling and rebalancing; we report the averaged scores on 55 languages using XCOMET-XXL.
* MAXIFE: we report the accuracy on English + multilingual original prompts (totally 23 settings).
* Empty cells (--) indicate scores not yet available or not applicable.
Vision Language
| GPT-5-Nano-2025-08-07 | Gemini-2.5-Flash-Lite | Qwen3-VL-30B-A3B | Qwen3.5-9B | Qwen3.5-4B | |
|---|---|---|---|---|---|
| STEM and Puzzle | |||||
| MMMU | 75.8 | 73.4 | 76.0 | 78.4 | 77.6 |
| MMMU-Pro | 57.2 | 59.7 | 63.0 | 70.1 | 66.3 |
| MathVision | 62.2 | 52.1 | 65.7 | 78.9 | 74.6 |
| Mathvista(mini) | 71.5 | 72.8 | 81.9 | 85.7 | 85.1 |
| We-Math | 62.5 | 32.1 | 70.0 | 75.2 | 75.4 |
| DynaMath | 78.0 | 69.9 | 80.1 | 83.6 | 83.3 |
| ZEROBench | 1.0 | 1.0 | 0.0 | 3.0 | 3.0 |
| ZEROBench_sub | 22.2 | 19.2 | 23.7 | 31.1 | 26.3 |
| VlmsAreBlind | 66.7 | 68.4 | 72.5 | 93.7 | 92.6 |
| BabyVision | 14.4 | 17.5 | 18.6 | 28.6/25.8 | 16.0/19.1 |
| General VQA | |||||
| RealWorldQA | 71.8 | 72.2 | 77.4 | 80.3 | 79.5 |
| MMStar | 68.6 | 69.1 | 75.5 | 79.7 | 78.3 |
| MMBenchEN-DEV-v1.1 | 80.3 | 82.7 | 88.9 | 90.1 | 89.4 |
| SimpleVQA | 46.0 | 54.1 | 54.3 | 51.2 | 43.4 |
| HallusionBench | 58.4 | 64.5 | 66.0 | 69.3 | 65.0 |
| Text Recognition and Document Understanding | |||||
| OmniDocBench1.5 | 55.9 | 79.4 | 86.8 | 87.7 | 86.2 |
| CharXiv(RQ) | 50.1 | 56.1 | 56.6 | 73.0 | 70.8 |
| MMLongBench-Doc | 31.8 | 46.5 | 47.4 | 57.7 | 54.2 |
| CC-OCR | 58.9 | 72.9 | 77.8 | 79.3 | 76.7 |
| AI2D_TEST | 81.9 | 85.7 | 86.9 | 90.2 | 89.6 |
| OCRBench | 75.3 | 82.5 | 83.9 | 89.2 | 85.0 |
| Spatial Intelligence | |||||
| ERQA | 45.8 | 44.3 | 45.3 | 55.5 | 54.0 |
| CountBench | 80.0 | 79.2 | 90.0 | 97.2 | 96.3 |
| RefCOCO(avg) | -- | -- | 89.3 | 89.7 | 88.1 |
| EmbSpatialBench | 74.2 | 66.1 | 80.6 | 83.0 | 81.3 |
| RefSpatialBench | 12.6 | 11.2 | 54.2 | 58.5 | 54.6 |
| LingoQA | 57.0 | 17.8 | 62.0 | 80.4 | 74.4 |
| Hypersim | -- | -- | 11.4 | 13.5 | 12.5 |
| Nuscene | -- | -- | 10.3 | 11.8 | 9.9 |
| Video Understanding | |||||
| VideoMME(w sub.) | 71.7 | 74.6 | 79.9 | 84.5 | 83.5 |
| VideoMME(w/o sub.) | 66.2 | 72.7 | 73.3 | 78.4 | 76.9 |
| VideoMMMU | 63.0 | 69.2 | 75.0 | 78.9 | 74.1 |
| MLVU | 69.2 | 78.5 | 78.9 | 84.4 | 82.8 |
| MVBench | -- | -- | 72.0 | 74.4 | 71.2 |
| LVBench | -- | 60.9 | 59.2 | 70.0 | 66.4 |
| MMVU | 63.1 | 65.3 | 66.1 | 67.8 | 64.9 |
| Visual Agent | |||||
| ScreenSpot Pro | -- | -- | 60.5 | 65.2 | 60.3 |
| OSWorld-Verified | -- | -- | 30.6 | 41.8 | 35.6 |
| AndroidWorld | -- | -- | 55.0 | 57.8 | 58.6 |
| Tool Calling | |||||
| TIR-Bench | 18.5 | 21.5 | 22.5 | 45.6/31.9 | 38.9/29.9 |
| V* | 68.1 | 69.6 | 83.2 | 90.1/88.5 | 84.3/86.4 |
| Medical VQA | |||||
| SLAKE | 57.0 | 65.0 | 68.8 | 79.0 | 76.1 |
| PMC-VQA | 37.8 | 48.8 | 51.5 | 57.9 | 55.5 |
| MedXpertQA-MM | 26.7 | 35.3 | 35.5 | 49.9 | 42.9 |
* MathVision: our modelโs score is evaluated using a fixed prompt, e.g., โPlease reason step by step, and put your final answer within \boxed{}.โ For other models, we report the higher score between runs with and without the \boxed{} formatting.
* BabyVision: scores reported as "with CI / without CI".
* TIR-Bench and V*: scores reported as "with CI / without CI".
* Empty cells (--) indicate scores not yet available or not applicable.
Quickstart
Qwen3.5 models operate in thinking mode by default, generating thinking content signified by
<think>\n...</think>\n\nbefore producing the final responses. To disable thinking content and obtain direct response, refer to the examples here.
For streamlined integration, we recommend using Qwen3.5 via APIs. Below is a guide to use Qwen3.5 via OpenAI-compatible API.
Serving Qwen3.5
Qwen3.5 can be served via APIs with popular inference frameworks. In the following, we show example commands to launch OpenAI-Compatible API servers for Qwen3.5 models.
Inference efficiency and throughput vary significantly across frameworks. We recommend using the latest framework versions to ensure optimal performance and compatibility. For production workloads or high-throughput scenarios, dedicated serving engines such as SGLang, KTransformers or vLLM are strongly recommended.
The model has a default context length of 262,144 tokens. If you encounter out-of-memory (OOM) errors, consider reducing the context window. However, because Qwen3.5 leverages extended context for complex tasks, we advise maintaining a context length of at least 128K tokens to preserve thinking capabilities.
SGLang
SGLang is a fast serving framework for large language models and vision language models. SGLang from the main branch of the open-source repository is required for Qwen3.5, which can be installed using the following command in a fresh environment:
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python&egg=sglang[all]'
See its documentation for more details.
The following will create API endpoints at http://localhost:8000/v1:
Standard Version: The following command can be used to create an API endpoint with maximum context length 262,144 tokens using tensor parallel on 8 GPUs.
python -m sglang.launch_server --model-path Qwen/Qwen3.5-9B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3Tool Use: To support tool use, you can use the following command.
python -m sglang.launch_server --model-path Qwen/Qwen3.5-9B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coderMulti-Token Prediction (MTP): The following command is recommended for MTP:
python -m sglang.launch_server --model-path Qwen/Qwen3.5-9B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --speculative-algo NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
vLLM
vLLM is a high-throughput and memory-efficient inference and serving engine for LLMs. vLLM from the main branch of the open-source repository is required for Qwen3.5, which can be installed using the following command in a fresh environment:
uv pip install vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly
See its documentation for more details.
For detailed Qwen3.5 usage guide, see the vLLM Qwen3.5 recipe.
The following will create API endpoints at http://localhost:8000/v1:
Standard Version: The following command can be used to create an API endpoint with maximum context length 262,144 tokens using tensor parallel on 8 GPUs.
vllm serve Qwen/Qwen3.5-9B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3Tool Call: To support tool use, you can use the following command.
vllm serve Qwen/Qwen3.5-9B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coderMulti-Token Prediction (MTP): The following command is recommended for MTP:
vllm serve Qwen/Qwen3.5-9B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'Text-Only: The following command skips the vision encoder and multimodal profiling to free up memory for additional KV cache:
vllm serve Qwen/Qwen3.5-9B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --language-model-only
KTransformers
KTransformers is a flexible framework for experiencing cutting-edge LLM inference optimizations with CPU-GPU heterogeneous computing. For running Qwen3.5 with KTransformers, see the KTransformers Deployment Guide.
Hugging Face Transformers
Hugging Face Transformers contains a lightweight server which can be used for quick testing and moderate load deployment.
The latest transformers is required for Qwen3.5:
pip install "transformers[serving] @ git+https://github.com/huggingface/transformers.git@main"
See its documentation for more details. Please also make sure torchvision and pillow are installed.
Then, run transformers serve to launch a server with API endpoints at http://localhost:8000/v1; it will place the model on accelerators if available:
transformers serve --force-model Qwen/Qwen3.5-9B --port 8000 --continuous-batching
Using Qwen3.5 via the Chat Completions API
The chat completions API is accessible via standard HTTP requests or OpenAI SDKs. Here, we show examples using the OpenAI Python SDK.
Before starting, make sure it is installed and the API key and the API base URL is configured, e.g.:
pip install -U openai
# Set the following accordingly
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
We recommend using the following set of sampling parameters for generation
- Thinking mode for general tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Thinking mode for precise coding tasks (e.g. WebDev):
temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0- Instruct (or non-thinking) mode for general tasks:
temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Instruct (or non-thinking) mode for reasoning tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0Please note that the support for sampling parameters varies according to inference frameworks.
Text-Only Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{"role": "user", "content": "Type \"I love Qwen3.5\" backwards"},
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.5-9B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=1.5,
extra_body={
"top_k": 20,
},
)
print("Chat response:", chat_response)
Image Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/CI_Demo/mathv-1327.jpg"
}
},
{
"type": "text",
"text": "The centres of the four illustrated circles are in the corners of the square. The two big circles touch each other and also the two little circles. With which factor do you have to multiply the radii of the little circles to obtain the radius of the big circles?\nChoices:\n(A) $\\frac{2}{9}$\n(B) $\\sqrt{5}$\n(C) $0.8 \\cdot \\pi$\n(D) 2.5\n(E) $1+\\sqrt{2}$"
}
]
}
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.5-9B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=1.5,
extra_body={
"top_k": 20,
},
)
print("Chat response:", chat_response)
Video Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/video/N1cdUjctpG8.mp4"
}
},
{
"type": "text",
"text": "Summarize the video content."
}
]
}
]
# When vLLM is launched with `--media-io-kwargs '{"video": {"num_frames": -1}}'`,
# video frame sampling can be configured via `extra_body` (e.g., by setting `fps`).
# This feature is currently supported only in vLLM.
#
# By default, `fps=2` and `do_sample_frames=True`.
# With `do_sample_frames=True`, you can customize the `fps` value to set your desired video sampling rate.
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.5-9B",
messages=messages,
max_tokens=81920,
temperature=1.0,
top_p=0.95,
presence_penalty=1.5,
extra_body={
"top_k": 20,
"mm_processor_kwargs": {"fps": 2, "do_sample_frames": True},
},
)
print("Chat response:", chat_response)
Instruct (or Non-Thinking) Mode
Qwen3.5 does not officially support the soft switch of Qwen3, i.e.,
/thinkand/nothink.
Qwen3.5 will think by default before response. You can obtain direct response from the model without thinking by configuring the API parameters. For example,
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/RealWorld/RealWorld-04.png"
}
},
{
"type": "text",
"text": "Where is this?"
}
]
}
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.5-9B",
messages=messages,
max_tokens=32768,
temperature=0.7,
top_p=0.8,
presence_penalty=1.5,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"enable_thinking": False},
},
)
print("Chat response:", chat_response)
If you are using APIs from Alibaba Cloud Model Studio, in addition to changing
model, please use"enable_thinking": Falseinstead of"chat_template_kwargs": {"enable_thinking": False}.
Agentic Usage
Qwen3.5 excels in tool calling capabilities.
Qwen-Agent
We recommend using Qwen-Agent to quickly build Agent applications with Qwen3.5.
To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself.
import os
from qwen_agent.agents import Assistant
# Define LLM
# Using Alibaba Cloud Model Studio
llm_cfg = {
# Use the OpenAI-compatible model service provided by DashScope:
'model': 'Qwen3.5-9B',
'model_type': 'qwenvl_oai',
'model_server': 'https://dashscope.aliyuncs.com/compatible-mode/v1',
'api_key': os.getenv('DASHSCOPE_API_KEY'),
'generate_cfg': {
'use_raw_api': True,
# When using Dash Scope OAI API, pass the parameter of whether to enable thinking mode in this way
'extra_body': {
'enable_thinking': True
},
},
}
# Using OpenAI-compatible API endpoint.
# functionality of the deployment frameworks and let Qwen-Agent automate the related operations.
#
# llm_cfg = {
# # Use your own model service compatible with OpenAI API by vLLM/SGLang:
# 'model': 'Qwen/Qwen3.5-9B',
# 'model_type': 'qwenvl_oai',
# 'model_server': 'http://localhost:8000/v1', # api_base
# 'api_key': 'EMPTY',
#
# 'generate_cfg': {
# 'use_raw_api': True,
# # When using vLLM/SGLang OAI API, pass the parameter of whether to enable thinking mode in this way
# 'extra_body': {
# 'chat_template_kwargs': {'enable_thinking': True}
# },
# },
# }
# Define Tools
tools = [
{'mcpServers': { # You can specify the MCP configuration file
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/xxxx/Desktop"]
}
}
}
]
# Define Agent
bot = Assistant(llm=llm_cfg, function_list=tools)
# Streaming generation
messages = [{'role': 'user', 'content': 'Help me organize my desktop.'}]
for responses in bot.run(messages=messages):
pass
print(responses)
# Streaming generation
messages = [{'role': 'user', 'content': 'Develop a dog website and save it on the desktop'}]
for responses in bot.run(messages=messages):
pass
print(responses)
Qwen Code
Qwen Code is an open-source AI agent for the terminal, optimized for Qwen models. It helps you understand large codebases, automate tedious work, and ship faster.
For more information, please refer to Qwen Code.
Processing Ultra-Long Texts
Qwen3.5 natively supports context lengths of up to 262,144 tokens. For long-horizon tasks where the total length (including both input and output) exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively., e.g., YaRN.
YaRN is currently supported by several inference frameworks, e.g., transformers, vllm, ktransformers and sglang.
In general, there are two approaches to enabling YaRN for supported frameworks:
Modifying the model configuration file: In the
config.jsonfile, change therope_parametersfields intext_configto:{ "mrope_interleaved": true, "mrope_section": [ 11, 11, 10 ], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144, }Passing command line arguments:
For
vllm, you can useVLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1010000For
sglangandktransformers, you can useSGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1010000
All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts. We advise modifying the
rope_parametersconfiguration only when processing long contexts is required. It is also recommended to modify thefactoras needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to setfactoras 2.0.
Best Practices
To achieve optimal performance, we recommend the following settings:
Sampling Parameters:
- We suggest using the following sets of sampling parameters depending on the mode and task type:
- Thinking mode for general tasks:
temperature=1.0,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=1.5,repetition_penalty=1.0 - Thinking mode for precise coding tasks (e.g., WebDev):
temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=0.0,repetition_penalty=1.0 - Instruct (or non-thinking) mode for general tasks:
temperature=0.7,top_p=0.8,top_k=20,min_p=0.0,presence_penalty=1.5,repetition_penalty=1.0 - Instruct (or non-thinking) mode for reasoning tasks:
temperature=1.0,top_p=1.0,top_k=40,min_p=0.0,presence_penalty=2.0,repetition_penalty=1.0
- Thinking mode for general tasks:
- For supported frameworks, you can adjust the
presence_penaltyparameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.
- We suggest using the following sets of sampling parameters depending on the mode and task type:
Adequate Output Length: We recommend using an output length of 32,768 tokens for most queries. For benchmarking on highly complex problems, such as those found in math and programming competitions, we suggest setting the max output length to 81,920 tokens. This provides the model with sufficient space to generate detailed and comprehensive responses, thereby enhancing its overall performance.
Standardize Output Format: We recommend using prompts to standardize model outputs when benchmarking.
- Math Problems: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
- Multiple-Choice Questions: Add the following JSON structure to the prompt to standardize responses: "Please show your choice in the
answerfield with only the choice letter, e.g.,"answer": "C"."
No Thinking Content in History: In multi-turn conversations, the historical model output should only include the final output part and does not need to include the thinking content. It is implemented in the provided chat template in Jinja2. However, for frameworks that do not directly use the Jinja2 chat template, it is up to the developers to ensure that the best practice is followed.
Long Video Understanding: To optimize inference efficiency for plain text and images, the
sizeparameter in the releasedvideo_preprocessor_config.jsonis conservatively configured. It is recommended to set thelongest_edgeparameter in the video_preprocessor_config file to 469,762,048 (corresponding to 224k video tokens) to enable higher frame-rate sampling for hour-scale videos and thereby achieve superior performance. For example,{"longest_edge": 469762048, "shortest_edge": 4096}Alternatively, override the default values via engine startup parameters. For implementation details, refer to: vLLM / SGLang.
Citation
If you find our work helpful, feel free to give us a cite.
@misc{qwen3.5,
title = {{Qwen3.5}: Towards Native Multimodal Agents},
author = {{Qwen Team}},
month = {February},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.5}
}

