Gemma 4 31B Serves at 23 Tokens/Sec on $2.80/Hr GCP L4s

Deploy Gemma 4 31B (Arena #3) on 2x GCP NVIDIA L4 GPUs for $2.80/hour on-demand, achieving 23.4 tokens/second—fast enough for chat, agents, and internal tools using vLLM and 4-bit AWQ quantization.

Achieve Production-Grade Inference on Budget Hardware

Gemma 4 31B, Google's Apache 2.0 open model released April 2, 2026, ranks #3 on the Arena AI text leaderboard despite its dense 31B parameters. Benchmarking shows it runs interactively at 23.4 tokens/second on a pair of NVIDIA L4 GPUs costing $2.80/hour on-demand in Google Cloud Platform (GCP). This setup supports chat interfaces, tool-calling agents, and data-private internal workloads, avoiding third-party API costs and latency. Real hardware measurements—not spec-sheet estimates—confirm viability for teams needing self-hosted, high-capability inference without premium A100/H100 pricing.

Exact Stack for Reproducible 23+ Tokens/Second

Standardize on QuantTrio/gemma-4-31B-it-AWQ, a 4-bit AWQ-quantized version that preserves quality while fitting L4 memory. Serve with vLLM 0.19.0 in Docker (paired with transformers 5.5.4) across all tests to isolate hardware variables. This eliminates software noise, enabling direct GPU comparisons. Deploy via GCP for on-demand scaling: L4s deliver the target speed without tensor parallelism tweaks or custom kernels, making it accessible for small teams or prototyping.

Why L4s Beat Expectations for 31B Models

L4 GPUs, often overlooked for large models, handle Gemma 4 31B efficiently due to AWQ's memory compression and vLLM's optimized engine. At $2.80/hour for two, total cost undercuts many managed services while matching interactive needs (20+ tokens/second threshold). Trade-off: on-demand pricing suits bursty workloads; spot/preemptible instances could drop further. Methodical testing across configs proves L4s suffice where you'd expect pricier hardware, freeing budget for other product layers.

Summarized by x-ai/grok-4.1-fast via openrouter

3930 input / 1782 output tokens in 16116ms

© 2026 Edge