Code Llama-13B TPS calculator

Open weights Meta AI 13B parameters August 2023

Each card below is assessed against this model at the context length and minimum quality you choose. Speed is an estimate for a single request, calculated from the card's memory bandwidth and the size of the model once compressed.

Calculated for this model

241 cards that can run it

818 cards we hold specifications for

Smallest card that fits

Xeon Phi 7120P

16 GB · Q4_K_M · 17.2 tok/s

Fastest card

B200

261 tok/s · 180 GB

Which GPUs can run Code Llama-13B?

Set the inputs, read the answer

A longer conversation needs more memory, which can push this model off smaller cards.

Hides cards that would only fit the model by compressing it below this point.

241 cards match

Calculating
Needs Quantisation Fit
261 tok/s

222–313

B200 NVIDIA 180 GB 8,000 GB/s Jan 2024 20.1 GB Q8_0 Comfortable
261 tok/s

222–313

B300 NVIDIA 288 GB 8,000 GB/s Sep 2025 20.1 GB Q8_0 Comfortable
208 tok/s

125–333 · low confidence

Radeon Instinct MI350X AMD 288 GB 8,190 GB/s Jan 2025 20.1 GB Q8_0 Comfortable
208 tok/s

125–333 · low confidence

Radeon Instinct MI355X AMD 288 GB 8,190 GB/s Jan 2025 20.1 GB Q8_0 Comfortable
166 tok/s

100–266 · low confidence

Radeon Instinct MI300 AMD 128 GB 6,550 GB/s Jan 2023 20.1 GB Q8_0 Comfortable
159 tok/s

135–191

H200 NVL NVIDIA 141 GB 4,890 GB/s Nov 2024 20.1 GB Q8_0 Comfortable
159 tok/s

135–191

H200 SXM 141 GB NVIDIA 141 GB 4,890 GB/s Nov 2024 20.1 GB Q8_0 Comfortable
152 tok/s

91–244 · low confidence

Radeon Instinct MI325X AMD 256 GB 6,000 GB/s Oct 2024 20.1 GB Q8_0 Comfortable
135 tok/s

81–217 · low confidence

Radeon Instinct MI300A AMD 128 GB 5,325 GB/s Dec 2023 20.1 GB Q8_0 Comfortable
135 tok/s

81–217 · low confidence

Radeon Instinct MI300X AMD 192 GB 5,325 GB/s Dec 2023 20.1 GB Q8_0 Comfortable
135 tok/s

81–217 · low confidence

Radeon Instinct MI308X AMD 192 GB 5,325 GB/s Dec 2023 20.1 GB Q8_0 Comfortable
128 tok/s

109–154

H100 NVL 94 GB NVIDIA 94 GB 3,940 GB/s Mar 2023 20.1 GB Q8_0 Comfortable
109 tok/s

93–131

H100 PCIe 96 GB NVIDIA 96 GB 3,360 GB/s Mar 2023 20.1 GB Q8_0 Comfortable
109 tok/s

93–131

H100 SXM5 80 GB NVIDIA 80 GB 3,360 GB/s Oct 2022 20.1 GB Q8_0 Comfortable
109 tok/s

93–131

H100 SXM5 94 GB NVIDIA 94 GB 3,360 GB/s Mar 2023 20.1 GB Q8_0 Comfortable
109 tok/s

93–131

H100 SXM5 96 GB NVIDIA 96 GB 3,360 GB/s Mar 2023 20.1 GB Q8_0 Comfortable
109 tok/s

93–131

H800 SXM5 NVIDIA 80 GB 3,360 GB/s Mar 2023 20.1 GB Q8_0 Comfortable
85.0 tok/s

72–102

Tesla V100 SXM2 16 GB NVIDIA 16 GB 1,130 GB/s Nov 2019 14.0 GB Q4_K_M Tight
83.4 tok/s

50–133 · low confidence

Radeon Instinct MI250 AMD 128 GB 3,280 GB/s Nov 2021 20.1 GB Q8_0 Comfortable
83.4 tok/s

50–133 · low confidence

Radeon Instinct MI250X AMD 128 GB 3,280 GB/s Nov 2021 20.1 GB Q8_0 Comfortable
72.2 tok/s

61–87

GeForce RTX 5080 NVIDIA 16 GB 960 GB/s Jan 2025 14.0 GB Q4_K_M Tight
69.5 tok/s

42–111 · low confidence

Data Center GPU Max 1550 Intel 128 GB 3,280 GB/s Jan 2023 20.1 GB Q8_0 Comfortable
68.0 tok/s

41–109 · low confidence

