Zhenzewu/tokenwood
๐ Tokenwood โ a very small wood that thinks
Five tiny creatures. One tiny model. Drop a button, start a saga.
Tokenwood is a pocket terrarium-world: an anxious hedgehog economist, a haiku-only snail poet, a sensationalist owl journalist, a washed-up opera frog and a magpie entrepreneur live little autonomous lives. Each one is an agent running on a single fine-tuned Qwen3-1.7B through llama.cpp โ on this Space's own CPU. No cloud APIs. No GPUs. No adult supervision.
You are the Wanderer. Leave a shiny button at the Old Oak. Tell the magpie a secret about the moon. Make it snow. Then let time pass โ and read what the wood believes happened in tonight's edition of The Thousand Token Tribune, Tokenwood's only (and therefore finest) newspaper.
๐ฌ Demo video: link added at submission ๐ฃ Social post: link added at submission ๐ Field notes (blog): link added at submission ๐ง Fine-tuned model: link added at publish ๐ก Agent traces dataset: link added at publish
Why this belongs in Thousand Token Wood
The app literally is a thousand-token wood. Every thought a creature thinks, every line it speaks, every overblown headline is generated under a strict token budget โ and the wood counts them honestly in the corner of your screen. Remove the model and nothing remains: the AI isn't a feature, it's the climate.
How it works
Browser (hand-drawn SVG world, custom frontend) โโ @gradio/client
โ streamed events (thoughts, speech, moves, headlines)
gr.Server (FastAPI + Gradio queue)
โ
World engine (Python): places ยท items ยท weather ยท clock ยท consequences
โ observe โ think โ act (ONE tool per turn)
llama-server (llama.cpp, pinned build) โ fine-tuned Qwen3-1.7B Q4_K_M
โโ per-creature KV slots + grammar-constrained JSON tool calls- Agents, honestly small. Each creature turn is one grammar-constrained generation:
{think, tool, to, arg}. llama.cpp compiles a JSON schema to a GBNF grammar, so a 1.7B model files tidy paperwork every single time โ no retries, no parsing surgery. - Fast enough to feel alive on 2 vCPUs. Static persona cards live in per-creature KV-cache slots; only the fresh world-slice is re-processed each turn. Median turn โ a few seconds, streamed to the UI as it happens.
- Emergence, not scripts. The newspaper is generated from the day's real event log. The misquotes are the model's own journalistic instincts.
Bonus quests claimed
Credits
Built for the Build Small Hackathon 2026 (Gradio ร Hugging Face). Base model: Qwen3-1.7B (Apache-2.0). Runtime: llama.cpp. Fine-tuned with Modal GPU credits (see field notes for the training recipe). Every creature opinion is its own; the Tribune regrets nothing.
