Code Llama-7B TPS calculator

Open weights Meta AI 7B 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

306 cards that can run it

818 cards we hold specifications for

Smallest card that fits

P102-101

10 GB · Q4_K_M · 38.0 tok/s

Fastest card

B200

484 tok/s · 180 GB

Which GPUs can run Code Llama-7B?

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.

306 cards match

Calculating
Needs Quantisation Fit
484 tok/s

411–581

B200 NVIDIA 180 GB 8,000 GB/s Jan 2024 11.8 GB Q8_0 Comfortable
484 tok/s

411–581

B300 NVIDIA 288 GB 8,000 GB/s Sep 2025 11.8 GB Q8_0 Comfortable
387 tok/s

232–618 · low confidence

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

232–618 · low confidence

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

185–495 · low confidence

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

251–355

H200 NVL NVIDIA 141 GB 4,890 GB/s Nov 2024 11.8 GB Q8_0 Comfortable
296 tok/s

251–355

H200 SXM 141 GB NVIDIA 141 GB 4,890 GB/s Nov 2024 11.8 GB Q8_0 Comfortable
283 tok/s

170–453 · low confidence

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

151–402 · low confidence

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

151–402 · low confidence

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

151–402 · low confidence

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

203–286

H100 NVL 94 GB NVIDIA 94 GB 3,940 GB/s Mar 2023 11.8 GB Q8_0 Comfortable
218 tok/s

185–261

CMP 170HX 10 GB NVIDIA 10 GB 1,560 GB/s Sep 2021 8.5 GB Q4_K_M Tight
203 tok/s

173–244

H100 PCIe 96 GB NVIDIA 96 GB 3,360 GB/s Mar 2023 11.8 GB Q8_0 Comfortable
203 tok/s

173–244

H100 SXM5 80 GB NVIDIA 80 GB 3,360 GB/s Oct 2022 11.8 GB Q8_0 Comfortable
203 tok/s

173–244

H100 SXM5 94 GB NVIDIA 94 GB 3,360 GB/s Mar 2023 11.8 GB Q8_0 Comfortable
203 tok/s

173–244

H100 SXM5 96 GB NVIDIA 96 GB 3,360 GB/s Mar 2023 11.8 GB Q8_0 Comfortable
203 tok/s

173–244

H800 SXM5 NVIDIA 80 GB 3,360 GB/s Mar 2023 11.8 GB Q8_0 Comfortable
155 tok/s

93–248 · low confidence

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

93–248 · low confidence

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

77–206 · low confidence

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

76–202 · low confidence

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

105–148

A100 SXM4 80 GB NVIDIA 80 GB 2,040 GB/s Nov 2020 11.8 GB Q8_0 Comfortable
123 tok/s

105–148

A100X NVIDIA 80 GB 2,040 GB/s Jun 2021 11.8 GB Q8_0 Comfortable
123 tok/s

105–148

A800 SXM4 80 GB NVIDIA 80 GB 2,040 GB/s Aug 2022 11.8 GB Q8_0 Comfortable

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-7B

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
7B

7B

Training data
600,000,000,000 tokens

Llama 2 used 2T tokens, and "We train Code Llama on 500B additional tokens and Code Llama - Python further on 100B tokens" 2T + 500B + 100B = 2600000000000

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.

Training compute
1.1 × 10²³ FLOP

2.5e22 finetune compute + 8.4e22 base compute for Llama 2-7B, for ~1.1e23 compute overall Table 26: "In aggregate, training all 12 Code Llama models required 1400K GPU hours of computation on hardware of type A100-80GB" Suggests all versions took a combined 4.7e23 FLOPs: 3.12e14 * 1400000 * 3600 * 0.3 = 4.7e23 Assuming this refers to the finetune compute only, agrees with our finetune estimate if compute is proportional to parameter count: 7 / (7+13+34+70) = 0.056 0.056 * 4.7e23 = 2.65e22

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

Code Llama-base is trained from Llama 2 with 500B tokens: "We train Code Llama on 500B tokens during the initial phase, starting from the 7B, 13B, and 34B versions of Llama 2" Code Llama-Python required an additional 100B tokens in fine-tuning: "We train Code Llama on 500B additional tokens and Code Llama - Python further on 100B tokens." Code Llama-Instruct is fine-tuned on 5B tokens: "For Code Llama - Instruct, we train with a batch size of 524,288 tokens and on approx. 5B tokens in total." …

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.

Likely above 10²³ FLOP
Yes
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

The hardware side

Minimum card

P102-101

Memory needed

8.5 GB

Fastest

484 tok/s

Code Llama-7B is small enough at 7B parameters that hardware is rarely the obstacle — 306 of the cards we track can run it, including cards several years old.

At the low end, a P102-101 handles it — 10 GB, at Q4_K_M, for about 38.0 tokens per second.

At the other end, a B200 generates roughly 484 tokens per second on it, on the strength of 8,000 GB/s of memory bandwidth.

Background

Code Llama-7B was published by Meta AI, in United States of America, in August 2023. The organisation is categorised as industry.

