RTX 3050 - Order Now
Home / Blog / Model Guides / LLM Inference on RTX 5070: vLLM, LlamaCPP, and Blackwell CUDA Guide
Model Guides

LLM Inference on RTX 5070: vLLM, LlamaCPP, and Blackwell CUDA Guide

The RTX 5070 runs production LLM inference via vLLM, llama.cpp CUDA, and TensorRT-LLM on 12 GB GDDR7. Full setup guide, model table, and throughput benchmarks.

TL;DR

Full CUDA LLM stack on the RTX 5070: vLLM with PagedAttention, llama.cpp CUDA, TensorRT-LLM, FlashAttention 3, bitsandbytes INT4/INT8. 12 GB GDDR7 at 672 GB/s delivers ~75 tok/s on Llama 3.1 8B Q4. Main limit: 12 GB max — 7B FP16 and above doesn’t fit. FP8 (Blackwell-native) is the recommended production precision: halves VRAM vs FP16, retains 99% quality.

The CUDA Inference Stack

The RTX 5070 runs every major LLM inference framework without modification:

FrameworkRTX 5070 supportNotes
llama.cpp (CUDA)FullBuild with -DGGML_CUDA=ON
OllamaFull, automaticNo config needed
vLLMFull — CUDA + FlashAttention 3PagedAttention, continuous batching
TensorRT-LLMFull — Blackwell optimisedFP8/FP4 Tensor Core paths
HuggingFace transformersFullStandard .to("cuda")
bitsandbytesFull — INT4/INT8 GPUQLoRA fine-tuning also works
FlashAttention 3Full — Blackwell nativeSignificant speedup vs FA2
UnslothFullFast fine-tuning framework
SGLangFullStructured generation runtime

Model VRAM Table

ModelFP16 VRAMFP8 VRAMQ4_K_M VRAMFits 12 GB?
Llama 3.1 8B16 GB ✗8 GB ✓5.2 GB ✓FP8 or Q4
Mistral 7B14 GB ✗7 GB ✓4.4 GB ✓FP8 or Q4
Gemma 2 9B18 GB ✗9 GB ✓5.8 GB ✓FP8 or Q4
Qwen 2.5 7B14 GB ✗7 GB ✓4.4 GB ✓FP8 or Q4
Qwen 2.5 14B28 GB ✗14 GB ✗8.7 GB ✓Q4 only
Llama 3 13B26 GB ✗13 GB ✗7.9 GB ✓Q4 only
DeepSeek-R1 7B14 GB ✗7 GB ✓4.4 GB ✓FP8 or Q4
Llama 3.1 70B140 GB ✗70 GB ✗41 GB ✗No

FP8 is the recommended production precision on Blackwell. It halves VRAM vs FP16, enabling models that technically wouldn’t fit at FP16 to fit at FP8, and Blackwell’s 5th Gen Tensor Cores run FP8 natively with no performance penalty versus INT8.

LlamaCPP CUDA Setup

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build && cd build
cmake .. -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

# Run Llama 3.1 8B Q4_K_M (all 32 layers on GPU)
./bin/llama-cli \
  -m /models/llama-3.1-8b-instruct-q4_k_m.gguf \
  -ngl 32 \
  -c 8192 \
  --temp 0.7 \
  -p "You are a helpful assistant." \
  --interactive

# HTTP server (OpenAI-compatible)
./bin/llama-server \
  -m /models/llama-3.1-8b-instruct-q4_k_m.gguf \
  -ngl 32 \
  -c 8192 \
  --host 0.0.0.0 --port 8080

Set -ngl to the total number of transformer layers in your model (32 for 7–8B models, 40 for 13B). All layers go to GPU — CPU offload is only needed if the model exceeds 12 GB, which at Q4_K_M means models larger than ~20B.

vLLM Setup

vLLM’s PagedAttention and continuous batching are well-supported on Blackwell. Install and run:

pip install vllm

# Serve Llama 3.1 8B at FP8 (Blackwell-optimised)
vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct \
  --dtype fp8 \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.90 \
  --host 0.0.0.0 --port 8000

# Or serve at Q4 via GGUF
vllm serve /models/llama-3.1-8b-instruct-q4_k_m.gguf \
  --tokenizer meta-llama/Meta-Llama-3.1-8B-Instruct \
  --max-model-len 4096 \
  --host 0.0.0.0 --port 8000

For Qwen 2.5 14B at Q4 (8.7 GB weights), use --gpu-memory-utilization 0.85 to leave headroom for KV cache:

vllm serve Qwen/Qwen2.5-14B-Instruct \
  --quantization gptq \
  --max-model-len 4096 \
  --gpu-memory-utilization 0.85 \
  --host 0.0.0.0 --port 8000

OpenAI-Compatible Serving

Both llama.cpp server and vLLM expose OpenAI-compatible endpoints. To call from a client:

from openai import OpenAI

# Point at your local server (llama.cpp or vLLM)
client = OpenAI(base_url="http://localhost:8080/v1", api_key="unused")

response = client.chat.completions.create(
    model="llama-3.1-8b-instruct",
    messages=[{"role": "user", "content": "What is Blackwell FP8?"}],
    temperature=0.7,
    max_tokens=512
)
print(response.choices[0].message.content)

FP8 Inference on Blackwell

Blackwell’s 5th Gen Tensor Cores natively compute FP8 matrix operations. For LLM inference this means:

  • Llama 3.1 8B FP8: ~8 GB VRAM (vs 16 GB at FP16) — fits on 12 GB with 4 GB for KV cache at 8K context
  • Mistral 7B FP8: ~7 GB — comfortable
  • Gemma 2 9B FP8: ~9 GB — fits with ~3 GB KV budget
  • Quality loss vs FP16: typically <1% on standard benchmarks

FP8 is superior to INT8 for inference quality on Blackwell because it maintains a floating-point exponent — key for the wide dynamic range in transformer attention layers. Use --dtype fp8 in vLLM or the AutoFP8 quantisation library for on-the-fly FP8 quantisation.

Throughput Estimates

ModelFrameworkPrecisionEst. tok/s (decode)
Llama 3.1 8Bllama.cppQ4_K_M~75–85
Llama 3.1 8BvLLMFP8~80–95
Mistral 7Bllama.cppQ4_K_M~80–90
Qwen 2.5 14Bllama.cppQ4_K_M~45–55
Llama 3 13Bllama.cppQ4_K_M~50–60
Gemma 2 9BvLLMFP8~65–75

RTX 5070 vs RTX 3090 for LLM

FactorRTX 5070 (£139/mo)RTX 3090 (£159/mo)
VRAM12 GB24 GB
Bandwidth~672 GB/s936 GB/s
Llama 8B Q4 tok/s~80~65–70
7B at FP16No (12 GB)Yes (24 GB)
FP8 inferenceNative BlackwellLimited (Ampere)
vLLM FlashAttention 3YesNo (FA2 only)
Max model at Q4~13B~27B
Price£139/mo£159/mo

Interestingly, the RTX 5070 is faster per token than the RTX 3090 on smaller models at Q4 — Blackwell’s architecture and CUDA improvements outpace Ampere despite the lower raw bandwidth. But the 3090’s 24 GB VRAM wins decisively for 13B+ models at Q4 and any FP16 inference. See the full RTX 5070 vs RTX 3090 comparison.

Deploy LLM inference on RTX 5070

12 GB GDDR7 · vLLM + llama.cpp CUDA · FP8 Blackwell-native · £139/mo · Order the RTX 5070 or compare all GPUs.

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?