Fine-tuned Gemma 4 E4B drives 100 villagers offline in a rumor-spread simulation game

AlternativeEnough352 · reddit · 2026-11-23

A developer open-sourced Rumor Village: a 3D village where up to 100 neighbors are driven by a fine-tuned Gemma 4 E4B running locally via llama.cpp — fully offline, no API. Each simulated minute, every villager submits a 256-token card and outputs one GBNF-constrained JSON action; a C++ engine validates actions against memory ("the model proposes, the engine decides") with exact integer-math replay. Fine-tuning cut fabricated memories from 2% to 0%, reduced failures 5–16.5x, and halved generation time to 0.36s/min at 4.4–4.6GB VRAM on an RTX 5070 Ti (rejected actions rose to 1%). Trained with LoRA (r16) on 12,146 bilingual card→answer pairs generated by two frontier models and engine-validated. MIT code, Apache-2.0 model, plus a GPU-free web demo.

Original post →

More from coding & agent

coding & agent channel →