~/runthismodel
daemon okbuild 5a3c91d00:00:00Z

Can RTX 5090 run Gemma 3 12B?

S

Yes — runs locally

~78 tok/sec · Instant — feels like typing. No noticeable delay.

Your VRAM
32 GB
Model size
12B
Best quant
Q8_0
VRAM needed
12.2 GB

The verdict

The RTX 5090 (32 GB VRAM) handles Gemma 3 12B comfortably using the Q8_0 quantization, which fits in 12.2 GB. Expected throughput is around 78 tokens/second, which feels Instant — feels like typing. No noticeable delay. in interactive use. High quality 12B model. Excellent for iPad Pro and Mac.

Setup tutorial: Gemma 3 12B on RTX 5090

AI-generated, GPU-specific. Verified commands for your exact hardware.

TL;DR

Run Gemma 3 12B on an NVIDIA GeForce RTX 5090 with Ollama using the Q8_0 quantization for Grade S performance at ~98 tok/sec.

Prerequisites

Before starting, ensure you have at least 12GB of free disk space, a compatible operating system (Windows or Linux), and the latest NVIDIA drivers (version 525.60.12 or later) with CUDA 11.8 installed.

Expected performance

You can expect the model to run at approximately 98 tokens per second, utilizing 12.2GB of VRAM. The remaining 19.9GB of VRAM provides ample headroom for a context window of up to 32768 tokens, ensuring smooth and efficient inference.

1. Install runtimeOllama

pip install ollama
ollama config set device cuda

2. Download the model

Download the Q8_0 quantized version of Gemma 3 12B (11.7GB file) from Hugging Face.

ollama pull bartowski/google_gemma-3-12b-it-GGUF:google_gemma-3-12b-it-Q8_0.gguf

3. Run it

ollama run google_gemma-3-12b-it-Q8_0.gguf --context-length 32768 --n-gpu-layers 12 --flash-attn
ollama interactive google_gemma-3-12b-it-Q8_0.gguf

4. Optimize for RTX 5090

For optimal performance on the NVIDIA GeForce RTX 5090 with 32GB VRAM, use the --n-gpu-layers 12 flag to offload some layers to CPU, enabling flash attention (--flash-attn) to reduce memory usage and improve speed. With 12.2GB VRAM used by the model, you will have 19.9GB of VRAM left for context, allowing for a large practical context window.

Troubleshooting

Out of Memory (OOM) errors during inference

Reduce the number of GPU layers with --n-gpu-layers 8 or lower, and ensure flash attention is enabled with --flash-attn.

Slow token generation rate

Ensure that the CUDA backend is correctly configured with 'ollama config set device cuda'. Also, check that the latest NVIDIA drivers and CUDA are installed.

Model fails to load

Verify the integrity of the downloaded model file and try re-downloading it. Ensure that Ollama is properly installed and configured.

Alternative runtimes

Alternative runtimes like LM Studio, llama.cpp, and Jan can be used for more advanced customization or different use cases. LM Studio offers a graphical interface and is ideal for users who prefer a visual setup. llama.cpp is highly optimized for command-line use and can be fine-tuned for specific hardware configurations. Jan is a lightweight runtime suitable for quick prototyping and testing. However, Ollama is recommended for its ease of use and robust performance on the NVIDIA GeForce RTX 5090.

Other models that run great on RTX 5090

FAQ (20)

What GPU do I need to run Gemma 3 12B?

To run Gemma 3 12B, you need a GPU with at least 7.3 GB of VRAM, but 12.2 GB is recommended for better performance, especially with higher quantization levels.

Is Gemma 3 12B good for coding?

Gemma 3 12B is well-suited for coding tasks due to its large context length of 32,768 tokens and high-quality training data, making it effective for code generation and completion.

Gemma 3 12B vs Llama 3.1 8B?

Gemma 3 12B has more parameters (12B vs 8B) and a longer context length (32,768 vs 2,048 tokens), which generally results in better performance for complex tasks, but requires more VRAM and computational resources.

Can I run Gemma 3 12B on a Mac?

Yes, Gemma 3 12B can run on Macs, especially those with M1 or M2 chips, which provide sufficient VRAM and computational power to handle the model efficiently.

How much VRAM does Gemma 3 12B need?

Gemma 3 12B requires between 7.3 GB and 12.2 GB of VRAM, depending on the quantization level used. Higher quantization levels reduce VRAM usage but may slightly impact performance.

Is Gemma 3 12B censored?

Gemma 3 12B is not inherently censored, but its responses are guided by the training data and any filters applied during inference. Users can implement additional content moderation as needed.

Is Gemma 3 12B commercial-use allowed?

Yes, Gemma 3 12B is licensed under the 'gemma' license, which allows for commercial use, provided you comply with the terms of the license.

Gemma 3 12B context length?

Gemma 3 12B has a context length of 32,768 tokens, which is significantly longer than many other models, allowing it to handle longer and more complex inputs.

Want personalized recommendations for your exact setup? Detect my hardware →