--- library_name: transformers license: apache-2.0 license_link: https://huggingface.co/Qwen/Qwen3.5-4B/blob/main/LICENSE pipeline_tag: image-text-to-text base_model: - Qwen/Qwen3.5-4B-Base --- # Qwen3.5-4B [](https://chat.qwen.ai) > [!Note] > 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](https://qwen.ai/blog?id=qwen3.5). ## Model Overview - Type: Causal Language Model with Vision Encoder - Training Stage: Pre-training & Post-training - Language Model - Number of Parameters: 4B - Hidden Dimension: 2560 - 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: 9216 - LM Output: 248320 (Tied to token embedding) - 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 MMBench EN-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 > [!Important] > Qwen3.5 models operate in thinking mode by default, generating thinking content signified by ` \n... \n\n` before producing the final responses. > To disable thinking content and obtain direct response, refer to the examples [here](#instruct-or-non-thinking-mode). 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. > [!Important] > 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. > [!Important] > 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](https://github.com/sgl-project/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: ```shell uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python&egg=sglang[all]' ``` See [its documentation](https://docs.sglang.ai/get_started/install.html) 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. ```shell python -m sglang.launch_server --model-path Qwen/Qwen3.5-4B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 ``` - **Tool Use**: To support tool use, you can use the following command. ```shell python -m sglang.launch_server --model-path Qwen/Qwen3.5-4B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coder ``` - **Multi-Token Prediction (MTP)**: The following command is recommended for MTP: ```shell python -m sglang.launch_server --model-path Qwen/Qwen3.5-4B --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](https://github.com/vllm-project/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: ```shell uv pip install vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly ``` See [its documentation](https://docs.vllm.ai/en/stable/getting_started/installation/index.html) for more details. For detailed Qwen3.5 usage guide, see the [vLLM Qwen3.5 recipe](https://docs.vllm.ai/projects/recipes/en/latest/Qwen/Qwen3.5.html). 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. ```shell vllm serve Qwen/Qwen3.5-4B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 ``` - **Tool Call**: To support tool use, you can use the following command. ```shell vllm serve Qwen/Qwen3.5-4B --port 8000 --tensor-parallel-size 1 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder ``` - **Multi-Token Prediction (MTP)**: The following command is recommended for MTP: ```shell vllm serve Qwen/Qwen3.5-4B --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...