GemmaQuest
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.
Core trick
Runs Gemma 4 E2B in the browser via WebGPU, with one worker queueing NPC dialogue generations.
Tags
Description
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.
README excerpt
# 🎮 GemmaQuest — Generative WebGPU RPG > **Google I/O 2026 Hackathon Winner Design** > > Live Demo: [**Play GemmaQuest in the Browser 🚀**](https://fourcolors.github.io/google-io-2026/) > > Standalone Interactive Spec & Tests: [**Launch Single-File Runner 🧪**](https://fourcolors.github.io/google-io-2026/gemmaquest.html) --- ``` ┌──────────────────────────────────────────────────────────┐ │ │ │ G E M M A Q U E S T : Generative WebGPU Realms │ │ │ │ [X: -5, Y: 0] Verdant Steppes │ │ LOCAL · GPU [🟢 READY] │ │ │ │ "The mists part as you arrive. Gemma writes the land." │ │ │ └──────────────────────────────────────────────────────────┘ ``` **GemmaQuest** is a 100% serverless, client-side generative RPG. A 2.3B parameter **Google Gemma 4 E2B** model runs entirely on your machine's GPU via **WebGPU** (using `transformers.js` + ONNX Runtime Web). There is no cloud database, no central server, and no API key in the primary path. When you walk, Gemma generates NPC dialogues, coordinates-specific lore, and world history live and offline. --- ## 🌟 Key Features & Tech Superpowers ### 1. 100% On-Device WebGPU Inference - **Gemma 4 E2B Inside**: Powered by `