Skip to content
Run LLM Locally

Gemma 2 27B IT on the Tesla P40

With 24 GB of VRAM, the Tesla P40 runs Gemma 2 27B IT at Q4_K_M entirely on the GPU with an 8K context (about 19.6 GB needed). At Q8_0 it does not fit in VRAM.

Gemma 2 27B IT

Q4_K_M · 8K context

Excellent

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

Your hardware
Tesla P40 24 GB · 64 GB RAM
Estimated memory
~19.6 GB estimate
VRAM (usable memory)
23.3 GB
GPU only
Yes
CPU/GPU offload
Not required
Generation speed
15–19 tok/s estimate
Largest context in fast memory
8K tokens
Confidence: low

Based on: memory bandwidth (346 GB/s) and model size

Memory breakdown

~19.6 GB (18.9 GB–20.4 GB) needed · estimate

Fits entirely in VRAM · 3.7 GB left

  • Model weights15.5 GB
  • KV cache2.2 GB
  • Runtime overhead1 GB
  • Safety margin0.9 GB
Assumptions: context 8K tokens · KV cache f16 · llama.cpp (CUDA) · flash attention on · weights = real file size · sliding-window layers keep 4,096 tokens

EstimateData updated 24 days agoSource: Run LLM Locally engine, Hugging Face config.json + model card

What makes this estimate less reliable

  • no benchmark for this hardware and model yet

Other quantizations on the Tesla P40

Gemma 2 27B IT on Tesla P40 + 64 GB RAM · 8K context
Gemma 2 27B IT Q8_08K~31.6 GB · 2–3.5 tok/s estimatePossible but slow
Gemma 2 27B IT Q6_K8K~25.2 GB · 5–9 tok/s estimateCPU/GPU offload
Gemma 2 27B IT Q5_K_M8K~22.3 GB · 13–17 tok/s estimateCompatible
Gemma 2 27B IT Q4_K_M8K~19.6 GB · 15–19 tok/s estimateExcellent
Gemma 2 27B IT IQ4_XS8K~17.8 GB · 16–21 tok/s estimateExcellent
Gemma 2 27B IT Q3_K_M8K~16.5 GB · 18–23 tok/s estimateExcellent

Alternatives

Hardware that runs Gemma 2 27B IT Q4_K_M entirely in memory

Prices and links follow the market you choose.

Radeon RX 7900 XTX

AMD

ExcellentRuns Gemma 2 27B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

AMD Ryzen AI Max+ 395

Unified memory PC

CompatibleRuns Gemma 2 27B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

GeForce RTX 2080 Ti

Lowest memory tier

CompatibleRuns Gemma 2 27B IT Q4_K_M 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 Tesla P40 run Gemma 2 27B IT?
The model needs about 19.6 GB and fits in the 23.3 GB available, with 3.7 GB to spare.
Which quantization should I use on the Tesla P40?
Q5_K_M is the highest-precision quantization that fits entirely in VRAM at 8K context. ~22.3 GB / 23.3 GB.
What is the largest context on the Tesla P40?
At Q4_K_M, about 8K tokens fit entirely in VRAM with an f16 KV cache. A q8_0 KV cache roughly doubles that.
How fast is Gemma 2 27B IT (Tesla P40)?
We estimate 15–19 tok/s (estimate, confidence low). Based on: memory bandwidth (346 GB/s) and model size.