CodeGen2 TPS calculator
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
Smallest card that fits
P102-101
10 GB · Q3_K_M · 19.5 tok/s
Fastest card
B200
212 tok/s · 180 GB
Which GPUs can run CodeGen2?
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 | |||||
|---|---|---|---|---|---|---|---|
|
212
tok/s
127–339 · low confidence |
B200 NVIDIA | 180 GB | 8,000 GB/s | Jan 2024 | 17.8 GB | Q8_0 | Comfortable |
|
212
tok/s
127–339 · low confidence |
B300 NVIDIA | 288 GB | 8,000 GB/s | Sep 2025 | 17.8 GB | Q8_0 | Comfortable |
|
169
tok/s
101–271 · low confidence |
Radeon Instinct MI350X AMD | 288 GB | 8,190 GB/s | Jan 2025 | 17.8 GB | Q8_0 | Comfortable |
|
169
tok/s
101–271 · low confidence |
Radeon Instinct MI355X AMD | 288 GB | 8,190 GB/s | Jan 2025 | 17.8 GB | Q8_0 | Comfortable |
|
135
tok/s
81–216 · low confidence |
Radeon Instinct MI300 AMD | 128 GB | 6,550 GB/s | Jan 2023 | 17.8 GB | Q8_0 | Comfortable |
|
129
tok/s
78–207 · low confidence |
H200 NVL NVIDIA | 141 GB | 4,890 GB/s | Nov 2024 | 17.8 GB | Q8_0 | Comfortable |
|
129
tok/s
78–207 · low confidence |
H200 SXM 141 GB NVIDIA | 141 GB | 4,890 GB/s | Nov 2024 | 17.8 GB | Q8_0 | Comfortable |
|
124
tok/s
74–198 · low confidence |
Radeon Instinct MI325X AMD | 256 GB | 6,000 GB/s | Oct 2024 | 17.8 GB | Q8_0 | Comfortable |
|
111
tok/s
67–178 · low confidence |
CMP 170HX 10 GB NVIDIA | 10 GB | 1,560 GB/s | Sep 2021 | 8.5 GB | Q3_K_M | Tight |
|
110
tok/s
66–176 · low confidence |
Radeon Instinct MI300A AMD | 128 GB | 5,325 GB/s | Dec 2023 | 17.8 GB | Q8_0 | Comfortable |
|
110
tok/s
66–176 · low confidence |
Radeon Instinct MI300X AMD | 192 GB | 5,325 GB/s | Dec 2023 | 17.8 GB | Q8_0 | Comfortable |
|
110
tok/s
66–176 · low confidence |
Radeon Instinct MI308X AMD | 192 GB | 5,325 GB/s | Dec 2023 | 17.8 GB | Q8_0 | Comfortable |
|
104
tok/s
63–167 · low confidence |
H100 NVL 94 GB NVIDIA | 94 GB | 3,940 GB/s | Mar 2023 | 17.8 GB | Q8_0 | Comfortable |
|
88.9
tok/s
53–142 · low confidence |
H100 PCIe 96 GB NVIDIA | 96 GB | 3,360 GB/s | Mar 2023 | 17.8 GB | Q8_0 | Comfortable |
|
88.9
tok/s
53–142 · low confidence |
H100 SXM5 80 GB NVIDIA | 80 GB | 3,360 GB/s | Oct 2022 | 17.8 GB | Q8_0 | Comfortable |
|
88.9
tok/s
53–142 · low confidence |
H100 SXM5 94 GB NVIDIA | 94 GB | 3,360 GB/s | Mar 2023 | 17.8 GB | Q8_0 | Comfortable |
|
88.9
tok/s
53–142 · low confidence |
H100 SXM5 96 GB NVIDIA | 96 GB | 3,360 GB/s | Mar 2023 | 17.8 GB | Q8_0 | Comfortable |
|
88.9
tok/s
53–142 · low confidence |
H800 SXM5 NVIDIA | 80 GB | 3,360 GB/s | Mar 2023 | 17.8 GB | Q8_0 | Comfortable |
|
67.7
tok/s
41–108 · low confidence |
Radeon Instinct MI250 AMD | 128 GB | 3,280 GB/s | Nov 2021 | 17.8 GB | Q8_0 | Comfortable |
|
67.7
tok/s
41–108 · low confidence |
Radeon Instinct MI250X AMD | 128 GB | 3,280 GB/s | Nov 2021 | 17.8 GB | Q8_0 | Comfortable |
|
56.4
tok/s
34–90 · low confidence |
Data Center GPU Max 1550 Intel | 128 GB | 3,280 GB/s | Jan 2023 | 17.8 GB | Q8_0 | Comfortable |
|
55.8
tok/s
33–89 · low confidence |
GeForce RTX 3080 12 GB NVIDIA | 12 GB | 912 GB/s | Jan 2022 | 10.4 GB | Q4_K_M | Tight |
|
55.8
tok/s
33–89 · low confidence |
GeForce RTX 3080 Ti NVIDIA | 12 GB | 912 GB/s | May 2021 | 10.4 GB | Q4_K_M | Tight |
|
55.2
tok/s
33–88 · low confidence |
Data Center GPU Max Subsystem Intel | 128 GB | 3,210 GB/s | Jan 2023 | 17.8 GB | Q8_0 | Comfortable |
|
54.3
tok/s
33–87 · low confidence |
CMP 90HX NVIDIA | 10 GB | 760 GB/s | Jul 2021 | 8.5 GB | Q3_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
- Salesforce
- Organisation type
- Industry
- Country
- United States of America
- Published
- 3 May 2023
- Authors
- Erik Nijkamp, Hiroaki Hayashi, Caiming Xiong, Silvio Savarese, Yingbo Zhou
What it does
The problem areas the model was built for. A model can carry several of each.
- Domain
- Language
- Task
- Code generation
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
- 16B
- Training data
- tokens
16B for largest CodeGen2 model
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 (unrestricted)
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
- 235
Sources
Where this record came from and when it was last checked.
- Reference
- CodeGen2: Lessons for Training LLMs on Programming and Natural Languages
- Last updated
- 25 May 2026
The extremes
The ten fastest GPUs for CodeGen2
Ranked by estimated tokens per second, newest card first where speeds tie. Because generation is bound by memory bandwidth, this ordering follows bandwidth rather than any gaming benchmark.
- 01 B300 288 GB · 8,000 GB/s · Q8_0 212 tok/s
- 02 B200 180 GB · 8,000 GB/s · Q8_0 212 tok/s
- 03 Radeon Instinct MI350X 288 GB · 8,190 GB/s · Q8_0 169 tok/s
- 04 Radeon Instinct MI355X 288 GB · 8,190 GB/s · Q8_0 169 tok/s
- 05 Radeon Instinct MI300 128 GB · 6,550 GB/s · Q8_0 135 tok/s
- 06 H200 NVL 141 GB · 4,890 GB/s · Q8_0 129 tok/s
- 07 H200 SXM 141 GB 141 GB · 4,890 GB/s · Q8_0 129 tok/s
- 08 Radeon Instinct MI325X 256 GB · 6,000 GB/s · Q8_0 124 tok/s
- 09 CMP 170HX 10 GB 10 GB · 1,560 GB/s · Q3_K_M 111 tok/s
- 10 Radeon Instinct MI300A 128 GB · 5,325 GB/s · Q8_0 110 tok/s
The smallest GPUs that still run CodeGen2
The cheapest route in, by memory capacity. A tight fit runs the model but leaves nothing spare for a longer conversation.
- 01 Arc B570 10 GB · needs 8.5 GB · Q3_K_M · tight 17.6 tok/s
- 02 Xbox Series X 6nm GPU 10 GB · needs 8.5 GB · Q3_K_M · tight 31.2 tok/s
- 03 Radeon RX 6750 GRE 10 GB 10 GB · needs 8.5 GB · Q3_K_M · tight 17.8 tok/s
- 04 CMP 170HX 10 GB 10 GB · needs 8.5 GB · Q3_K_M · tight 111 tok/s
- 05 CMP 90HX 10 GB · needs 8.5 GB · Q3_K_M · tight 54.3 tok/s
- 06 CMP 50HX 10 GB · needs 8.5 GB · Q3_K_M · tight 40.0 tok/s
- 07 Radeon RX 6700 10 GB · needs 8.5 GB · Q3_K_M · tight 17.8 tok/s
- 08 Radeon RX 6700M 10 GB · needs 8.5 GB · Q3_K_M · tight 17.8 tok/s
- 09 Xbox Series X GPU 10 GB · needs 8.5 GB · Q3_K_M · tight 31.2 tok/s
- 10 GeForce RTX 3080 10 GB · needs 8.5 GB · Q3_K_M · tight 54.3 tok/s
What the numbers mean
What you need to run it
Minimum card
P102-101
Memory needed
8.5 GB
Fastest
212 tok/s
CodeGen2 is small enough at 16B parameters that hardware is rarely the obstacle — 306 of the cards we track can run it, including cards several years old.
The least hardware that works is a P102-101. Its 10 GB is enough at Q3_K_M compression, giving roughly 19.5 tokens per second.
The quickest result comes from a B200 at around 212 tokens per second — its 8,000 GB/s of bandwidth is what buys that.
Where it came from
CodeGen2 was published by Salesforce, in United States of America, in May 2023. The organisation is categorised as industry.
It works in Language, and is recorded as doing code generation.
The weights are published, so it can be downloaded and run on your own hardware indefinitely, offline, with no account attached.
Understanding the speeds
The median result is around 19.8 tokens per second; 259 cards produce text faster than most people read it.
Every weight participates in every token here, so bandwidth is the whole story: the ranking below is effectively a ranking of memory throughput.
Memory here is estimated from size rather than computed from the architecture, which is not recorded for this model — the numbers are indicative rather than exact.
Step by step
How to choose a GPU for CodeGen2
The table above has already assessed every card we hold specifications for against this model. Getting to your answer takes six steps.
-
01
Read the memory figure first
Every card here has been checked against CodeGen2 — around 8.5 GB at Q3_K_M. Capacity is the gate — a card either holds it or it does not.
-
02
Set the context length you will work at
Set the context to what you will actually use. The cache grows with the conversation, and it is the usual reason CodeGen2 stops fitting a card that seemed fine.
-
03
Decide how much compression you will accept
The quantisation column varies by card, because a bigger card holds a more accurate copy of CodeGen2 — Q3_K_M on the smallest card that fits. Set a floor to hold the comparison at one level.
-
04
Sort by speed
Sort by speed to see how cards rank for CodeGen2. It will not match a gaming ordering — generation is bound by memory bandwidth, which is why the B200 tops it at 212 tok/s.
-
05
Check the fit verdict before buying
Tight means CodeGen2 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.
-
06
Check the card from the other side
Following a card through to its own page shows every other model it can hold, which is the question that follows once CodeGen2 is settled.
Answers
CodeGen2 — common questions
Can I run CodeGen2 on a 16 GB GPU?
Yes. A Tesla V100 SXM2 16 GB with 16 GB runs it at Q6_K, using about 14.1 GB and generating roughly 43.5 tokens per second — a tight fit.
Can I run CodeGen2 on a 24 GB GPU?
Yes. A GeForce RTX 5090 D V2 with 24 GB runs it at Q8_0, using about 17.8 GB and generating roughly 35.5 tokens per second — a comfortable fit.
Is CodeGen2 open source?
Its weights are published, so CodeGen2 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.
How many parameters does CodeGen2 have?
CodeGen2 has 16B parameters. 16B for largest CodeGen2 model. 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.
Who created CodeGen2?
CodeGen2 was published by Salesforce, based in United States of America, categorised as industry.
When was CodeGen2 released?
CodeGen2 was published in May 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.
What is CodeGen2 used for?
CodeGen2 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.
Where can I download CodeGen2?
The weights for CodeGen2 are published, though we do not hold a repository link for it. This site calculates hardware requirements rather than hosting model files.
Can I run CodeGen2 if it does not fit in my GPU?
It can be split between the card and system memory, but CodeGen2 generates painfully slowly that way — the nearest miss we calculate is short by 3.2 GB. Nothing on this page assumes offloading.
Would two GPUs run CodeGen2 faster?
Capacity adds across cards; throughput does not. Since 306 of the cards we track already hold CodeGen2 on their own, a second card is rarely the answer here.
Why does the quantisation differ between cards for CodeGen2?
Because capacity varies, so does how hard CodeGen2 has to be squeezed — 5 distinct levels appear in the table above. Set a minimum quality to compare at one.
How accurate are these CodeGen2 speed estimates?
These are estimates with real error bars. The fastest result here, 127–339 tok/s on the B200, could reasonably land anywhere in its published range depending on which runtime you use.
What GPU do I need to run CodeGen2?
The smallest card in our catalogue that holds CodeGen2 is the P102-101, with 10 GB of memory. It runs the model at Q3_K_M using about 8.5 GB, and produces roughly 19.5 tokens per second. 306 cards in total can run it.
How fast is CodeGen2 on a GPU?
It depends on the card. The quickest we calculate is a B200 at about 212 tokens per second; the slowest that still runs it manages considerably less. Reading speed is around ten tokens per second, and 259 of the cards that can run CodeGen2 clear that.
How much VRAM does CodeGen2 need?
About 8.5 GB at Q3_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.
Can I run CodeGen2 on a 12 GB GPU?
Yes. A GeForce RTX 3080 Ti with 12 GB runs it at Q4_K_M, using about 10.4 GB and generating roughly 55.8 tokens per second — a tight fit.
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.