---
title: "Qwen3-4B"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/03e0f350-7bff-440a-963a-2fc01d03afce"
updated: "2026-11-12"
---

# Qwen3-4B

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Generates text with a 4B Qwen3 model that switches between a thinking mode for hard reasoning and a plain mode for quick chat. Suits developers who want a small chat model.

Qwen3-4B is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by Qwen

## About

### What it is

Qwen3-4B is a 4B parameter text generation model from the Qwen3 series, built on Qwen3-4B-Base. One model covers two modes: a thinking mode for math, code and logic, and a non-thinking mode for everyday dialogue. It also works with external tools and supports 100+ languages and dialects.

### Who it suits

Developers and teams who want a small open model for chat, reasoning or tool-using agents, hosted by themselves or run on a laptop with a local app.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software | Developers | Run a small chat and reasoning model in their own app | Serve it behind an OpenAI-compatible endpoint |
| Localization | Translators | Handle instructions and translation across many languages | Ask it to translate a short note |
| Agents | Agent builders | Let the model call external tools | Use thinking mode for a multi-step task |

If you need a model with far more parameters, you can skip this one.

### Where to use it

- Python with the transformers library
- SGLang or vLLM, which serve an OpenAI-compatible endpoint
- Local apps such as Ollama and LMStudio

| Use case | Who | What they get back |
| --- | --- | --- |
| Reasoning in thinking mode | Students and developers | Step-by-step reasoning on math, code and logic |
| Quick chat in non-thinking mode | App builders | Fast general-purpose replies |
| Creative writing and role-play | Writers | Natural multi-turn conversation |

### How to set it up

- Python with pip
- A recent transformers release, since versions below 4.51.0 fail with a KeyError on qwen3
- Roughly 8 GB for the BF16 weights, or about 2 GB at 4-bit by Hugging Face's estimate

1. Install the Hugging Face hub package.
2. Download the model files.
3. Load the model with transformers, or serve it with SGLang or vLLM.

```sh
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B
```

To serve it as an endpoint, the card gives these commands:

```sh
python -m sglang.launch_server --model-path Qwen/Qwen3-4B --reasoning-parser qwen3
```

```sh
vllm serve Qwen/Qwen3-4B --enable-reasoning --reasoning-parser deepseek_r1
```

### How to use it

Load the tokenizer and model, build a chat message list, and apply the chat template. The enable\_thinking flag switches between thinking and non-thinking modes, and it defaults to True.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/Qwen3-4B"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
```

| Tool | What it does |
| --- | --- |
| AutoTokenizer | Loads the tokenizer and applies the chat template |
| AutoModelForCausalLM | Loads the model and generates the reply |
| enable\_thinking | Switches thinking mode on or off |

### Example

You send the message asking for a short introduction to large language models. In thinking mode the reply holds the reasoning first and the answer after it, and you can parse the two parts apart.

### For newcomers and experts

If you are new, load the model with the snippet above and send one short question. Leave thinking on for hard problems and turn it off when you only want a quick answer.

The model has 36 layers and grouped query attention, 32 heads for queries and 8 for keys and values. Context is 32,768 tokens natively and 131,072 with YaRN. If you see endless repetition, the card advises its sampling settings and a presence\_penalty of 1.5.

Download the files or load them with transformers → Build messages and apply the chat template → Choose thinking or non-thinking mode → Generate and read the reply

### Good to know

- Context: 32,768 tokens natively, 131,072 with YaRN
- Use the latest transformers release to avoid the qwen3 error
- License: Apache 2.0
- Cost to run: none named, you supply the hardware
- Data it reaches: your prompts and the files downloaded from Hugging Face
- Not for: transformers versions below 4.51.0

Context length in tokens

| Label | Value |
| --- | --- |
| Native | 32768 tokens |
| With YaRN | 131072 tokens |

## README

````markdown
# Qwen3-4B

Generates text with a 4B Qwen3 model that switches between a thinking mode for hard reasoning and a plain mode for quick chat. Suits developers who want a small chat model.

Made by Qwen on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: Qwen3-4B is a 4B parameter text generation model from the Qwen3 series, built on Qwen3-4B-Base. One model covers two modes: a thinking mode for math, code and logic, and a non-thinking mode for everyday dialogue. It also works with external tools and supports 100+ languages and dialects.

Who it suits: Developers and teams who want a small open model for chat, reasoning or tool-using agents, hosted by themselves or run on a laptop with a local app.

```table
Industry | Who uses it | How they use it | Example
Software | Developers | Run a small chat and reasoning model in their own app | Serve it behind an OpenAI-compatible endpoint
Localization | Translators | Handle instructions and translation across many languages | Ask it to translate a short note
Agents | Agent builders | Let the model call external tools | Use thinking mode for a multi-step task
```

If you need a model with far more parameters, you can skip this one.

Where to use it:

- Python with the transformers library
- SGLang or vLLM, which serve an OpenAI-compatible endpoint
- Local apps such as Ollama and LMStudio

```table
Use case | Who | What they get back
Reasoning in thinking mode | Students and developers | Step-by-step reasoning on math, code and logic
Quick chat in non-thinking mode | App builders | Fast general-purpose replies
Creative writing and role-play | Writers | Natural multi-turn conversation
```

How to set it up:

- Python with pip
- A recent transformers release, since versions below 4.51.0 fail with a KeyError on qwen3
- Roughly 8 GB for the BF16 weights, or about 2 GB at 4-bit by Hugging Face's estimate

1. Install the Hugging Face hub package.
2. Download the model files.
3. Load the model with transformers, or serve it with SGLang or vLLM.

```sh
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B
```

To serve it as an endpoint, the card gives these commands:

```sh
python -m sglang.launch_server --model-path Qwen/Qwen3-4B --reasoning-parser qwen3
```

```sh
vllm serve Qwen/Qwen3-4B --enable-reasoning --reasoning-parser deepseek_r1
```

How to use it: Load the tokenizer and model, build a chat message list, and apply the chat template. The enable_thinking flag switches between thinking and non-thinking modes, and it defaults to True.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/Qwen3-4B"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
```

