StarCoder2 3B
BigCode · dense · 3.03B parameters · 16,384 context
Parameters
3.03B
Context Window
16K tokens
Architecture
Dense
Best GPU
RTX 4070 Ti
Cheapest API
$0.10/M
Quality Score
29/100
Intelligence Brief
StarCoder2 3B is a 3.03B parameter DENSE model from BigCode, featuring Grouped Query Attention (GQA) with 30 layers and 3,072 hidden dimensions. With a 16,384 token context window, it supports code. On standardized benchmarks, it achieves MMLU 32, HumanEval 28, GSM8K 18. The most cost-effective API deployment is via huggingface at $0.10/M output tokens. For self-hosted inference, RTX 4070 Ti delivers optimal throughput at $237/month.
Architecture Details
Memory Requirements
BF16 Weights
6.1 GB
FP8 Weights
3.0 GB
INT4 Weights
1.5 GB
GPU Compatibility Matrix
StarCoder2 3B is compatible with 100% of GPU configurations across 41 GPUs at 3 precision levels.
GPU Recommendations
BF16 · 1 GPU · vllm
100/100
score
Throughput
449.1 tok/s
Latency (ITL)
2.2ms
Est. TTFT
0ms
Cost/Month
$237
Cost/M Tokens
$0.20
BF16 · 1 GPU · vllm
100/100
score
Throughput
677.2 tok/s
Latency (ITL)
1.5ms
Est. TTFT
0ms
Cost/Month
$133
Cost/M Tokens
$0.07
BF16 · 1 GPU · vllm
100/100
score
Throughput
449.1 tok/s
Latency (ITL)
2.2ms
Est. TTFT
0ms
Cost/Month
$209
Cost/M Tokens
$0.18
Deployment Options
API Deployment
huggingface
$0.10/M
output tokens
Single GPU
RTX 4070 Ti
$237/mo
Min VRAM: 3 GB
Multi-GPU
RTX 4070 Ti
449.1 tok/s
Best available config
API Pricing Comparison
| Provider | Input $/M | Output $/M | Badges |
|---|---|---|---|
| huggingface | $0.10 | $0.10 | Cheapest |
Cost Analysis
| Provider | Input $/M | Output $/M | ~Monthly Cost |
|---|---|---|---|
| huggingfaceBest Value | $0.10 | $0.10 | $1 |
Cost per 1,000 Requests
Short (500 tok)
$0.07
via huggingface
Medium (2K tok)
$0.28
via huggingface
Long (8K tok)
$1.00
via huggingface
Performance Estimates
Throughput by GPU
VRAM Breakdown (RTX 4070 Ti, BF16)
Precision Impact
bf16
6.1 GB
weights/GPU
~449.1 tok/s
fp8
3.0 GB
weights/GPU
int4
1.5 GB
weights/GPU
Quality Benchmarks
Capabilities
Features
Supported Frameworks
Supported Precisions
Where to Deploy StarCoder2 3B
Self-Hosted Infrastructure
Similar Models
StarCoder2 7B
6.73B params · dense
Quality: 35
from $0.15/M
OpenELM 3B
3B params · dense
Quality: 50
VILA 1.5 3B
3B params · dense
Quality: 44
from $0.08/M
StableLM Zephyr 3B
3B params · dense
Quality: 50
BTLM 3B
3B params · dense
Quality: 50
Frequently Asked Questions
How much VRAM does StarCoder2 3B need for inference?
StarCoder2 3B requires approximately 6.1 GB of VRAM at BF16 precision, 3.0 GB at FP8, or 1.5 GB at INT4 quantization. Additional VRAM is needed for KV-cache (30720 bytes per token) and activations (~0.50 GB).
What is the best GPU for StarCoder2 3B?
The top recommended GPU for StarCoder2 3B is the RTX 4070 Ti using BF16 precision. It achieves approximately 449.1 tokens/sec at an estimated cost of $237/month ($0.20/M tokens). Score: 100/100.
How much does StarCoder2 3B inference cost?
StarCoder2 3B API inference starts from $0.10/M input tokens and $0.10/M output tokens. Self-hosted inference costs depend on your GPU configuration — use our ROI calculator for a detailed breakdown.