Skip to content

StarCoder2 15B vs Code Llama 13B

BigCode
StarCoder2 15B

BigCode · 15.5B params · Quality: 42

Meta
Code Llama 13B

Meta · 13B params · Quality: 44

Architecture Comparison

SpecStarCoder2 15BCode Llama 13B
TypeDENSEDENSE
Total Parameters15.5B13B
Active Parameters15.5B13B
Layers4040
Hidden Dimension6,1445,120
Attention Heads4840
KV Heads440
Context Length16,38416,384
Precision (default)BF16BF16

Memory Requirements

PrecisionStarCoder2 15BCode Llama 13B
BF16 Weights31.0 GB26.0 GB
FP8 Weights15.5 GB13.0 GB
INT4 Weights7.8 GB6.5 GB
KV-Cache / Token81920 B819200 B
Activation Estimate1.50 GB1.50 GB

Minimum GPUs Needed (BF16)

H100 SXM1 GPU1 GPU
L40S1 GPU1 GPU

Quality Benchmarks

BenchmarkStarCoder2 15BCode Llama 13B
Overall4244
MMLU45.047.0
HumanEval46.036.0
GSM8K32.035.0
MT-Bench58.063.0

StarCoder2 15B

MMLU
45.0
HumanEval
46.0
GSM8K
32.0
MT-Bench
58.0

Code Llama 13B

MMLU
47.0
HumanEval
36.0
GSM8K
35.0
MT-Bench
63.0

Capabilities

FeatureStarCoder2 15BCode Llama 13B
Tool Use✗ No✗ No
Vision✗ No✗ No
Code✓ Yes✓ Yes
Math✗ No✓ Yes
Reasoning✗ No✗ No
Multilingual✗ No✗ No
Structured Output✗ No✗ No

API Pricing Comparison

Cheapest Output (StarCoder2 15B)

$0.30/M

Input: $0.30/M

Cheapest Output (Code Llama 13B)

$0.22/M

Input: $0.22/M

ProviderStarCoder2 15B In $/MOut $/MCode Llama 13B In $/MOut $/M
together$0.22$0.22
huggingface$0.30$0.30

Recommendation Summary

  • Code Llama 13B scores higher on overall quality (44 vs 42).
  • Code Llama 13B is cheaper per output token ($0.22/M vs $0.30/M).
  • Code Llama 13B has a smaller memory footprint (26.0 GB vs 31.0 GB BF16), making it easier to deploy on fewer GPUs.
  • StarCoder2 15B is stronger at code generation (HumanEval: 46.0 vs 36.0).
  • Code Llama 13B is better at math reasoning (GSM8K: 35.0 vs 32.0).

Compare Other Models