★ Reading this for free? Get 25 structured AI courses + per-chapter AI tutor — the first chapter of every course free, no card.Start free in 30 secondsOr own every course: $149 once

Qwen 2.5 Coder 1.5B

Lightweight Local Coding Model from Alibaba Cloud

Released September 2024 by Alibaba Cloud's Qwen team. Qwen 2.5 Coder 1.5B is a genuinely small code-focused LLM: the Instruct model scores 70.7% on HumanEval in Qwen's technical report with only 1.54 billion parameters. The Ollama download is 1.0GB (Q4) and runs in about 2GB, it was pretrained on source code in 92 programming languages, and it is licensed under Apache 2.0. One of the most accessible local coding models for resource-constrained hardware.

Model Specifications

Architecture

Parameters: 1.54B
Base: Qwen 2.5 architecture, 28 layers
Training: Code-specific continued pretraining + instruction tuning
License: Apache 2.0
Release: September 2024

Context and Languages

Context Window: 32K tokens
Attention: GQA, 12 Q / 2 KV heads
Languages: 92 in pretraining (Qwen report)
Strongest: Python, JS, TS
Format: GGUF, SafeTensors

Resource Requirements

Q4_K_M: 1.0GB file
Q5_K_M: 1.1GB file
Q8_0: 1.6GB file
FP16: 3.1GB file
KV cache: ~0.9GB at full 32K

Published Benchmark Results

HumanEval and MBPP Scores (from Qwen Technical Report)

Scores for Qwen2.5-Coder-1.5B-Instruct, the build Ollama ships, from the Qwen2.5-Coder Technical Report (Tables 16-17, read November 2, 2026). Vendor-reported, not independently re-run.

Code Generation Benchmarks

HumanEval (pass@1)70.7%
MBPP (pass@1)69.2%
MultiPL-E (average across languages)56.7%

Context: What These Scores Mean

70.7% HumanEval means the Instruct model solves about 71 of the 164 HumanEval problems on its first attempt. The base model, before instruction tuning, scores 43.9%. For a 1.5B model, both are strong.

For comparison: in the same report, Qwen2.5-Coder-7B-Instruct scores 88.4% on HumanEval and DeepSeek-Coder-1.3B-Instruct 65.9%. HumanEval is short single-function Python, so the gap to 7B models grows on real multi-file work.

Practical impact: Useful for code completion, simple function generation, and boilerplate tasks. For complex multi-file reasoning, a larger model is still better.

HumanEval Scores: Small Base Models

Qwen 2.5 Coder 1.5B (base)43.9 HumanEval pass@1 %
43.9
DeepSeek Coder 1.3B (base)34.8 HumanEval pass@1 %
34.8
CodeGemma 2B (base)31.1 HumanEval pass@1 %
31.1
StarCoder2 3B (base)31.7 HumanEval pass@1 %
31.7

Performance Metrics

HumanEval
70.7
HumanEval+
66.5
MBPP
69.2
MultiPL-E avg
56.7
BigCodeBench
32.5

