Model guide
Qwen3 4B
The original Qwen3 4B is a small text model that can switch between thinking and non-thinking behavior. Try non-thinking mode for brief rewrites and extraction, then compare a checkable reasoning problem when extra deliberation is useful. This page covers the original Qwen3 checkpoint, not a later Instruct-2507 or Qwen3.5 release.
At a glance
- Parameters
- 4B
- Accepts
- Text
- Returns
- Text
- Published context limit
- 32,768 tokens
- Model format
- Safetensors · GGUF
- Software and download hosts
- Ollama. Follow the exact setup below; this list does not establish support for every format, input type or software version.
- Suggested compression
- Q4_K_M
- Model-weight download
- Q4_K_M weights · 2.50 GBQwen (model publisher)Qwen3-4B-Q4_K_M.gguf
- Languages
- Chinese · English · French · Spanish · Portuguese · German · Italian · Russian · Japanese · Korean · Vietnamese · Thai · Arabic · 100+ languages and dialects
- License
- Apache-2.0
Will it fit?
Qwen3 4B · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need.
Check on your computerBest for
- Use the original Qwen3 4B to rewrite a short note while preserving names and dates. Toggle thinking when comparing latency.
Choose something else when
- For a screenshot of the note, use a vision checkpoint such as Qwen3.5 4B.
First setup
After loading with one of the setups below, check whether the smaller model preserves facts in a short extraction task.
Send this prompt in a new conversation:
From this note, return only a JSON object with keys owner, due_date, and budget_usd. Use null for any missing value. Do not add a year.
Note: Mira will send the draft by 14 June. Budget is not specified. Leo will review afterward.
/no_think
Check the final answer against {"owner":"Mira","due_date":"14 June","budget_usd":null}. Key order does not matter. A made-up budget, an added year, or Leo as the owner fails this check. Then ask who approved the budget: the note does not say, so the answer must not name an approver.
Repeat your real extraction or rewriting examples with Qwen3 8B, keeping context and thinking mode the same. Move up only if it fixes errors that matter to your work and the memory calculation fits; one correct extraction does not establish math, coding, or tool-use reliability.
This creates a 4,096-token copy of qwen3:4b-q4_K_M named qwen3-4b-short-context. Save the following as a file named Modelfile in your working folder:
FROM qwen3:4b-q4_K_M
PARAMETER num_ctx 4096
Then run these commands from that folder:
ollama pull qwen3:4b-q4_K_M
ollama create qwen3-4b-short-context -f ./Modelfile
ollama run qwen3-4b-short-context
Run the example in Model-specific setup. While the model is loaded, run ollama ps in another terminal and check CONTEXT and PROCESSOR.
The recorded Ollama package is Q4_K_M: 2.62 GB of model weights. Use Ollama 0.40.18 or a supporting newer release. A Hugging Face GGUF or MLX checkpoint is a separate representation; choose the matching source and runner in the memory calculator.
See Ollama context settings and the Modelfile instructions.
Use ollama run qwen3:4b-q4_K_M for Ollama's original, switchable Qwen3 4B package (about 2.6 GB on disk), or ollama run hf.co/Qwen/Qwen3-4B-GGUF:Q4_K_M for the official Hugging Face GGUF. The shorter qwen3:4b currently selects a different package whose chat template starts in thinking mode; use the full tag for this model's thinking/non-thinking controls.
Open LM Studio’s Discover tab, search for Qwen/Qwen3-4B-GGUF, and download Qwen3-4B-Q4_K_M.gguf (Q4_K_M, 2.50 GB). See the download files. Select the file in Chat, set context to 4,096, then load it. Run the example in Model-specific setup. If it will not load, open LM Studio Model Will Not Load.
Open a terminal in the extracted llama.cpp release folder. On Windows, replace ./llama-server below with .\llama-server.exe:
./llama-server -hf Qwen/Qwen3-4B-GGUF -hff Qwen3-4B-Q4_K_M.gguf -c 4096 --host 127.0.0.1 --port 8080
The server downloads the selected model. Wait for the model to load, then open http://127.0.0.1:8080 in your browser. Send the model-specific task prompt above and check its stated expected result. Keep the server terminal open; press Ctrl+C there to stop the server. The file list identifies the exact download. If the command fails: Unknown architecture? Update the runner. Allocation failed? Retry with less context or a smaller weight file.
Load the model, start a fresh chat and time your usual prompt. Record time until the first useful word and time until the full answer. Note the processor, context and output length when comparing another run. Time the final answer as well as the first generated token.