Data Center GPU Max Subsystem Intel 128 GB 3,210 GB/s Jan 2023 20.1 GB Q8_0 Comfortable
67.5 tok/s

57–81

Tesla V100 DGXS 16 GB NVIDIA 16 GB 897 GB/s Mar 2018 14.0 GB Q4_K_M Tight
67.5 tok/s

57–81

Tesla V100 PCIe 16 GB NVIDIA 16 GB 897 GB/s Jun 2017 14.0 GB Q4_K_M Tight

Speeds are estimates for a single request — one conversation at a time — calculated from memory bandwidth, model size and quantisation. Real throughput varies with the inference runtime and its version. Figures published by hardware vendors measure many simultaneous requests and are much higher.

On record

Full specification

Everything on record for this model. Most of it describes how it was trained rather than how it runs — useful context for judging how much work went into it, and how it compares with models built at a different scale.

Origin

Who built this model, where, and when it was published.

Organisation
Meta AI
Organisation type
Industry
Country
United States of America
Published
14 August 2023
Authors
Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Ellen Tan, Yossef (Yossi) Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafiori, Wenhan Xiong, Alexandre Defossez, Jade Copet, Faisal Azhar, Hugo Touvron, Gabriel Synnaeve, Louis Martin, Nicolas Usunier, Thomas Scialom

What it does

The problem areas the model was built for. A model can carry several of each.

Domain
Language
Task
Code generation
Base model
Llama 2-13B

Size

How large the model is and how much data it was trained on. Parameters are the figure that decides whether it fits on a given graphics card.

Parameters
13B

13B

Training data
600,000,000,000 tokens

"We train Code Llama on 500B additional tokens and Code Llama - Python further on 100B tokens"

Batch size
4,000,000

Training compute

The arithmetic performed to train the model, measured in floating-point operations. It is a measure of what the training run cost, not of how fast the finished model answers you.

How it was established
Operation counting
Fine-tuning compute
4.7 × 10²² FLOP

600000000000*13*10^9*6 = 4.68e+22

The training run

What it physically took to train: which chips, how many, for how long, and what that drew from the wall.

Training hardware
NVIDIA A100 SXM4 80 GB

Availability

Whether you can obtain the model and run it on your own hardware, which is what decides if any of the graphics-card figures on this page apply.

Weights
Open — downloadable
Model access
Open weights (restricted use)
Training code
Unreleased

Llama 2 license. can't use outputs to train models. https://github.com/meta-llama/llama/blob/main/LICENSE

How it is classified

Labels the source dataset applies when tracking notable models, and how confident it is in the entry.

Record confidence
Confident
Citations
3,163

Sources

Where this record came from and when it was last checked.

Reference
Code Llama: Open Foundation Models for Code
Last updated
25 May 2026

The extremes

What the numbers mean

Hardware requirements in practice

Minimum card

Xeon Phi 7120P

Memory needed

14.0 GB

Fastest

261 tok/s

Code Llama-13B reaches a parameter count of 13B. That is small enough that hardware is rarely the obstacle, including on cards several years old. The number of cards we track that can run it: 241.

The entry point is Xeon Phi 7120P, with a memory capacity of 16 GB, running it at a compression of Q4_K_M and producing around 17.2 tokens per second.

The quickest result comes from B200, generating roughly 261 tokens per second on the strength of a memory bandwidth of 8,000 GB/s.

What this model is

Code Llama-13B was published by Meta AI, in the country recorded as United States of America, during August 2023. The publishing organisation is categorised as industry.

It works in the domain of Language, and is recorded as performing the task of code generation.

It builds on Llama 2-13B. That is the usual way a specialised model is produced.

The weights being open is what puts this page in the calculator rather than only in the catalogue: it is a model you can actually hold.

What decides the speed

Across every card that can run it, the middle of the range sits at 30.0 tokens per second. Producing text faster than most people read it: 220 of them.

Every weight participates in every token here, so bandwidth is the whole story: the ranking below is effectively a ranking of memory throughput.

Because the architecture is recorded, the memory column is derived rather than estimated.

How it was trained

The training set ran to roughly 600,000,000,000 tokens of text.

Step by step

How to choose a GPU for Code Llama-13B

