# GemmaQuest: Serverless WebGPU RPG

- **Event:** [Google I/O Hackathon](https://cerebralvalley.ai/e/google-io-hackathon)
- **When:** Sat, May 23 at 9:00 AM – 10:00 PM (PDT)
- **Where:** Shack15, San Francisco, CA
- **Team:** [Sterling Cobb](https://cerebralvalley.ai/u/fourcolors)
- **GitHub:** https://github.com/fourcolors/google-io-2026
- **Demo video:** https://youtu.be/j_MeM_ZkIns
- **Gallery:** https://cerebralvalley.ai/e/google-io-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/google-io-hackathon/hackathon/gallery/44

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.

---

Markdown version of https://cerebralvalley.ai/e/google-io-hackathon/hackathon/gallery/44. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