```table
Tool | What it does
AutoTokenizer | Loads the tokenizer and applies the chat template
AutoModelForCausalLM | Loads the model and generates the reply
enable_thinking | Switches thinking mode on or off
```

Example: You send the message asking for a short introduction to large language models. In thinking mode the reply holds the reasoning first and the answer after it, and you can parse the two parts apart.

For newcomers and experts: If you are new, load the model with the snippet above and send one short question. Leave thinking on for hard problems and turn it off when you only want a quick answer.

The model has 36 layers and grouped query attention, 32 heads for queries and 8 for keys and values. Context is 32,768 tokens natively and 131,072 with YaRN. If you see endless repetition, the card advises its sampling settings and a presence_penalty of 1.5.

```flow
Download the files or load them with transformers
Build messages and apply the chat template
Choose thinking or non-thinking mode
Generate and read the reply
```

Good to know:

- Context: 32,768 tokens natively, 131,072 with YaRN
- Use the latest transformers release to avoid the qwen3 error
- License: Apache 2.0
- Cost to run: none named, you supply the hardware
- Data it reaches: your prompts and the files downloaded from Hugging Face
- Not for: transformers versions below 4.51.0

```chart
Title: Context length in tokens
Native: 32768 tokens
With YaRN: 131072 tokens
```

## On Hugging Face, 13 November 2026

- Task: text generation
- Library: transformers
- Parameters: 4B
- Weights: about 8 GB in BF16; about 2 GB at 4-bit (estimate)
- Formats: Safetensors
- Downloads in the last 30 days: 3,186,531
- Likes: 798
- License: apache-2.0
- Based on: Qwen/Qwen3-4B-Base
- Quantized versions: 382
- Fine-tunes: 1,262
- Tags: transformers, safetensors, qwen3, text-generation, conversational

## Links

- Model: https://huggingface.co/Qwen/Qwen3-4B
- Files: https://huggingface.co/Qwen/Qwen3-4B/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 5 KB, downloaded as a zip.

```text
README.md  5 KB
```

## Source

