Run open models

Gemma 3 GPU requirements: 1B to 27B

Gemma 3 GPU requirements scale with size. Gemma 3 27B needs about 55 GB for BF16 weights, 27 GB in FP8 and about 17 GB as Google’s 4-bit QAT build, so it runs on one 80 GB H100 in BF16, one 48 GB L40S in FP8 or one 24 GB RTX 4090 at 4 bits. The 12B fits a 32 GB RTX 5090 in BF16 for light use; 4B and 1B run on almost any GPU.

NEURAMESH / COMPUTE FIELD NOTES00 / 10

Gemma 3 sizes and architecture

Gemma 3 is Google’s open-weight model family in 270M, 1B, 4B, 12B and 27B sizes. The model card gives the 4B, 12B and 27B a 128K-token input context and image input; the 1B and 270M are text-only with 32K. Output is capped at 8,192 tokens per request. Use is governed by the Gemma Terms of Use, and the Hugging Face repositories are gated behind accepting them.

The configs share one idea that matters for memory: five local sliding-window layers for every global layer. Local layers attend only to the last 1,024 tokens (512 on the 1B), so only about one layer in six stores keys and values for the full context. The 27B has 62 layers, 16 key-value heads and a head dimension of 128; the 12B and 4B use a head dimension of 256 with 8 and 4 KV heads.

Gemma 3 sizes and architecture
SizeParametersLayers (global)KV heads × head dimContextInput
Gemma 3 27B27.43B62 (10)16 × 128128KText, image
Gemma 3 12B12.19B48 (8)8 × 256128KText, image
Gemma 3 4B4.30B34 (5)4 × 256128KText, image
Gemma 3 1B1.00B26 (4)1 × 25632KText

References: Gemma 3 27B IT model card · Google: Gemma 3 model overview · Gemma 3 27B IT config.json · Gemma 3 12B IT config.json · Gemma 3 4B IT config.json

Why the sliding window changes the KV cache

For the 27B, each layer stores 2 × 16 KV heads × 128 × 2 bytes = 8,192 bytes per token in BF16. If all 62 layers kept the whole context, that would be about 0.51 MB per token, more than Llama 3.3 70B needs. With only the 10 global layers holding full context, it drops to 81,920 bytes per token, plus about 0.44 GB per sequence for the local layers’ 1,024-token windows.

The saving only appears if your engine implements it. vLLM’s hybrid KV cache manager lists Gemma 3 as a sliding-window model and frees blocks that fall outside the window. If a runtime stores every layer in full, use the "upper bound" column below.

References: Gemma 3 27B IT config.json · vLLM design: Hybrid KV cache manager

VRAM table by size and precision

The scenario is 16 concurrent requests at 8,192 tokens each, so 131,072 cached tokens. Weights are 2 bytes per parameter in BF16, 1 in FP8 and about 0.5 at 4 bits. Google’s quantization-aware-trained (QAT) Q4_0 build of the 27B is a 17.2 GB GGUF file, and the card says QAT keeps quality similar to BF16 at much lower memory. Ollama lists its 27B q4_K_M build at 17 GB and the BF16 at 55 GB.

Totals pair BF16 weights with a BF16 cache, and FP8 or 4-bit weights with an FP8 cache. Add 5 to 10% overhead, or use the VRAM calculator with your own numbers.

VRAM table by size and precision
SizeWeights BF16 / FP8 / 4-bitKV cache BF16 (sliding-aware / upper bound)Total BF16Total FP8Total 4-bit
27B54.9 / 27.4 / 13.7 to 17.2 GB17.7 / 66.6 GB≈73 GB≈36 GB≈23 to 26 GB
12B24.4 / 12.2 / 6.1 to 8.2 GB14.0 / 51.5 GB≈38 GB≈19 GB≈13 to 15 GB
4B8.6 / 4.3 / 2.2 to 3.4 GB4.6 / 18.3 GB≈13 GB≈7 GB≈5 to 6 GB
1B2.0 / 1.0 / 0.5 to 0.8 GB0.7 / 3.5 GB≈3 GB≈1.4 GB≈1 GB

References: Gemma 3 27B IT QAT Q4_0 GGUF model card · Ollama library: gemma3 tags · vLLM design: Hybrid KV cache manager · vLLM quantized KV cache

Which GPUs fit each Gemma 3 size

Every Gemma 3 size fits on one GPU, so tensor parallelism is optional. Pick the smallest card that holds weights plus the cache your traffic needs. FP8 compute needs compute capability 8.9 or newer (RTX 4090, RTX 5090, L40S, Hopper, Blackwell); on A100, vLLM runs FP8 weights as weight-only W8A16.

For the 27B, an 80 GB H100 or A100 holds BF16 at the 16-user scenario with little spare; an H200 or RTX PRO 6000 adds headroom. Larger GPUs are better used for several replicas than for one copy.

Which GPUs fit each Gemma 3 size
GPUMemoryGemma 3 27BGemma 3 12BGemma 3 4B and 1B
RTX 409024 GB4-bit QAT, few usersFP8BF16
RTX 509032 GB4-bit with more cacheBF16, few usersBF16
L40S48 GBFP8BF16BF16, many users
RTX PRO 600096 GBBF16 with headroomBF16, many usersReplicas
A100 / H100 80 GB80 GBBF16 at the 16-user scenarioBF16, many usersReplicas
H200 141 GB141 GBBF16, long contextReplicasReplicas

References: NVIDIA H100 specifications · NVIDIA A100 specifications · NVIDIA H200 specifications · NVIDIA RTX PRO 6000 Blackwell specifications · NVIDIA L40S specifications · NVIDIA GeForce RTX 4090 specifications · NVIDIA GeForce RTX 5090 specifications · vLLM FP8 W8A8 quantization

