GemmaQuest: Serverless WebGPU RPG
Built at Google I/O Hackathon · May 23, 2026 · San Francisco, CA

GemmaQuest is a browser RPG where Google's Gemma 4 E2B (~2.3B params, Q4) runs 100% on-device via WebGPU — no server, no API, no internet. NPC dialogue and biome lore stream live from the model while the player's network is offline. The whole project ships as a single HTML file (gemmaquest.html) that contains the spec, an in-page test runner, and the playable game. ▎ ▎ The problem it solves: most "AI games" are thin wrappers over a hosted API, which means latency, cost, privacy leakage, and zero offline play. GemmaQuest proves a frontier-class open model can author a game world live, on the player's own GPU, with zero network — by toggling DevTools → Offline before loading the realm and watching the LOCAL · GPU badge stay green while NPCs keep talking. ▎ ▎ Built on transformers.js + ONNX Runtime Web (WebGPU EP) running onnx-community/gemma-4-E2B-it-ONNX. A single persistent Web Worker sits behind an InferenceEngine adapter interface with a serialized request queue, so biome-lore and NPC-chat generations never race on the GPU. A drop-in ApiEngine implements the same interface as a fallback insurance path.