selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

google logo

Can the RTX 5090 run gemma-4-31B-it?

gemma-4-31B-it·31.3B·GeForce RTX 5090·32 GB VRAM

Saved in this browser, used on every model page.
Yes

Yes. The RTX 5090 runs gemma-4-31B-it fully in VRAM at Q5_K_M (about 29 GB of 32 GB), at roughly 44 tokens/s.

best quant
Q5_K_M
needs
29 GB
usable
32 GB
est. speed
~44 tok/s

Estimates for an 8K context; offload assumes 32 GB of system RAM.Try other contexts on the gemma-4-31B-it page →

Every quantisation of gemma-4-31B-it on the RTX 5090

QuantQualityMemoryFitSpeed
Q2_K Heavy loss18 GBfits~96 tok/s
Q3_K_M Noticeable loss22 GBfits~64 tok/s
Q4_K_M Small loss26 GBfits~52 tok/s
Q5_K_M pickNear-lossless29 GBfits~44 tok/s
Q6_K Near-lossless33 GBoffload~24 tok/s
Q8_0 Lossless40 GBoffload~4.4 tok/s
FP16 / BF16 Lossless68 GBtoo big—

Speed is a bandwidth-based estimate for generating text (1792 GB/s); prompt processing and long contexts are slower.

Measured speed on the RTX 5090

No community reports for this pair yet.

Report your own speed →

Run gemma-4-31B-it on the RTX 5090

Using Q5_K_M, the best fit for RTX 5090.

Ollama · From the Ollama librarydocs
ollama run gemma4:31b

The library build picks its own default quantisation.

Ollama · Q5_K_M straight from Hugging Facedocs
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q5_K_M
llama.cpp · OpenAI-compatible server with a web UIdocs
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q5_K_M

Downloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.

LM Studio · Download with the lms CLIdocs
lms get unsloth/gemma-4-31B-it-GGUF@Q5_K_M

Then load it from the LM Studio app or with `lms load`.

vLLM · Serve an OpenAI-compatible APIdocs
vllm serve google/gemma-4-31B-it
vLLM · Smaller AWQ builddocs
vllm serve cyankiwi/gemma-4-31B-it-AWQ-4bit
vLLM · Docker Compose (NVIDIA)docs
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: google/gemma-4-31B-it
    ports:
      - "8000:8000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 8000.

SGLang · Serve an OpenAI-compatible APIdocs
sglang serve google/gemma-4-31B-it --host 0.0.0.0 --port 30000
SGLang · Docker Compose (NVIDIA)docs
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve google/gemma-4-31B-it --host 0.0.0.0 --port 30000
    ports:
      - "30000:30000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 30000.

Transformers · Ask about an imagedocs
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="google/gemma-4-31B-it", dtype="auto", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
            {"type": "text", "text": "Describe this image."},
        ],
    }
]
out = pipe(text=messages, max_new_tokens=256)
print(out[0]["generated_text"][-1]["content"])

Vision models that fit the RTX 5090 comfortably

All that fit →
ModelParamsBest quantMemorySpeedLicence
27.8BQ6_K≈25 GBFits in memory~43 tok/sCommercial OK
36BA3BQ6_K≈30 GBFits in memory~399 tok/sCommercial OK
27.8BQ6_K≈25 GBFits in memory~43 tok/sCommercial OK
25.8BA4BQ8_0≈29 GBFits in memory~232 tok/sCommercial OK
meta-models logoMuse-Glimmer-30Bmeta-models
29.8BQ8_0≈30 GBFits in memory~31 tok/sCommercial OK
36BA3BQ6_K≈29 GBFits in memory~399 tok/sCommercial OK

Other GPUs that run gemma-4-31B-it

Frequently asked questions

Can the RTX 5090 run gemma-4-31B-it?
Yes. The RTX 5090 runs gemma-4-31B-it fully in VRAM at Q5_K_M (about 29 GB of 32 GB), at roughly 44 tokens/s.
How fast does gemma-4-31B-it run on the RTX 5090?
An estimate from memory bandwidth gives about 44 tokens/s at Q5_K_M.
Which quantisation of gemma-4-31B-it should I use on the RTX 5090?
Q5_K_M: the largest one that fits. Expected quality: near-lossless compared with the full-precision weights.

Memory and speed are estimates from the model's size and the card's memory bandwidth; real numbers depend on the runtime, drivers and context length. Community figures are medians of user reports.