The table above has already assessed every card we hold specifications for against this model. Getting to your answer takes six steps.

  1. 01

    Start from the memory column

    The table lists every card able to hold Code Llama-13B, needing around 14.0 GB at a compression of Q4_K_M. Capacity is the gate — a card either holds it or it does not.

  2. 02

    Decide how long your conversations run

    Longer conversations cost memory on top of what the weights need. Move the slider to your real working length before trusting any row for Code Llama-13B.

  3. 03

    Decide how much compression you will accept

    Compression is what makes a model fit smaller cards, at some cost in accuracy, reaching a compression of Q4_K_M on the smallest card that fits. Setting a minimum quality drops the cards that only manage it by squeezing further than you would want, and holds the comparison at one level.

  4. 04

    Rank by throughput rather than spec sheet

    Sort by speed to see how cards rank for Code Llama-13B. It will not match a gaming ordering, because generation is bound by memory bandwidth. The card topping the list is B200, at 261 tok/s.

  5. 05

    Check the fit verdict before buying

    The fit column separates cards that just manage it from those with room to spare, in the case of Code Llama-13B. Comfortable means you can grow the context later. That difference matters more than a few tokens per second, so buy for comfortable if you expect to.

  6. 06

    See what else that card runs

    Following a card through to its own page shows every other model it can hold, which is the question that follows once you have settled on Code Llama-13B.

Answers

Code Llama-13B — common questions

01

Code Llama-13B— where can I download it?

The weights are published, though we do not hold a repository link for it. This site calculates hardware requirements rather than hosting model files.

02

Code Llama-13B— can I run it if it does not fit in my GPU?

Only by offloading, which is usually a false economy: the part held in system memory drags the whole thing down. The nearest miss we calculate falls short by 3.2 GB. Every figure here assumes the whole model is resident on the card.

03

Code Llama-13B— would two GPUs run it faster?

Two cards buy memory rather than speed, which matters only if one card cannot hold it. The number that can: 241. So a second card is rarely the answer here.

04

Code Llama-13B— why does the quantisation differ between cards?

Because capacity varies, so does how hard it has to be squeezed. The number of distinct levels in the table above: 3. Bigger cards get the more accurate version, and the quality floor above pins the comparison to one level.

05

Code Llama-13B— how accurate are these speed estimates?

These are estimates with real error bars, and any of them could reasonably land anywhere in its published range depending on which runtime you use. The fastest result here: 222–313 tok/s on B200. The same model and card vary by thirty to fifty per cent depending on the inference software and its version.

06

Code Llama-13B— what GPU do I need to run it?

The smallest card in our catalogue that holds it is Xeon Phi 7120P, with a memory capacity of 16 GB. It runs the model at a compression of Q4_K_M using about 14.0 GB, and produces roughly 17.2 tokens per second. The number of cards able to run it in total: 241.

07

Code Llama-13B— how fast is it on a GPU?

It depends on the card. The quickest we calculate is B200, at about 261 tokens per second; the slowest that still runs it manages considerably less. Reading speed is around ten tokens per second, and the number of cards clearing that: 220.

08

Code Llama-13B— how much VRAM does it need?

It needs about 14.0 GB at a compression of Q4_K_M, which is what the smallest card that runs it uses. Less compression needs more: the figures in the memory column above are recalculated for each card, because each one holds the least-compressed version it can.

09

Code Llama-13B— can I run it on a GPU holding 16 GB?

Yes. The card Tesla V100 SXM2 16 GB, holding 16 GB, runs it at a compression of Q4_K_M, using about 14.0 GB and generating roughly 85.0 tokens per second. The fit is tight.

10

Code Llama-13B— can I run it on a GPU holding 24 GB?

Yes. The card GeForce RTX 5090 D V2, holding 24 GB, runs it at a compression of Q8_0, using about 20.1 GB and generating roughly 43.7 tokens per second. The fit is tight.

11

Code Llama-13B— is it open source?

Its weights are published, so it can be downloaded and run on your own hardware. Note that open weights is not the same as open source in the full sense — it says nothing about the training data, the training code, or the commercial terms attached.

12

Code Llama-13B— how many parameters does it have?

It has a parameter count of 13B. 13B. That figure is the total, and it is what decides how much memory the model needs — roughly half a gigabyte per billion at the compression most people use.

13

Code Llama-13B— who created it?

It was published by Meta AI, based in United States of America, an organisation categorised as industry.

14

Code Llama-13B— when was it released?

It was published in August 2023. Capability per parameter has improved considerably since, so a newer model of the same size is often the better use of the same hardware.

15

Code Llama-13B— what is it used for?

It works in the domain of Language, and is recorded as handling the task of code generation. A model can carry several of each, so these are the areas it was built for rather than a limit on what it will attempt.

Source

Original publication

Record last updated 25 May 2026

The other direction

Looking at it from the other side?

This page starts from the model. If you already own a card and want to know everything it will run, start from the hardware instead.