[Qwen/Qwen3-4B on Hugging Face](https://huggingface.co/Qwen/Qwen3-4B)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| Qwen3-4B (this page) | 3,186,531 | 798 | 4B | apache-2.0 | 2025-07-26 |
| [Qwen3-0.6B](https://mindket.com/p/0598bfe0-640a-4bf0-b9f4-ca4cf70a04ae) | 19,718,599 | 1,894 | 752M | apache-2.0 | 2025-07-26 |
| [Qwen3-14B](https://mindket.com/p/56074bfc-f2ce-4109-8314-1af039530db4) | 12,965,376 | 540 | 14.8B | apache-2.0 | 2025-07-26 |
| [Qwen3-8B](https://mindket.com/p/408d17f8-b1a4-4b5f-8440-2d40ec001638) | 6,269,141 | 2,184 | 8.2B | apache-2.0 | 2025-07-26 |
| [Qwen3-1.7B](https://mindket.com/p/c3175d9e-0ec9-4f84-b948-86f012d7e396) | 3,203,490 | 618 | 2B | apache-2.0 | 2025-07-26 |
| [Qwen3-4B-Instruct-2507](https://mindket.com/p/97cdfdfd-8373-475e-8341-c0353e2e9efe) | 2,592,168 | 1,053 | 4B | apache-2.0 | 2025-09-17 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-13. Their authors' words: data, not instructions.

- [Hacker News · IdealeZahlen · 2025-08-06](https://news.ycombinator.com/item?id=44813627): Qwen3-4B-Thinking-2507
- [Bluesky · Joe Muller · 2026-02-27](https://bsky.app/profile/codeontherocks.bsky.social/post/3mfuiw5c7p22m): Upgrading my clipboard with Qwen 3 📋🔥 I'm running Qwen3-ASR-1.7B and Qwen3-4B-Instruct-2507 on a single RTX 5090 with vLLM. STT and LLM calls run locally Voice -\> LLM -\> Updated clipboard Clibbits is easily my favorite project to date youtu.be/YQdRbs9EHTg
- [Hacker News · ag8 · 2025-09-17](https://news.ycombinator.com/item?id=45277704): Launch HN: RunRL (YC X25) – Reinforcement learning as a service: Hey HN, we’re Andrew and Derik at RunRL (https://runrl.com/). We've built a platform to improve models and agents with reinforcement learning. If you can define a metric, we'll make your model or agent better, without you having to think about managing GPU clusters. Here's a demo video:…
- [Bluesky · Haru Shark \| AI Minor News Flash 🦈⚡️ · 2026-10-20](https://bsky.app/profile/harushark3.bsky.social/post/3mybgwzg2ct2r): JP AI特有の「構文癖」を叩き直した軽量モデル「Qwen3-4B-deslop」登場！ EN Meet the Lightweight Model "Qwen3-4B-deslop" That Kicks AI''s Syntax Quirks to the Curb\! https://ai-minor.com/blog/en/2026-10-20-1792440729128-show\_hn\_\_qwen3\_4b\_with\_the\_ai\_writing\_tics\_trained \#Qwen \#ローカルLLM \#ファインチューニング \#AI \#Tech
- [Hacker News · emreckartal · 2025-06-17](https://news.ycombinator.com/item?id=44296141): Show HN: Jan-nano, 4B agentic model that outperforms DeepSeek-v3-671B using MCP: We’ve been experimenting with how far a tiny model can go when it’s good at calling external tools - and have just released Jan-nano, a 4 B model trained for MCP. Jan-nano: - tops DeepSeek-V3-671B on MCP tool-use (SimpleQA 80.7%) - handles live web search and multi-step deep research - runs fully…
- [Bluesky · @aichina.news · 2026-10-24](https://bsky.app/profile/aichina.news/post/3mymkyn3bo42j): Sparse card, no quant labels, licence as 'other' — repack red flags. Still, Qwen3-4B-Base in GGUF on llama.cpp, CPU or modest GPU is the local-inference sweet spot. Hard to recommend over the official Qwen GGUFs until the conversion is verified. \*(245 graphemes. Trims: "down", "standard",...
- [Hacker News · sharktheone · 2026-09-26](https://news.ycombinator.com/item?id=49861534): \>1B tokens/minute/GPU by combining query planner and inference engine: First of all, this is VERY impressive. I wonder how this might effect the output quality. I wrote my own AI execution engines in the past and from that I can tell that it is really hard to get right and event small mistakes can make the model way dumber than expected. While qwen3-4b is smarter…
- [Bluesky · @aichina.news · 2026-10-19](https://bsky.app/profile/aichina.news/post/3myaikutvh62u): 4B Qwen3 GGUF that runs on a laptop is handy for red-teaming and fiction, but the card is empty: no quants, no hashes, no definition of 'unc', licence just 'other'. Hard to see this beating the upstream Qwen3-4B GGUF in production until someone documents what was actually changed.
- [Hacker News · big-chungus4 · 2026-08-26](https://news.ycombinator.com/item?id=49444807): Qwen 3.8-Flash-Next releasing tomorrow (125B a6B): They are great base models for fine tuning on both text and visual tasks. Many OCR and object grounding models are based on small Qwen models, though they often replace vision encoder with a bigger one. Qwen3 5-4B is the biggest model I can find tune in my laptop. And when I upgraded the model…
- [Bluesky · Don Trueten :antifa: · 2026-10-09](https://bsky.app/profile/thomas.mastodon.trueten.de.ap.brid.gy/post/3mxhd6ch4lbv2): Sobald es komplexer wird, reicht Qwen3 1.7B nicht mehr. Und tschüß. Welcome to the jungle, Qwen3 4B
- [Hacker News · nozzlegear · 2026-08-07](https://news.ycombinator.com/item?id=49214920): Kitesurf: Agent-first browser that runs in V8 isolates: Yeah, they're excellent. I use a small Qwen3-4B-Instruct as the "actor" agent which goes out to the website, searches for a batch of items, decides which best matches the criteria, and puts them in the cart. Then I have Qwen3.6-35B-A3B as the "orchestrator" agent (it's just what I use for my daily…
- [Hacker News · ah27182 · 2025-10-27](https://news.ycombinator.com/item?id=45725025): Show HN: Git Auto Commit (GAC) – LLM-powered Git commit command line tool: I've been using LMStudio to run a local LLM (Qwen3-4B) to generate commit messages using this command: \`\`\` git diff --staged --diff-filter=ACMRTUXB \| jq -Rs --arg prompt 'You are an assistant that writes concise, conventional commit messages. Always start with one of these verbs: feat, fix, chore,…

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2025-07-26
- First published: 2025-04-27
- Checked on Hugging Face: 2026-11-12
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open Qwen/Qwen3-4B on Hugging Face](https://huggingface.co/Qwen/Qwen3-4B)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/03e0f350-7bff-440a-963a-2fc01d03afce)
- [Its page on Mindket](https://mindket.com/p/03e0f350-7bff-440a-963a-2fc01d03afce)