It works in Language, and is recorded as doing code generation.

It builds on Llama 2-7B, which is why it shares that model's general shape and size.

Because its weights were released, nothing about running it depends on a provider staying available — it is yours once downloaded.

Reading the throughput figures

Across every card that can run it, the middle of the range is about 35.4 tokens per second, and 289 of them clear the ten tokens per second that roughly matches reading speed.

It is a dense model, so every parameter is read for every token produced. That makes speed track memory bandwidth almost exactly — a card with twice the bandwidth generates roughly twice as fast.

Its attention layout is on file, so the memory figures are computed exactly rather than approximated.

How it was trained

Producing it required around 1.1 × 10²³ FLOP of arithmetic, on NVIDIA A100 SXM4 80 GB, which is a statement about the training budget rather than about inference.

Around 600,000,000,000 tokens went into training it.

Step by step

How to choose a GPU for Code Llama-7B

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 that can hold Code Llama-7B — around 8.5 GB at Q4_K_M. That figure, not the card's headline performance, is what decides whether it runs.

  2. 02

    Decide how long your conversations run

    The conversation occupies memory too, and grows as it goes. Set the slider to the length you expect: at long context Code Llama-7B can slip off a card that handles short questions easily.

  3. 03

    Set a quality floor

    Each card runs the least-compressed copy it can hold — Q4_K_M on the smallest card that fits. Setting a floor drops the cards that only manage Code Llama-7B by squeezing it further than you would want.

  4. 04

    Rank by throughput rather than spec sheet

    The speed ordering for Code Llama-7B is effectively an ordering by memory bandwidth, which is why the B200 tops it at 484 tok/s.

  5. 05

    Check the fit verdict before buying

    Tight means Code Llama-7B loads and works, with no room to raise the context later. Comfortable means you can. The difference matters more than a few tokens per second.

  6. 06

    Check the card from the other side

    Each card page repeats this sweep for every model we hold. It answers what else the hardware is good for, beyond Code Llama-7B.

Answers

Code Llama-7B — common questions

01

How many parameters does Code Llama-7B have?

Code Llama-7B has 7B parameters. 7B. 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.

02

Who created Code Llama-7B?

Code Llama-7B was published by Meta AI, based in United States of America, categorised as industry.

03

When was Code Llama-7B released?

Code Llama-7B 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.

04

What is Code Llama-7B used for?

Code Llama-7B works in Language, and is recorded as handling 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.

05

Where can I download Code Llama-7B?

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

06

How much compute was used to train Code Llama-7B?

Around 1.1 × 10²³ FLOP, on NVIDIA A100 SXM4 80 GB. That measures what producing the model cost and says nothing about how quickly it answers once trained — inference speed comes from memory bandwidth, not from the training budget.

07

Can I run Code Llama-7B if it does not fit in my GPU?

Only by offloading, which is usually a false economy: the part in system memory drags the whole thing down — the nearest miss we calculate is short by 1.3 GB. Our figures for Code Llama-7B assume it is fully resident.

08

Would two GPUs run Code Llama-7B faster?

Two cards buy memory rather than speed. That matters for Code Llama-7B only if one card cannot hold it — 306 can, so a second adds little.

09

Why does the quantisation differ between cards for Code Llama-7B?

Each card is shown running the least-compressed copy it can hold, and Code Llama-7B appears at 4 different compression levels across the cards that fit it. Bigger cards get the more accurate version.

10

How accurate are these Code Llama-7B speed estimates?

These are estimates with real error bars. The fastest result here, 411–581 tok/s on the B200, could reasonably land anywhere in its published range depending on which runtime you use.

11

What GPU do I need to run Code Llama-7B?

The smallest card in our catalogue that holds Code Llama-7B is the P102-101, with 10 GB of memory. It runs the model at Q4_K_M using about 8.5 GB, and produces roughly 38.0 tokens per second. 306 cards in total can run it.

12

How fast is Code Llama-7B on a GPU?

It depends on the card. The quickest we calculate is a B200 at about 484 tokens per second; the slowest that still runs it manages considerably less. Reading speed is around ten tokens per second, and 289 of the cards that can run Code Llama-7B clear that.

13

How much VRAM does Code Llama-7B need?

About 8.5 GB at Q4_K_M compression, 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.

14

Can I run Code Llama-7B on a 12 GB GPU?

Yes. A GeForce RTX 3080 Ti with 12 GB runs it at Q6_K, using about 10.1 GB and generating roughly 80.2 tokens per second — a tight fit.

15

Can I run Code Llama-7B on a 16 GB GPU?

Yes. A Tesla V100 SXM2 16 GB with 16 GB runs it at Q8_0, using about 11.8 GB and generating roughly 68.4 tokens per second — a comfortable fit.

16

Can I run Code Llama-7B on a 24 GB GPU?

Yes. A GeForce RTX 5090 D V2 with 24 GB runs it at Q8_0, using about 11.8 GB and generating roughly 81.1 tokens per second — a comfortable fit.

17

Is Code Llama-7B open source?

Its weights are published, so Code Llama-7B 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.

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.