Serve commands: vLLM, SGLang, Ollama and llama.cpp

vLLM supports Gemma 3 under Gemma3ForConditionalGeneration (4B and up) and Gemma3ForCausalLM (1B). Accept the Gemma terms on Hugging Face, export HF_TOKEN, then run vllm serve google/gemma-3-27b-it --max-model-len 32768. For FP8, serve a pre-quantized checkpoint such as RedHatAI/gemma-3-27b-it-FP8-dynamic, or add --quantization fp8_per_tensor to quantize at load. Deploy vLLM on a cloud GPU covers the rest of the setup.

SGLang lists Gemma 3 among supported models: python -m sglang.launch_server --model-path google/gemma-3-27b-it. Ollama runs ollama run gemma3:27b (17 GB) or gemma3:27b-it-qat (18 GB), and gemma3:12b, gemma3:4b and gemma3:1b for smaller sizes. Google’s QAT card shows llama.cpp with llama-cli -hf google/gemma-3-27b-it-qat-q4_0-gguf.

References: vLLM supported models · vLLM documentation: vllm serve CLI arguments · vLLM FP8 W8A8 quantization · SGLang supported generative models · Ollama library: gemma3 tags · Gemma 3 27B IT QAT Q4_0 GGUF model card

Illustrative cost per hour and per million tokens

These numbers are illustrative, not quotes or measurements. They assume $0.50 per hour for an RTX 4090, $1.00 for an L40S and $2.50 for an H100; see GPU prices for current rates. Cost per million tokens is hourly cost divided by tokens per hour, times one million.

This guide does not quote Gemma 3 throughput. Measure tokens per second with vllm bench serve at your prompt and output lengths, and include image prompts if you use them, since each image adds input tokens.

Illustrative cost per hour and per million tokens
Setup (assumed rate)Cost per hourPer 1M tokens at 1,000 tok/sAt 3,000 tok/s
27B 4-bit QAT on RTX 4090 ($0.50/hour)$0.50$0.14$0.05
27B FP8 on L40S ($1.00/hour)$1.00$0.28$0.09
27B BF16 on H100 ($2.50/hour)$2.50$0.69$0.23

References: vLLM serving benchmark options · Gemma 3 27B IT model card

Fine-tuning memory, and a note on Gemma 4

Full fine-tuning with AdamW in mixed precision needs about 18 bytes per parameter before activations, per Hugging Face’s memory guide: about 494 GB for the 27B, which means sharding across an 8× H100 node, and about 219 GB for the 12B. LoRA keeps the BF16 base frozen, so the 27B needs about 55 GB plus activations (one 80 GB GPU) and the 12B about 24 GB (one L40S). QLoRA on a 4-bit base brings the 27B within reach of a 24 to 32 GB card at short sequence lengths.

Google has since released Gemma 4 in E2B, E4B, 12B, 26B A4B and 31B sizes. Its own table puts the 31B at 69.9 GB to load in BF16 and the 26B A4B at 57.7 GB, so the sizing method here carries over.

References: Hugging Face Transformers: GPU memory usage in training · Hugging Face PEFT: LoRA · Google: Gemma 4 model overview

Gemma 3 GPU requirements checklist

Pick the size, then precision: BF16 on 80 GB cards, FP8 on 48 GB, QAT 4-bit on 24 to 32 GB. Use an engine that honors the sliding window, or plan for the upper-bound cache. Set --max-model-len to your real need and benchmark with your prompt mix.

NeuraMesh rents RTX 4090, L40S and H100 GPUs by the hour. Choose a GPU, plan, count, hours and region on rent GPUs or start at L40S rental; you get a confirmed quotation, typically within one business day, and pay only when you approve.

NeuraMesh prices for these GPUs

NeuraMesh prices per GPU-hour in USD, excluding taxes, as of 2026-11-27. Live prices are on the rental pages.
GPUMemoryData centerValue
RTX 409024 GB$0.46$0.40
L40S48 GB$1.26$0.54
A10080 GB$1.56$0.98
H10080 GB$2.88$2.00

Every order is confirmed in a quotation before you pay. See all GPU prices.

Questions readers ask

Can Gemma 3 27B run on an RTX 4090?

Yes, as Google’s 4-bit QAT build, a 17.2 GB file that leaves a few GB for cache on a 24 GB card. BF16 needs about 55 GB for weights alone, so it needs an 80 GB GPU.

How much VRAM does Gemma 3 12B need?

About 24 GB for BF16 weights, 12 GB in FP8 and 6 to 8 GB at 4 bits, plus KV cache. A 32 GB RTX 5090 runs BF16 for a few users; a 48 GB L40S serves many more.

What are the Gemma 3 GPU requirements for 128K context?

For the 27B with a sliding-window-aware engine, one 128K request adds about 11 GB of BF16 cache. If every layer stored full context it would be about 67 GB, so engine support matters.

Is Gemma 3 free for commercial use?

Gemma 3 is released under Google’s Gemma Terms of Use, which govern commercial and other use. Read the terms and the prohibited use policy before deploying.

Do I need a Hugging Face token to download Gemma 3?

Yes for the official google/gemma-3 repositories, which are gated: accept the Gemma terms on the model page, then set HF_TOKEN before starting vLLM or SGLang. Ollama’s gemma3 tags download without a Hugging Face account.

Which Gemma 3 size should I start with?

Start with the 12B on a single 32 to 48 GB GPU if you need images and long context at low cost, and move to the 27B when quality on your own evaluation set justifies an 80 GB GPU or a 4-bit QAT build. The 4B and 1B suit edge devices and high-volume simple tasks.

Sources and editorial notes

Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.

Read the editorial policy.

Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.