Gemma 4 E2B in JAX on One TPU v5e: bf16 or 4-Bit, Python or Rust, and How It Stands Against vLLM
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Benchmarking Gemma 4 on TPU with JAX/Rust/vLLM, directly relevant to AI/ML infrastructure.
A pure-JAX engine serves Gemma 4 E2B on a single TPU v5e chip (16.9 GB HBM) using bf16 or 4-bit quantization, with a Rust-based variant that bypasses Python overhead by handing the graph directly to libtpu. Benchmarks compare both against vLLM on the same flex-start VM, measuring whether 4-bit pays off when the 9.26 GB bf16 model already fits, how much latency comes from Python, and where a hand-written JAX engine stands relative to vLLM. The engine loads Hugging Face safetensors without PyTorch, speaks the OpenAI chat API, and uses jitted prefill with a static KV cache.