phi-2 vs Qwen2.5-1.5B-Instruct
phi-2 (2.8B parameters) and Qwen2.5-1.5B-Instruct (1.5B parameters) side by side: the memory each needs at every precision, what it costs to run on a live GPU, and the context window, KV cache and license where they are published. Numbers are computed from the models' published specs; this page does not rank quality.
Side by side
| Fact | phi-2 | Qwen2.5-1.5B-Instruct |
|---|---|---|
| Parameters | 2.8B | 1.5B |
| Architecture | Multi-head attention | Grouped-query attention |
| Context length | 2,048 tokens | 32,768 tokens |
| License | – | – |
| Published precision | F16 | BF16 |
| VRAM needed, As published | 6.2 GB | 3.5 GB |
| VRAM needed, FP8 | 3.1 GB | 1.7 GB |
| VRAM needed, INT4 | 1.6 GB | 0.9 GB |
| Cheapest live fit, As published | V100 · $0.088/hr | RTX 4070 Super · $0.121/hr |
| Cheapest live fit, FP8 | RTX 4070 Super · $0.121/hr | RTX 4070 Super · $0.121/hr |
| Cheapest live fit, INT4 | RTX 4070 Super · $0.121/hr | RTX 4070 Super · $0.121/hr |
| KV cache per token (16-bit) | 320 KB | 28 KB |
| KV cache at 32k tokens | 10.0 GB | 0.88 GB |
| KV cache at 128k tokens | 40.0 GB | 3.50 GB |
VRAM is the weight size at each precision times a flat 1.2 overhead; see the methodology. The FP8 and INT4 rows need a quantized checkpoint or an engine that quantizes on load. The fit is the lowest-priced single GPU type that holds the model at that precision, or the lowest-priced multi-GPU set (up to 8) when none does. KV cache is for one sequence at 16-bit, computed from each model's config where the attention layout is known.
Which to pick
- Qwen2.5-1.5B-Instruct needs less VRAM at its published precision (3.5 GB against 6.2 GB), so it fits on a smaller GPU.
- Qwen2.5-1.5B-Instruct lists the longer context window (32,768 tokens against 2,048).
- Qwen2.5-1.5B-Instruct caches less per sequence at 32k tokens (0.9 GB against 10.0 GB), leaving more memory for batching.
- phi-2 has the cheaper live GPU fit at its published precision ($0.088/hr against $0.121/hr).
These follow only from the facts in the table above. Whether either model does your task well is a separate question this page does not answer.
Keep reading
- phi-2: full VRAM table and live GPU fit
- Qwen2.5-1.5B-Instruct: full VRAM table and live GPU fit
- The Phi model series
- The Qwen model series
- All models that fit in 8 GB
Other comparisons