Spaces:
Running on Zero
Running on Zero
README: hackathon write-up (idea + tech), fix Hoid/Drominad, link placeholders
Browse filesAdd the idea + tech write-up (calls out the Off Brand custom UI), a Demo &
write-up section with placeholders for the video and social post, and correct
the stale Threnody entry to Hoid at Drominad. No badge/track tags — Hugging
Face assigns those.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
README.md
CHANGED
|
@@ -14,14 +14,47 @@ short_description: Chat in character with the Shards of the Cosmere
|
|
| 14 |
|
| 15 |
# ✨ Cosmere Codex — *Voices of the Shards*
|
| 16 |
|
| 17 |
-
A
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
Built for the Hugging Face **Build Small Hackathon**
|
| 23 |
-
"Thousand Token Wood
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## The Shards
|
| 27 |
- **Harmony** (Scadrial) — the god who was once a mortal scholar, holding stability and ruin in balance.
|
|
@@ -30,21 +63,14 @@ brings each Shard to life.
|
|
| 30 |
- **Devotion & Dominion** (Sel) — two Splintered Shards, finishing each other's broken thoughts.
|
| 31 |
- **Endowment** (Nalthis) — the giver of Breath, watching what mortals make of her gifts.
|
| 32 |
- **Autonomy** (Taldain) — the many-faced Shard who will never tell you who it truly is.
|
| 33 |
-
- **
|
| 34 |
-
|
| 35 |
-
## How it works
|
| 36 |
-
- **Model:** `Qwen/Qwen3-8B` (≤ 32B params) run in **non-thinking mode** for snappy, in-character replies.
|
| 37 |
-
The model id lives in one easy-to-swap constant in `app.py` (alt: `openbmb/MiniCPM4.1-8B`).
|
| 38 |
-
- **Serving:** Hugging Face `transformers` on **ZeroGPU** (`@spaces.GPU`), using the tokenizer's chat template.
|
| 39 |
-
- **Lore:** each Shard's personality *and* key canon lives in its system prompt, so the model performs a
|
| 40 |
-
fully specified character rather than relying on (and inventing) lore.
|
| 41 |
|
| 42 |
-
> ⚙️ **Note:** this Space
|
| 43 |
-
> enable
|
| 44 |
|
| 45 |
## Attribution & disclaimer
|
| 46 |
Lore facts adapted from the [Coppermind wiki](https://coppermind.net) (CC BY-NC-SA).
|
| 47 |
-
|
| 48 |
Brandon Sanderson or Dragonsteel. The Cosmere and its worlds are their creations.
|
| 49 |
|
| 50 |
Configuration reference: https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 14 |
|
| 15 |
# ✨ Cosmere Codex — *Voices of the Shards*
|
| 16 |
|
| 17 |
+
A living star map of the Cosmere. Click a system and talk — **live and in
|
| 18 |
+
character** — with the god-like Shard who dwells there. Each Shard is performed
|
| 19 |
+
by a small language model kept fully in voice: ask anything, and it answers on
|
| 20 |
+
the fly in its own distinct character. **The AI isn't a feature here; it *is*
|
| 21 |
+
the experience.**
|
| 22 |
|
| 23 |
+
Built for the Hugging Face **Build Small Hackathon** — creative track,
|
| 24 |
+
"Thousand Token Wood."
|
| 25 |
+
|
| 26 |
+
## 🎬 Demo & write-up
|
| 27 |
+
- **Demo video:** _coming soon_ <!-- TODO: link -->
|
| 28 |
+
- **Social post:** _coming soon_ <!-- TODO: link -->
|
| 29 |
+
|
| 30 |
+
## The idea
|
| 31 |
+
The Cosmere is full of god-like beings called Shards, each the embodiment of a
|
| 32 |
+
single intent — Ruin, Devotion, Odium, Cultivation. *Cosmere Codex* turns that
|
| 33 |
+
pantheon into something you can actually **converse with**. The front page is a
|
| 34 |
+
slowly-orbiting "solar system of systems": each world drawn as its own animated
|
| 35 |
+
symbol circling a central star. Click one and you drop into a themed
|
| 36 |
+
conversation with its Shard — Odium trying to seduce you into surrendering your
|
| 37 |
+
guilt, Cultivation answering only in riddles of seeds and seasons, Hoid
|
| 38 |
+
deflecting every question with a story.
|
| 39 |
+
|
| 40 |
+
The design bet: a small model doesn't reliably *know* Cosmere canon, so we don't
|
| 41 |
+
ask it to. Each Shard's personality **and** key lore live in its system prompt,
|
| 42 |
+
so the model simply *performs* a fully-specified character instead of inventing
|
| 43 |
+
facts. The result stays in-voice and on-canon while running on a tiny model.
|
| 44 |
+
|
| 45 |
+
## The tech
|
| 46 |
+
- **Model:** `Qwen/Qwen3-8B` (≤ 32B) in **non-thinking mode** for snappy,
|
| 47 |
+
in-character replies, served with Hugging Face `transformers` on **ZeroGPU**
|
| 48 |
+
(`@spaces.GPU`), streamed token-by-token via the tokenizer's chat template.
|
| 49 |
+
The model id is one easy-to-swap constant in `app.py`.
|
| 50 |
+
- **Custom UI (Off Brand):** `gr.Blocks` pushed well past stock Gradio — a
|
| 51 |
+
CSS/SVG deep-space scene; seven hand-built, animated vector system symbols
|
| 52 |
+
(turning gears, orbiting planet-dots, pulsing suns) arranged in a circle that
|
| 53 |
+
slowly revolves around a central star; per-Shard color theming; and a tiny
|
| 54 |
+
JS click-bridge so the custom symbols drive navigation. Collapses to a clean
|
| 55 |
+
tappable grid on mobile.
|
| 56 |
+
- **Lore-in-prompt:** characters and canon are authored in `shards.py`, separate
|
| 57 |
+
from the UI, so voices are easy to tune.
|
| 58 |
|
| 59 |
## The Shards
|
| 60 |
- **Harmony** (Scadrial) — the god who was once a mortal scholar, holding stability and ruin in balance.
|
|
|
|
| 63 |
- **Devotion & Dominion** (Sel) — two Splintered Shards, finishing each other's broken thoughts.
|
| 64 |
- **Endowment** (Nalthis) — the giver of Breath, watching what mortals make of her gifts.
|
| 65 |
- **Autonomy** (Taldain) — the many-faced Shard who will never tell you who it truly is.
|
| 66 |
+
- **Hoid** (Drominad) — no Shard rules this system, so the Cosmere's eternal wanderer is filling in… unfortunately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
+
> ⚙️ **Note:** this Space needs GPU hardware (ZeroGPU); an 8B model won't run on
|
| 69 |
+
> the free CPU tier — enable it under **Settings → Hardware**.
|
| 70 |
|
| 71 |
## Attribution & disclaimer
|
| 72 |
Lore facts adapted from the [Coppermind wiki](https://coppermind.net) (CC BY-NC-SA).
|
| 73 |
+
An **unofficial, non-commercial fan project** — not affiliated with or endorsed by
|
| 74 |
Brandon Sanderson or Dragonsteel. The Cosmere and its worlds are their creations.
|
| 75 |
|
| 76 |
Configuration reference: https://huggingface.co/docs/hub/spaces-config-reference
|