Skip to content
Run LLM Locally

Llama 2 7B on the RX 7900 XTX

With 24 GB of VRAM, the RX 7900 XTX runs Llama 2 7B at Q4_0 entirely on the GPU with an 8K context (about 6.6 GB needed). At Q8_0 it fits entirely.

Llama 2 7B

Q4_0 · 4K context

Excellent

The requested context (8,192 tokens) is longer than the model supports; 4,096 tokens were used.

The model needs about 6.6 GB and fits in the 23.3 GB available, with 16.7 GB to spare.

Your hardware
RX 7900 XTX 24 GB · 64 GB RAM
Estimated memory
~6.6 GB estimate
VRAM (usable memory)
23.3 GB
GPU only
Yes
CPU/GPU offload
Not required
Generation speed
90–133 tok/s estimate
Largest context in fast memory
4K tokens
Confidence: medium

Based on: same hardware · same model · same quantization · 18 benchmark(s) · adjusted for context length

Memory breakdown

~6.6 GB (6.1 GB–7.1 GB) needed · estimate

Fits entirely in VRAM · 16.7 GB left

  • Model weights3.6 GB
  • KV cache2 GB
  • Runtime overhead0.6 GB
  • Safety margin0.3 GB
Assumptions: context 4K tokens · KV cache f16 · llama.cpp (ROCm) · flash attention on · weights estimated at 4.64 bits per weight × 6.74B parameters (real file size not imported yet)

EstimateData updated 24 days agoSource: Run LLM Locally engine, GGUF header of TheBloke/Llama-2-7B-GGUF (llama-2-7b.Q4_0.gguf) + Hugging Face API (parameter count)

Other quantizations on the RX 7900 XTX

Llama 2 7B on RX 7900 XTX + 64 GB RAM · 8K context
Llama 2 7B Q8_04K~9.8 GB · 45–87 tok/s estimateExcellent

Alternatives

Where to buy a RX 7900 XTX

Prices and links follow the market you choose.

Radeon RX 7900 XTX

24 GB GDDR6 · 960 GB/s · 355 W

ExcellentRuns Llama 2 7B Q4_0 entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

No current offer imported for this market: the link opens a marketplace search.

Frequently asked questions

Can the RX 7900 XTX run Llama 2 7B?
The requested context (8,192 tokens) is longer than the model supports; 4,096 tokens were used. The model needs about 6.6 GB and fits in the 23.3 GB available, with 16.7 GB to spare.
Which quantization should I use on the RX 7900 XTX?
Q8_0 is the highest-precision quantization that fits entirely in VRAM at 8K context. ~9.8 GB / 23.3 GB.
What is the largest context on the RX 7900 XTX?
At Q4_0, about 4K tokens fit entirely in VRAM with an f16 KV cache. A q8_0 KV cache roughly doubles that.
How fast is Llama 2 7B (RX 7900 XTX)?
We estimate 90–133 tok/s (estimate, confidence medium). Based on: same hardware, same model, same quantization, 18 benchmark(s), adjusted for context length.