RTX 3050 - Order Now
Home / Blog / Model Guides / RTX 4090 24 GB for Codestral 22B: Fits, Just Barely, and Here’s How
Model Guides

RTX 4090 24 GB for Codestral 22B: Fits, Just Barely, and Here’s How

Mistral Codestral 22B at AWQ-INT4 fits on a 24 GB RTX 4090 with very tight KV cache headroom. The deployment recipe and a clear-eyed look at when you should upgrade.

Codestral 22B is Mistral’s coding-specialised model — strong on Python, MIT licensed, 32K context. At 22B dense parameters it’s borderline for a 24 GB GPU. Here’s the practical deployment.

TL;DR

Codestral 22B fits a 4090 24 GB only at AWQ-INT4 (~12 GB weights), and even then KV cache budget is tight. ~310 tok/s aggregate. Workable but not comfortable. For real production, the 5090 32 GB is the right home.

VRAM fit

PrecisionWeights+ KV (8K, 8 streams)TotalFits 24 GB?
FP1644 GBn/an/aNo
FP8 (no native on Ada)22 GB+4 GB26 GBNo (no FP8 hw)
AWQ-INT412 GB+4 GB16 GBYes
GGUF Q5_K_M15 GB+4 GB19 GBYes
AWQ-INT4 + 16 concurrent streams12 GB+8 GB20 GBTight, watch OOM

vLLM config

vllm serve mistralai/Codestral-22B-v0.1 \
  --quantization awq_marlin \
  --max-model-len 16384 \
  --max-num-seqs 8 \
  --gpu-memory-utilization 0.93 \
  --kv-cache-dtype fp8_e4m3 \
  --enable-prefix-caching \
  --served-model-name codestral \
  --host 0.0.0.0 --port 8000

Note --max-num-seqs 8 — keep concurrency conservative; 22B at INT4 with KV cache OOMs more easily than smaller models.

Performance

MetricRTX 4090 (Codestral 22B AWQ)RTX 5090 (FP8)
Aggregate tok/s @ 8 concurrent~310~620
Single-stream tok/s~22~52
p99 TTFT~890 ms~410 ms
Cost per 1M (60% util)£0.40£0.20

Upgrade signals

  • p99 TTFT regularly exceeds 1.5 s — the 4090 is queueing
  • You want to run more than ~10 concurrent users
  • You want FP8 weights (not available on Ada)
  • You want 32K+ context with comfortable concurrency

Bottom line

The 4090 24 GB hosts Codestral 22B at INT4, but not comfortably. For production at any meaningful scale, the 5090 is the better choice. For broader sizing see cost to run an AI coding assistant.

Need a Dedicated GPU Server?

Deploy from RTX 3050 to RTX 5090. Full root access, NVMe storage, 1Gbps — UK datacenter.

Browse GPU Servers

gigagpu

We benchmark, deploy, and optimise GPU infrastructure for AI workloads. All data in our guides comes from real-world testing on our UK-based dedicated GPU servers.

Ready to deploy your AI workload?

Dedicated GPU servers from our UK datacenter. NVMe storage, 1Gbps networking, full root access.

Browse GPU Servers Contact Sales

Have a question? Need help?