Skip to main content
Back

Google DeepMind's Gemma 4 31B Now Fits on a 24GB GPU

A community 4-bit AWQ build of Gemma 4 31B shrinks the 30.7B-parameter multimodal reasoner to roughly 21GB without touching its benchmark-leading capabilities.

Pro

Model, Full Access
  • Community AWQ 4-bit build of Gemma 4 31B compresses the model to 20.9GB, fitting on 24GB GPUs.
  • Base gemma-4-31B-it hits 85.2% MMLU Pro, 89.2% AIME 2026, and 2150 Codeforces ELO.
  • Supports 256K context, configurable thinking mode, native function calling, and image input.
  • Works out of the box with vLLM, SGLang, Transformers, and Docker Model Runner.
  • Recommended sampling: temperature 1.0, top_p 0.95, top_k 64; place images before text.
  • Already past 800K downloads on Hugging Face, trending near the top of the hub.

A community-published quantization has reduced Google DeepMind’s largest dense Gemma 4 model to a reported 20.9GB checkpoint. The quantized checkpoint uses 4-bit Activation-aware Weight Quantization, or AWQ, placing the model’s weights within the nominal capacity of a 24GB GPU.

The package lowers the hardware threshold for local coding, document analysis, visual reasoning, and tool-calling workloads. Runtime memory still exceeds the checkpoint size, so a 24GB card leaves limited room for the key-value cache, activations, temporary buffers, and concurrent requests. At publication time, Hugging Face displayed more than 800,000 downloads and listed the repository among its trending models.

A 31B model in a 20.9GB package

Google DeepMind’s source model is the instruction-tuned, 30.7-billion-parameter dense variant in the Gemma 4 family. The family also includes E2B, E4B, and 26B-A4B releases aimed at different memory and compute budgets.

Gemma 4 combines local sliding-window attention with periodic global-attention layers. Local layers examine a limited span of nearby tokens, while global layers can reference the full sequence. Shared key-value representations and Proportional RoPE reduce some long-context memory costs, and the final layer always uses global attention.

AWQ uses calibration activations to identify weight channels that contribute most to model output, then chooses scaling values that reduce quantization error when weights are packed into 4-bit integers. The quantized release preserves the architecture, declared 256K-token context limit, and feature set, while changing the model’s numerical behavior.

Property Published specification
Parameters 30.7 billion
Quantization 4-bit AWQ
Checkpoint format compressed-tensors
Reported size 20.9GB
Maximum context 256K tokens
Inputs Text and images
Audio support Unavailable in the 31B variant

The memory limit goes beyond weights

A 20.9GB checkpoint leaves roughly 3GB of nominal capacity on a 24GB card before the inference engine allocates its runtime memory. Low concurrency and a restricted sequence length may be necessary, and some configurations may require CPU offload or a GPU with more VRAM.

The model’s 256K-token specification describes its architectural limit rather than a guaranteed operating point on every device. Long prompts expand the key-value cache, even with Gemma 4’s hybrid attention design. Available context depends on the backend, cache precision, image-token count, batch size, and GPU memory.

Google’s reported benchmark results

The base model card reports strong results across reasoning, coding, long-context, and visual benchmarks. These figures apply to Google’s reference model evaluation and do not establish performance parity for the 4-bit checkpoint.

Benchmark Area Reported result
MMLU-Pro Knowledge and reasoning 85.2%
AIME 2026, no tools Mathematics 89.2%
LiveCodeBench v6 Code generation 80.0%
Codeforces Competitive programming 2150 rating
GPQA Diamond Graduate-level science 84.3%
MMMU Pro Multimodal reasoning 76.9%
MATH-Vision Visual mathematics 85.6%
MRCR v2, eight needles at 128K Long-context retrieval 66.4%

The model also supports object detection, document and PDF parsing, chart interpretation, screen and interface analysis, multilingual OCR, handwriting recognition, and coordinate-based pointing. Video can be processed by sampling frames and supplying them as an interleaved image sequence.

Launching a local server

The checkpoint uses the compressed-tensors format and is listed for use with vLLM, SGLang, Transformers, and Docker Model Runner. Backend support depends on the installed version, particularly for the Gemma 4 architecture and multimodal model class.

A vLLM server can be started with a conservative 8K context limit:

python -m pip install -U vllm
vllm serve cyankiwi/gemma-4-31B-it-AWQ-4bit --max-model-len 8192

vLLM exposes the standard OpenAI-compatible /v1/chat/completions endpoint. Multimodal requests can include images through image_url content blocks. The context limit can be raised after measuring available memory under the intended batch size and workload.

The model page specifies AutoModelForMultimodalLM for Transformers and recommends temperature=1.0, top_p=0.95, and top_k=64 as starting sampling values. Production settings may need adjustment for deterministic tool calls, structured output, or repeatable evaluation.

Prompt controls worth knowing

Gemma 4 31B provides a configurable reasoning mode controlled through the <|think|> token in the system prompt. This allows an application to enable or disable extended reasoning for each request rather than maintaining separate checkpoints.

Multimodal prompts work best when image content appears before the accompanying text. Each image can use a visual budget of 70, 140, 280, 560, or 1,120 tokens. Lower budgets suit captioning and sampled video frames, while higher budgets preserve more detail for OCR, diagrams, and documents containing small text.

Where the local build fits

Local deployment gives developers direct control over data handling, latency, sampling, and tool execution. Suitable workloads include:

  • Agent loops that generate native function calls without sending prompts to a hosted API
  • Repository and long-document analysis within the available runtime context
  • On-premises PDF parsing, chart reading, interface analysis, and multilingual OCR
  • Offline reasoning with thinking mode selected per request
  • Visual question answering over private screenshots, scans, and technical diagrams

Native function calling produces structured tool requests; the host application remains responsible for validating arguments, enforcing permissions, executing tools, and returning results to the model.

Quality still needs local measurement

Four-bit quantization can reduce accuracy on tasks sensitive to small numerical changes, including difficult mathematics, long reasoning chains, structured output, and retrieval near the context limit. Sampling choices may amplify those differences. The quantized repository does not provide an independent benchmark suite demonstrating parity with the reference checkpoint.

The 31B model also omits the audio support available in the E2B and E4B variants. Speech recognition, audio translation, and other sound-based workloads therefore require a smaller Gemma 4 model or a separate audio system.

The quantizer reports using a dedicated calibration set covering STEM and agentic tasks. Calibration data can improve quantization quality for similar prompts, though broader testing remains necessary for multilingual, visual, long-context, and domain-specific deployments.

Hugging Face download counts record file fetches and can include repeated or automated requests, so the displayed total measures repository activity rather than unique installations. Independent comparisons of the AWQ build against the reference model will determine how much capability survives compression across real workloads.