Description
Qwen3-8B is a large language model in the Qwen3 family, developed by Alibaba's Qwen team and released as open weights on Hugging Face under the Apache 2.0 license. It's a dense, causal (decoder-only) language model with 8.2 billion total parameters (6.95 billion excluding embeddings), 36 layers, and grouped-query attention with 32 query heads and 8 key/value heads.
Read More
Its main distinguishing feature is the ability to switch between two modes within a single model: a thinking mode for complex logical reasoning, math, and coding, and a non-thinking mode for faster, general-purpose dialogue. Qwen reports that the thinking mode improves on the reasoning performance of its earlier QwQ model, and that the non-thinking mode improves on Qwen2.5-instruct, across mathematics, code generation, and commonsense reasoning benchmarks.
The model natively supports a 32,768-token context window, extendable to 131,072 tokens using YaRN scaling. It's built for tool use and agent-style tasks: Qwen states it integrates precisely with external tools in both thinking and non-thinking modes, and its chat template includes explicit support for function and tool calling. It also supports instruction following and translation across more than 100 languages and dialects.
Qwen3-8B is distributed for use with the Hugging Face Transformers library (version 4.51.0 or later is required) and is compatible with common local and cloud inference tooling; using an older Transformers version raises a "KeyError: 'qwen3'" error, since support for the architecture was added specifically for this release. On Hugging Face, the model has been downloaded more than 12 million times in the past month and over 126 million times in total, making it one of the more widely used models in the Qwen3 family. Qwen has also published supporting research papers alongside the model, covering the underlying architecture and evaluation methodology. It's aimed at developers building applications that need a smaller, self-hostable model with strong reasoning and tool-use capabilities, rather than at non-technical end users.
- CategoryAI Models & LLMs
- Pricing ModelOpen source
- DeploymentCloud, Self-hosted
- PlatformsWeb
Qwen3-8B Highlights
8.2B-parameter dense causal language model (6.95B non-embedding)
Switchable thinking mode (reasoning, math, code) and non-thinking mode (fast dialogue) in one model
36 layers with grouped-query attention (32 query heads, 8 key/value heads)
32,768-token native context, extendable to 131,072 tokens with YaRN
Built-in tool/function-calling support via its chat template
Instruction-following and translation across 100+ languages
Open weights released under the Apache 2.0 license
Compatible with Hugging Face Transformers (4.51.0+) and common inference tooling
Getting Started with Qwen3-8B
Install dependencies: Install a recent version of Hugging Face Transformers (4.51.0 or later).
Load the model: Load Qwen/Qwen3-8B with AutoModelForCausalLM and AutoTokenizer.
Choose a mode: Set enable_thinking to True for reasoning tasks or False for faster general dialogue.
Format the prompt: Apply the model's chat template to structure messages, including any tool definitions.
Generate a response: Run generation and, for thinking mode, parse the reasoning content separately from the final answer.
Qwen3-8B's Use Cases
- Reasoning and math tasks
- General chat applications
- Agent and tool-calling workflows
- Multilingual applications










