Mindket

Qwen3-4B

Newversion 1 · updated

Overview

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 . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • 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
Runs in
  • Python with the transformers library
  • SGLang or vLLM, which serve an OpenAI-compatible endpoint
  • Local apps such as Ollama and LMStudio
Start with
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B

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.

IndustryWho uses itHow they use itExample
SoftwareDevelopersRun a small chat and reasoning model in their own appServe it behind an OpenAI-compatible endpoint
LocalizationTranslatorsHandle instructions and translation across many languagesAsk it to translate a short note
AgentsAgent buildersLet the model call external toolsUse 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 caseWhoWhat they get back
Reasoning in thinking modeStudents and developersStep-by-step reasoning on math, code and logic
Quick chat in non-thinking modeApp buildersFast general-purpose replies
Creative writing and role-playWritersNatural 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.
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B

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

python -m sglang.launch_server --model-path Qwen/Qwen3-4B --reasoning-parser qwen3
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.

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"
)
ToolWhat it does
AutoTokenizerLoads the tokenizer and applies the chat template
AutoModelForCausalLMLoads the model and generates the reply
enable_thinkingSwitches 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.

  1. Download the files or load them with transformers
  2. Build messages and apply the chat template
  3. Choose thinking or non-thinking mode
  4. 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
Native32768 tokens
With YaRN131072 tokens

README and files

README

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.

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.
pip install -U huggingface_hub
hf download Qwen/Qwen3-4B

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

python -m sglang.launch_server --model-path Qwen/Qwen3-4B --reasoning-parser qwen3
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.

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

Get the model

Download its files with Hugging Face's command line:

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.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

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

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Qwen3-4B This page3,186,5317984Bapache-2.0
Qwen3-0.6BShares qwen3 · text-generation · conversational19,718,5991,894752Mapache-2.0
Qwen3-14BShares qwen3 · text-generation · conversational12,965,37654014.8Bapache-2.0
Qwen3-8BShares qwen3 · text-generation · conversational6,269,1412,1848.2Bapache-2.0
Qwen3-1.7BShares qwen3 · text-generation · conversational3,203,4906182Bapache-2.0
Qwen3-4B-Instruct-2507Shares qwen3 · text-generation · conversational2,592,1681,0534Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

IdealeZahlenQwen3-4B-Thinking-2507198 points · 61 repliesJoe MullerUpgrading 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/YQdRbs9EHTg5 likesag8Launch HN: RunRL (YC X25) – Reinforcement learning as a serviceHey 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:…71 points · 22 repliesHaru Shark | AI Minor News Flash 🦈⚡️[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 #Tech1 likeemreckartalShow HN: Jan-nano, 4B agentic model that outperforms DeepSeek-v3-671B using MCPWe’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…6 points@aichina.newsSparse 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",...sharktheone>1B tokens/minute/GPU by combining query planner and inference engineFirst 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…@aichina.news4B 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.big-chungus4Qwen 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…Don Trueten :antifa:Sobald es komplexer wird, reicht Qwen3 1.7B nicht mehr. Und tschüß. Welcome to the jungle, Qwen3 4BnozzlegearKitesurf: Agent-first browser that runs in V8 isolatesYeah, 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…ah27182Show HN: Git Auto Commit (GAC) – LLM-powered Git commit command line toolI'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,…

Searched

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Developer

See all in Developer

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k