Back to Model Catalog
Model OpenAI-compatible

Models Qwen Qwen3 0.6B

5B80BA11-2967-4921-AF5D-A8BA02652FDF
Parameters781M
Context40K
LicenseApache-2.0
Architectureqwen3

Description

---
libraryname: transformers
license: apache-2.0
license
link: https://huggingface.co/Qwen/Qwen3-0.6B/blob/main/LICENSE
pipelinetag: text-generation
base
model:

  • Qwen/Qwen3-0.6B-Base

---

Qwen3-0.6B

<a href="https://chat.qwen.ai/" target="blank" style="margin: 2px;"> <img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/> </a>

Qwen3 Highlights

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Built upon extensive training, Qwen3 delivers groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support, with the following key features:

  • Uniquely support of seamless switching between thinking mode (for complex logical reasoning, math, and coding) and non-thinking mode (for efficient, general-purpose dialogue) within single model, ensuring optimal performance across various scenarios.
  • Significantly enhancement in its reasoning capabilities, surpassing previous QwQ (in thinking mode) and Qwen2.5 instruct models (in non-thinking mode) on mathematics, code generation, and commonsense logical reasoning.
  • Superior human preference alignment, excelling in creative writing, role-playing, multi-turn dialogues, and instruction following, to deliver a more natural, engaging, and immersive conversational experience.
  • Expertise in agent capabilities, enabling precise integration with external tools in both thinking and unthinking modes and achieving leading performance among open-source models in complex agent-based tasks.
  • Support of 100+ languages and dialects with strong capabilities for multilingual instruction following and translation.

Model Overview

Qwen3-0.6B has the following features:

  • Type: Causal Language Models
  • Training Stage: Pretraining & Post-training
  • Number of Parameters: 0.6B
  • Number of Paramaters (Non-Embedding): 0.44B
  • Number of Layers: 28
  • Number of Attention Heads (GQA): 16 for Q and 8 for KV
  • Context Length: 32,768

For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our blog, GitHub, and Documentation.

> [!TIP]
> If you encounter significant endless repetitions, please refer to the Best Practices section for optimal sampling parameters, and set the INLINECODE
13EABE998 to 1.5.

Quickstart

The code of Qwen3 has been in the latest Hugging Face INLINECODE2E53238B3 and we advise you to use the latest version of INLINECODE3B9230337.

With INLINECODE4D8635A21, you will encounter the following error:
CODEBLOCK
0EF087C48

The following contains a code snippet illustrating how to use the model generate content based on given inputs.
CODEBLOCK
1DBDF0A69

For deployment, you can use INLINECODE5AEFCE228 or INLINECODE62092DF7B or to create an OpenAI-compatible API endpoint:

  • SGLang:

INLINECODE
982F90BEA
  • vLLM:

INLINECODE
12CF8B4DFD

For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.

Switching Between Thinking and Non-Thinking Mode

> [!TIP]
> The INLINECODE
1317780794 switch is also available in APIs created by SGLang and vLLM.
> Please refer to our documentation for SGLang and vLLM users.

INLINECODE14123035C0

By default, Qwen3 has thinking capabilities enabled, similar to QwQ-32B. This means the model will use its reasoning abilities to enhance the quality of generated responses. For example, when explicitly setting INLINECODE15D4A354CF or leaving it as the default value in INLINECODE16699DAB13, the model will engage its thinking mode.

CODEBLOCK27154AFAB

In this mode, the model will generate think content wrapped in a INLINECODE1791470E17 block, followed by the final response.

> [!NOTE]
> For thinking mode, use INLINECODE
1826BA8D97, INLINECODE197AB893D8, INLINECODE205FBF531E, and INLINECODE21871FD032 (the default setting in INLINECODE223D6C83B0). DO NOT use greedy decoding, as it can lead to performance degradation and endless repetitions. For more detailed guidance, please refer to the Best Practices section.

INLINECODE231020A51F

We provide a hard switch to strictly disable the model's thinking behavior, aligning its functionality with the previous Qwen2.5-Instruct models. This mode is particularly useful in scenarios where disabling thinking is essential for enhancing efficiency.

CODEBLOCK338E93D31

In this mode, the model will not generate any think content and will not include a INLINECODE247D1A75A6 block.

> [!NOTE]
> For non-thinking mode, we suggest using INLINECODE25EFF73B13, INLINECODE263F391C47, INLINECODE275112A2D5, and INLINECODE285F15EA12. For more detailed guidance, please refer to the Best Practices section.

Advanced Usage: Switching Between Thinking and Non-Thinking Modes via User Input

We provide a soft switch mechanism that allows users to dynamically control the model's behavior when INLINECODE29ADE6779C. Specifically, you can add INLINECODE30962FEB14 and INLINECODE310BE38710 to user prompts or system messages to switch the model's thinking mode from turn to turn. The model will follow the most recent instruction in multi-turn conversations.

Here is an example of a multi-turn conversation:

CODEBLOCK46C186EB3

> [!NOTE]
> For API compatibility, when INLINECODE
3268E773ED, regardless of whether the user uses INLINECODE33D1C92043 or INLINECODE3402EF4DF6, the model will always output a block wrapped in INLINECODE356677C026. However, the content inside this block may be empty if thinking is disabled.
> When INLINECODE
362A8BBCD7, the soft switches are not valid. Regardless of any INLINECODE37E22853AA or INLINECODE38F14D14F9 tags input by the user, the model will not generate think content and will not include a INLINECODE3978E09C08 block.

Agentic Use

Qwen3 excels in tool calling capabilities. We recommend using Qwen-Agent to make the best use of agentic ability of Qwen3. Qwen-Agent encapsulates tool-calling templates and tool-calling parsers internally, greatly reducing coding complexity.

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.
INLINECODE42A8EA1C95INLINECODE434C58D377enablethinking=TrueINLINECODE44CF502B51Temperature=0.6INLINECODE451DF0DAA2TopP=0.95INLINECODE4695420AA3TopK=20INLINECODE47A17D23DFMinP=0INLINECODE4846B2A296enablethinking=FalseINLINECODE49C49D018ATemperature=0.7INLINECODE50107A165ATopP=0.8INLINECODE51D49306DFTopK=20INLINECODE52569ED95EMinP=0INLINECODE53782E8BC1presencepenaltyINLINECODE546B3B0CE3answerINLINECODE559712949D"answer": "C"`."

  1. 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.

Citation

If you find our work helpful, feel free to give us a cite.

CODEBLOCK5_8E2CC9FB

Specifications

Parameters 781M
Context Length 40K
Architecture qwen3
License Apache-2.0

Tags

chat