Skip to main content
Back

Alibaba's Qwen3-4B Beats GPT-4.1-nano on a Single Consumer GPU

Qwen ships an FP8-quantized 4B non-thinking model with a 262K context window that outperforms GPT-4.1-nano on most benchmarks.

Pro

  • Qwen released Qwen3-4B-Instruct-2507-FP8, a 4B non-thinking model with 262K context under Apache 2.0.
  • Uses fine-grained FP8 quantization with block size 128, halving memory versus bfloat16.
  • Beats GPT-4.1-nano on MMLU-Pro, GPQA, AIME25, ZebraLogic, LiveCodeBench, and BFCL-v3.
  • AIME25 score jumped from 19.1 on the original Qwen3-4B to 47.4 after the 2507 refresh.
  • Runs on vLLM, SGLang, Ollama, LMStudio, MLX-LM, llama.cpp; drop context to 32K if OOM.
  • Weaker on Aider-Polyglot code editing and some multilingual benchmarks against the 30B MoE.

Alibaba's Qwen team quietly dropped a checkpoint that punches well above its weight class. Qwen3-4B-Instruct-2507-FP8 is a fine-grained FP8 quantization of their refreshed 4B non-thinking instruct model, and the benchmark numbers relative to its size are hard to ignore. It runs a native 262K context window, fits comfortably on a single consumer GPU, and beats GPT-4.1-nano on most public evals.

What actually shipped

The model is the FP8 counterpart of Qwen3-4B-Instruct-2507, released under Apache 2.0 on Hugging Face. This is the updated non-thinking variant, with gains in instruction following, logical reasoning, text comprehension, math, science, coding, tool usage, long-tail multilingual knowledge, alignment on open-ended tasks, and 256K long-context understanding.

The architecture is straightforward for a modern dense transformer:

  • 4.0B parameters total (3.6B non-embedding), 36 layers
  • Grouped-query attention with 32 query heads and 8 KV heads
  • 262,144 token native context length
  • Fine-grained FP8 quantization with a block size of 128
  • Non-thinking only; the model does not emit <think></think> blocks, and enable_thinking=False is no longer required

FP8 (specifically the E4M3 format) halves memory versus BF16 while preserving most of the accuracy. The block-size-128 approach computes scaling factors per small tile rather than per tensor, which is what lets a 4B model this aggressive on precision stay competitive with its bfloat16 sibling.

Small model, suspiciously large scores

Where this gets interesting is the comparison table Qwen published against GPT-4.1-nano and their own Qwen3-30B-A3B non-thinking MoE. The 4B Instruct 2507 either matches or beats both across most categories. A few highlights from the model card:

BenchmarkGPT-4.1-nanoQwen3-30B-A3B (non-think)Qwen3-4B-Instruct-2507
MMLU-Pro62.869.169.6
GPQA50.354.862.0
AIME2522.721.647.4
ZebraLogic14.833.280.2
LiveCodeBench v631.529.035.1
Arena-Hard v215.924.843.4
BFCL-v3 (tool use)53.058.661.9

The AIME25 jump from 19.1 (the original Qwen3-4B non-thinking) to 47.4 is the standout. Independent evaluation from Artificial Analysis backs the trend: Qwen3 4B 2507 Instruct scores 7 on the Artificial Analysis Intelligence Index, well above the average of 3 among comparable models.

Where it falls short

The numbers aren't uniformly better. On Aider-Polyglot, a multi-language code editing benchmark, it scores 12.9 versus the 30B MoE's 24.4. It also trails on TAU2-Telecom agent tasks (13.2 vs 18.4) and a couple of multilingual evals (MultiIF, MMLU-ProX, INCLUDE) where the 30B MoE keeps its edge. For serious multi-file code refactoring or heavy multilingual coverage, this isn't the drop-in choice.

One community report on GitHub also flagged difficulty reproducing the GPQA number of 62.0 when running the model locally through sglang with lm_eval, so treat the headline scores as best-case with Qwen's recommended sampling settings.

Running it

Deployment is standard. Both vLLM (>=0.8.5) and SGLang (>=0.4.6.post1) support the FP8 checkpoint natively:

vllm serve Qwen/Qwen3-4B-Instruct-2507-FP8 --max-model-len 262144
python -m sglang.launch_server \
  --model-path Qwen/Qwen3-4B-Instruct-2507-FP8 \
  --context-length 262144

If you hit out-of-memory issues, dropping the context length to 32,768 is the recommended workaround. For local workflows, Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers all support Qwen3. Qwen's recommended sampling parameters are Temperature=0.7, TopP=0.8, TopK=20, MinP=0.

Why the 2507 refresh mattered

The original Qwen3 line launched with a hybrid design where a single model handled both thinking and non-thinking modes. A recent enterprise agentic benchmark study caught the problem: even Qwen3 235B-A22B in non-thinking mode fared worse than Qwen2.5 72B Instruct, and most Qwen3 dense models underperformed even Qwen2.5 14B Instruct. The 2507 refresh split them cleanly into dedicated Instruct and Thinking checkpoints, which boosted performance across the board. This 4B checkpoint is the smallest beneficiary of that split, and it explains why the numbers look so different from the original Qwen3-4B.

Does FP8 hurt agentic performance?

A reasonable worry for anyone deploying tool-use agents is whether the FP8 rounding degrades function-calling accuracy. A large-scale enterprise agentic evaluation found the answer is essentially no: FP8 does not consistently reduce or increase agentic performance. For the 235B Instruct variant specifically, the pooled accuracy of the FP8 variant slightly beat either of the full-precision runs on Gaudi 3 and MI300X, though with significant confidence-interval overlap. That's a useful data point when deciding whether to serve FP8 in production.

Where it fits

Given the size, context length, and tool-calling scores, this checkpoint slots in well for:

  • Local agents on a single GPU where 30B MoE models are too heavy to serve
  • Long-document QA and summarization up to the 256K window
  • Edge or on-device chat assistants that need decent reasoning without a cloud round-trip
  • Function-calling backends via Qwen-Agent, which wraps the tool-calling templates and MCP configs
  • Cheap draft models for speculative decoding against a larger Qwen3 target

The broader signal is that the gap between frontier-adjacent quality and a 4B open-weights checkpoint keeps shrinking. A model you can run on a laptop-class GPU now hits GPQA scores that a year ago would have required a hosted API, and the FP8 packaging means you don't need to spin up your own quantization pipeline to deploy it.