Bar chart: base models, Qwen2.5-Coder Technical Report Table 5 (CodeGemma 2B from Google's CodeGemma model card). Radar: Qwen2.5-Coder-1.5B-Instruct, Tables 16-17.

VRAM and Quantization Options

VRAM Usage by Quantization Level

One of the main advantages of a 1.5B model is genuinely low resource usage. These are the Ollama download sizes for each quantization level; add the KV cache (about 28KB per token at FP16, so 0.1GB at a 4K context and 0.9GB at the full 32K). Most users should start with Q4_K_M, the default tag.

Memory Usage Over Time

3GB
2GB
2GB
1GB
0GB
Q4_K_MQ5_K_MQ8_0FP16
Q4_K_M
1.0GB (qwen2.5-coder:1.5b)
Best for constrained devices
Q5_K_M
1.1GB (1.5b-instruct-q5_K_M)
Good quality/size balance
Q8_0
1.6GB (1.5b-instruct-q8_0)
Near full quality
FP16
3.1GB (1.5b-instruct-fp16)
Full precision

Sizes from the Ollama registry, read November 2, 2026. Pull a specific build with, for example, ollama pull qwen2.5-coder:1.5b-instruct-q8_0.

92 Language Support

According to the Qwen2.5-Coder technical report, the pretraining source code spans 92 programming languages. Performance varies significantly by language: the 1.5B Instruct model averages 56.7% across the report's MultiPL-E languages. Languages with more training data (Python, JavaScript, TypeScript, Java, C++) produce better results; less common languages will have weaker output quality.

Strongest Languages

Python, JavaScript, TypeScript
Java, C++, Go, Rust
C#, PHP, Ruby

Most training data, best results

Decent Support

Swift, Kotlin, Dart, Scala
Shell/Bash, SQL, HTML/CSS
Lua, Perl, R, MATLAB

Good for common tasks

Limited Support

Haskell, OCaml, Elixir, Erlang
Zig, Nim, Crystal, V
Assembly, Fortran, COBOL

Less training data, weaker output

Note: The "92 languages" figure describes the pretraining data, not a quality guarantee. A 1.5B model is most useful in the widely used languages; for less common languages, expect simpler completions and more errors. Larger models like Qwen 2.5 Coder 7B handle the long tail of languages much better.

Hardware Compatibility for Qwen 2.5 Coder 1.5B

System requirements and compatible hardware configurations for running Qwen 2.5 Coder 1.5B locally

8GB

Budget Setup

  • • Phi-3 Mini (3.8B)
  • • Basic tasks
  • • Good for learning
  • • Cost: $500-800
16GB

Recommended

  • • Llama 3.1 8B
  • • Professional use
  • • Great balance
  • • Cost: $800-1500
32GB

Enthusiast

  • • Llama 3.1 70B
  • • Enterprise ready
  • • Maximum quality
  • • Cost: $1500-3000

Local Coding Model Alternatives

ModelOllama tagDownloadSpeed ceiling (M3 Pro, 150 GB/s)HumanEval
Qwen 2.5 Coder 1.5Bqwen2.5-coder:1.5b0.99 GB~152 tok/s ceiling43.9% (base) / 70.7% (Instruct)
CodeGemma 2Bcodegemma:2b1.55 GB~97 tok/s ceiling31.1% (base)
StarCoder2 3Bstarcoder2:3b1.71 GB~88 tok/s ceiling31.7% (base)
DeepSeek Coder 1.3Bdeepseek-coder:1.3b0.78 GB~192 tok/s ceiling34.8% (base) / 65.9% (Instruct)
Phi-2 2.7Bphi:2.7b1.60 GB~94 tok/s ceilingnot in the Qwen report

Ceiling = memory bandwidth (Apple's 150 GB/s for the M3 Pro) ÷ file size: an upper bound, not a measurement. For scale, our one measured run on that machine, qwen2.5-coder:3b-base (1.93GB), generated 55.0 tok/s against a 78 tok/s ceiling (Ollama 0.40.13, 2 November 2026). Small models usually land further below their ceiling because fixed per-token overhead matters more.

Choosing the Right Small Coding Model

When to Choose Qwen 2.5 Coder 1.5B

  • - You want the best published HumanEval score in this size class
  • - You want Apache 2.0 licensing with no restrictions
  • - Your VRAM budget is 1-2GB
  • - You primarily work with Python, JS, or TypeScript
  • - You need a 32K context window

When to Consider Alternatives

  • - StarCoder2 3B: Trained on The Stack v2; lower base HumanEval (31.7%) at twice the size
  • - Phi-2 2.7B: Better general reasoning, also good at code
  • - DeepSeek Coder 1.3B: Even smaller, but weaker benchmarks
  • - CodeGemma 2B: Google's option, good for fill-in-middle
  • - Any 7B model: If you have 4-8GB VRAM, much better quality

Installation and Setup

System Requirements

▸
Operating System
Windows 10+, macOS 11+, Ubuntu 20.04+, Linux (most distros)
▸
RAM
4GB system RAM minimum (model uses about 1.1-4GB depending on quantization and context)
▸
Storage
1-3GB free space depending on quantization level
▸
GPU
Optional - runs on CPU. GPU accelerates inference (any with 2GB+ VRAM)
▸
CPU
2+ cores, x86_64 or ARM64 (Apple Silicon runs well via Metal)
1

Install Ollama

Download and install the Ollama runtime for your platform

$ curl -fsSL https://ollama.com/install.sh | sh
2

Pull Qwen 2.5 Coder 1.5B

Download the model (approximately 1.0GB for the default Q4 quantization)

$ ollama pull qwen2.5-coder:1.5b
3

Run the Model

Start an interactive coding session

$ ollama run qwen2.5-coder:1.5b
4

Optional: Limit Resource Usage

Useful for memory-constrained systems or running alongside other tools

$ export OLLAMA_NUM_PARALLEL=1 && export OLLAMA_MAX_LOADED_MODELS=1
Terminal
$ollama pull qwen2.5-coder:1.5b
pulling manifest pulling model layer... 100% 986 MB pulling template and license layers... 100% verifying sha256 digest writing manifest success
$ollama run qwen2.5-coder:1.5b "Write a Python function to check if a number is prime"
def is_prime(n: int) -> bool: """Check if a number is prime.""" if n < 2: return False if n < 4: return True if n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return True # Example usage print(is_prime(17)) # True print(is_prime(15)) # False
$_

Practical Use Cases

Good Use Cases

  • - Code completion: Inline suggestions in editors like VS Code with Continue
  • - Simple function generation: Boilerplate, utility functions, unit tests
  • - Resource-limited environments: Old laptops, Raspberry Pi, VMs with low memory
  • - Offline development: No internet required after model download
  • - Learning and experimentation: Low barrier to entry for trying local AI

Limitations to Be Aware Of

  • - Complex reasoning: Multi-step logic problems are weak at 1.5B -- for math-heavy work, the specialised Qwen 2.5 Math 7B is a far better fit
  • - Large codebase understanding: Cannot reason about full project architecture
  • - Niche languages: Quality drops sharply outside top 20 languages
  • - Debugging complex bugs: Often misidentifies root causes
  • - Documentation generation: Tends to produce generic or incomplete docs

Honest Assessment

What Qwen 2.5 Coder 1.5B Actually Is

Qwen 2.5 Coder 1.5B is genuinely impressive for a 1.5B parameter model. Its 70.7% HumanEval score (Instruct, vendor-reported) is ahead of older 1-3B coding models in Qwen's own comparison tables.

However, it is important to be clear: it does not match current 7B coding models. Qwen2.5-Coder-7B-Instruct scores 88.4% on HumanEval in the same report, and the gap is larger on multi-file, real-repository work than on HumanEval's single functions. If you have the hardware to run a 7B model (a 4.7GB download for qwen2.5-coder:7b), you will get better results.

The real value of this model is accessibility:

  • - It runs on hardware that cannot load a 7B model at all
  • - It leaves enough VRAM headroom for other applications alongside it
  • - It provides useful (not great) code assistance at minimal resource cost
  • - The Apache 2.0 license makes it usable anywhere without legal concerns

Bottom line: Choose Qwen 2.5 Coder 1.5B when you need a coding model that fits where a 7B model cannot. Choose a 7B model when you can afford the resources.

Frequently Asked Questions

What are the real HumanEval and MBPP scores for Qwen 2.5 Coder 1.5B?

The Qwen2.5-Coder technical report (arXiv 2409.12186) lists the base model at 43.9% on HumanEval and 69.2% on MBPP, and the Instruct model, which is what ollama pull qwen2.5-coder:1.5b downloads, at 70.7% on HumanEval, 66.5% on HumanEval+ and 69.2% on MBPP. These are vendor-reported numbers. Earlier versions of this page quoted 43.3% and 50%; those figures were wrong.

How much VRAM does Qwen 2.5 Coder 1.5B need?

Ollama's downloads are 1.0GB at Q4_K_M (the default tag), 1.1GB at Q5_K_M, 1.6GB at Q8_0 and 3.1GB at FP16. Add the KV cache, about 28KB per token at FP16: roughly 0.1GB at a 4K context and 0.9GB at the full 32K. In practice the Q4 build runs in about 2GB. It also runs on CPU-only systems, more slowly.

Does Qwen 2.5 Coder 1.5B really support 92 programming languages?

According to the Qwen2.5-Coder technical report, the pretraining source code spans 92 programming languages. Performance varies significantly by language -- Python, JavaScript, and TypeScript get the strongest results, while less common languages will have weaker output. In practice, expect useful results mainly in widely used languages.

How does it compare to StarCoder2 3B and DeepSeek Coder 1.3B?

In the Qwen2.5-Coder technical report's base-model table, Qwen 2.5 Coder 1.5B scores 43.9% on HumanEval, StarCoder2 3B 31.7% and DeepSeek Coder 1.3B 34.8%. So the Qwen model beats StarCoder2 3B at half the size and DeepSeek Coder 1.3B at a similar size. Among Instruct models it scores 70.7% against 65.9% for DeepSeek Coder 1.3B Instruct.

What is the context window for Qwen 2.5 Coder 1.5B?

The model card lists a full context length of 32,768 tokens (32K). The YaRN extension to 128K that Qwen documents applies to the 7B and larger Qwen2.5-Coder models, not the 1.5B. For code completion and short generation tasks, 32K is plenty.

What license is Qwen 2.5 Coder 1.5B released under?

Qwen 2.5 Coder 1.5B is released under the Apache 2.0 license, which is fully permissive for both commercial and non-commercial use. You can use it freely in production applications, modify it, and distribute it without restriction. This makes it one of the most legally accessible small coding models available.

Get Started with Qwen 2.5 Coder 1.5B

If you have limited VRAM and need a local coding assistant, Qwen 2.5 Coder 1.5B is one of your best options. It is free, permissively licensed, and genuinely small enough to run on almost anything.

ollama run qwen2.5-coder:1.5b

Apache 2.0 license -- free for any use -- 1.0GB download at Q4 -- 32K context

Reading now
Join the discussion

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

🎯
AI Learning Path

Go from reading about AI to building with AI

25 structured courses. Hands-on projects. Runs on your machine. Start free.

Or own it for life — Lifetime $149 $599, pay once
Barsha Mohapatra

Written by

Barsha Mohapatra

Founder and Editor, Local AI Master · Founder, Little AI Master

Founder of Little AI Master and the editor behind every course and guide on Local AI Master. Years of tutoring students taught her where AI education actually fails.

📅 Published: September 28, 2025🔄 Last Updated: November 2, 2026✓ Manually Reviewed

Related Guides

Continue your local AI journey with these comprehensive guides

More on Local AI Hardware
See the full AI Hardware Guide 2026 guide.
📚
Free · no account required

Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide

No spam. Unsubscribe with one click.

🎯
AI Learning Path

Found your model? Now build something with it.

25 hands-on courses — RAG, agents, fine-tuning — all running locally. First chapter free, no card.

Or own it for life — Lifetime $149 $599, pay once
Free Tools & Calculators