0glm β Granular Brain
A small language model with all knowledge baked into a single 1.9 GB file. Load the artifact, ask questions β no retrieval, no external indexes, no corpus at inference time. Every sentence of an answer is traceable back to (document, position) in the source corpus.
GitHub: 0penAGI/0glm Β· Landing page: 0penagi.github.io/0glm
β οΈ Scope. This is not a general-purpose LLM. It was trained on a deliberately small research corpus (~16K documents: climate mechanics, astronomy, sleep science, Python docs, resume practice). Within that material it navigates coherently; outside it, it has nothing to navigate β the dataset you bring is the answers you get. The full bake pipeline ships here, so you can rebuild the artifact from your own texts.
Model facts
| Planner parameters | 1.9 M (transformer encoder: 3 layers Β· d=192 Β· 4 heads, context 12 granules) |
| Artifact size | 1.99 GB |
| β granule embeddings | 0.98 GB (1.25M grains Β· MiniLM-384 Β· fp16) |
| β granule texts | ~0.8 GB (verbatim source fragments, Β΅/Ο/Ξ© levels) |
| β document index | 24 MB (15,500 docs Β· 384d) |
| β planner weights | 8 MB |
| Granule bank | 723,990 usable grains after canonization/dedup masks |
| Semantics | all-MiniLM-L6-v2 β PCA 384β32 projection |
| Stylometry | 32-dim oscillator features + valence/arousal |
The parameter count is deliberately tiny: weights hold the navigation policy, the knowledge lives in the baked granule bank. That separation is what keeps every answer traceable.
Architecture
βββββββββββββββββββββββββββ OFFLINE: BAKE βββββββββββββββββββββββββββ
β β
corpus β granulation semantics + style teacher demos β
ββββββββββββββββ β ββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββ β
β raw web textsβββββββΆβ β Β΅ micro β β MiniLM-384 sems β β ride planner β β
ββββββββββββββββ β β Ο meso ββββββΆ β stylometry (32d) β β picks doc arc β β
β β Ξ© macro β β affect (V/A) β β + corrections β β
β ββββββββββββββββ ββββββββββ¬ββββββββββ βββββββββ¬ββββββββ β
β syndication dedup β β β
β canonization βΌ βΌ β
β ββββββββββββββββββββ βββββββββββββββββββββ
β β oscillatory β β DISTILLATION β
β β field: clusters, ββββΆβ demo triples with β
β β transitions, β β correction momentsβ
β β grain bank β βββββββββββββββββββββ
β ββββββββββ¬ββββββββββ β β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββ
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββ
β brain.pt (1.9 GB) β
β planner weights Β· granule bank Β· β
β doc embeddings Β· quality masks β
ββββββββββββββββ¦ββββββββββββββββββββββββ
β
βββββββββββββββββββ INFERENCE: NO RETRIEVAL ββββββββββββββββββββββββββ
β β
"What causes β βββββββββββββ qsem token β
El NiΓ±o?" βββββββββΌββββββββΆβ question βββββββββ β
β β embedding β βΌ β
β β βββββββββββββββββββββββββββ predict next-grain β
β β β transformer over field ββββembedding βββ β
β β β state (+ working memory)β β snap β
β β βββββββββββββββββββββββββββ βΌ β
β β βββββββββββββββββββββββ β
β β β baked granule bank β β
β β β (nearest neighbor) β β
β β ββββββββββββ¬βββββββββββ β
β β repeat step ββββββββββββββββββββββ β
β βΌ β
β answer = stitched verbatim granules, each traceable to (doc, pos) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Quickstart
pip install -r requirements.txt
# ask the baked brain
python brain_chat.py --brain brain.pt --ask "What causes El Nino?"
# interactive session
python brain_chat.py --brain brain.pt --chat
Rebuild the artifact from your own corpus
python granulate.py # corpus β granules β semantics β field caches
python gen_demos.py # teacher demonstrations (correction moments)
python train_brain.py # distill teacher into the planner
python bake_brain.py # pack everything into one brain.pt
Files
| file | purpose |
|---|---|
brain.pt |
the baked artifact: planner weights + granule bank + doc embeddings + masks |
granular_text_field.py |
core library: pool, semantics, oscillatory field, canonization |
brain_chat.py |
inference shell: single ask / interactive session |
gen_demos.py |
generates teacher demonstration triples |
train_brain.py |
trains the planner (distillation + discriminative negatives) |
bake_brain.py |
packs weights + memory into the single-file artifact |
The audio modality (sonification of trajectories, 0MGE heritage) lives in the GitHub repo and is not part of this artifact yet.
License
MIT.