Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
readme, docs: the Brain and Profiling pages as they are in 1.12.0
JustVuggeed379a3c263
diff --git a/README.it.md b/README.it.mdindex 6c77082e..fa66b2a7 100644--- a/README.it.md+++ b/README.it.md@@ -57,20 +57,27 @@ che può scegliere; legge la probabilità di ciascuna, non genera niente, e riposicuro. Qui: <strong>request changes al 99.9%</strong>, entropia 0.005, 4 token letti, 0 generati.</em></p><p align="center">- <img src="docs/media/colibri-brain.png" width="900" alt="la pagina Brain — 19.456 expert come una corteccia vivente">+ <img src="docs/media/colibri-brain.png" width="900" alt="la pagina Brain: l'atlante misurato degli expert di GLM-5.2 disegnato come una corteccia, dieci regioni da esplorare"></p>-<p align="center"><em>La pagina <strong>Brain</strong>: tutti i 19.456 expert come una corteccia vivente — il colore indica-il livello di archiviazione, la luminosità il calore di routing, e ogni expert instradato in un turno-lampeggia bianco. Passando il cursore si vede l'<a href="https://github.com/JustVugg/colibri/issues/175">affinità-tematica misurata</a> dell'expert.</em></p>+<p align="center"><em>La pagina <strong>Brain</strong>, <strong>Explore</strong>: l'<a href="https://github.com/JustVugg/colibri/issues/175">atlante misurato degli expert</a> di GLM-5.2+disegnato come una corteccia. 13.260 expert caratterizzati in dieci regioni (Python, SQL, matematica, poesia, legge, cinese…);+la posizione deriva dall'affinità di routing misurata, non da un embedding appreso. Si sceglie una regione e ci si entra.+<strong>Live routing</strong> passa al modello in esecuzione: una cella per expert, il colore è il livello di archiviazione, e ogni+expert instradato in un turno lampeggia bianco.</em></p><p align="center">- <img src="docs/media/colibri-atlas.png" width="900" alt="la pagina Atlas — l'atlante misurato degli expert come una galassia 3D">+ <img src="docs/media/colibri-brain-region.png" width="900" alt="dentro la regione Python: 1.142 expert, uno selezionato con le sue affinità misurate"></p>-<p align="center"><em>La pagina <strong>Atlas</strong>: l'<a href="https://github.com/JustVugg/colibri/issues/175">atlante-misurato degli expert</a> come una galassia 3D — 13.260 expert caratterizzati, 1.041 specialisti-replicabili che si raggruppano per argomento (poesia, legge, cinese, SQL…). La posizione deriva-dall'affinità di routing misurata, non da un embedding appreso. Trascinare per ruotare.</em></p>+<p align="center"><em>Dentro la regione <strong>Python</strong>: 1.142 expert come una costellazione, ciascuno etichettato per layer e indice. Il pannello+ne mostra uno, layer 17 expert 178: un generalista con entropia 3,13, la cui affinità misurata è 20,2% Python, 14,6% JSON,+14,2% conversazione, 13,3% SQL.</em></p>++<p align="center">+ <img src="docs/media/colibri-profiling.png" width="900" alt="la pagina Profiling: dove il motore spende ogni turno">+</p>+<p align="center"><em>La pagina <strong>Profiling</strong>: dove il motore spende ogni turno, per fase, con gli ultimi 30 turni come tendenza.+Qui Qwen3.6 su una macchina CPU: 19,0 s di tempo totale per 36 token di prompt e 55 generati, 2,9 tok/s, 11,4 s di+servizio disco sovrapposti al calcolo.</em></p>## La missione di ricercadiff --git a/README.ja.md b/README.ja.mdindex e669a4d9..82ebd90b 100644--- a/README.ja.md+++ b/README.ja.md@@ -55,18 +55,26 @@ $ ./coli chatVRAM/RAM/ディスクのティアバー、隅にはライブのミニ脳を表示しています。</em></p><p align="center">- <img src="docs/media/colibri-brain.png" width="900" alt="Brain ページ — 19,456 個のエキスパートを生きた皮質として表示">+ <img src="docs/media/colibri-brain.png" width="900" alt="Brain ページ — GLM-5.2 の計測されたエキスパートアトラスを皮質として描画、入れる 10 の領域"></p>-<p align="center"><em><strong>Brain</strong> ページ: 19,456 個のエキスパートすべてを生きた皮質として表示 — 色はストレージのティア、-明るさはルーティングの熱量を表し、1 ターンでルーティングされたエキスパートは白く光ります。ホバーするとそのエキスパートの-<a href="https://github.com/JustVugg/colibri/issues/175">計測されたトピック親和性</a>が表示されます。</em></p>+<p align="center"><em><strong>Brain</strong> ページの <strong>Explore</strong> 表示: GLM-5.2 の<a href="https://github.com/JustVugg/colibri/issues/175">計測されたエキスパートアトラス</a>を皮質として描画します。+特性が明らかになった 13,260 個のエキスパートが 10 の領域(Python、SQL、数学、詩、法律、中国語…)に分かれ、位置は学習された埋め込みではなく+計測されたルーティング親和性です。領域を選ぶとその中に入れます。<strong>Live routing</strong> 表示は実際に動いているモデルに切り替わり、+エキスパートごとに 1 セル、色はストレージのティア、1 ターンでルーティングされたエキスパートは白く光ります。</em></p><p align="center">- <img src="docs/media/colibri-atlas.png" width="900" alt="Atlas ページ — 計測されたエキスパートアトラスを 3D 銀河として表示">+ <img src="docs/media/colibri-brain-region.png" width="900" alt="Python 領域の内部 — 1,142 個のエキスパート、選択した 1 つとその計測された親和性"></p>-<p align="center"><em><strong>Atlas</strong> ページ: <a href="https://github.com/JustVugg/colibri/issues/175">計測されたエキスパートアトラス</a>-を 3D 銀河として表示 — 特性が明らかになった 13,260 個のエキスパートと、トピック(詩、法律、中国語、SQL…)ごとに-クラスタを形成する再現性のある 1,041 個のスペシャリスト。位置は学習された埋め込みではなく、計測されたルーティング親和性です。ドラッグで回転できます。</em></p>+<p align="center"><em><strong>Python</strong> 領域の内部: 1,142 個のエキスパートが星座として並び、それぞれにレイヤーと番号のラベルが付きます。パネルはその 1 つ、+レイヤー 17 のエキスパート 178 を表示しています。エントロピー 3.13 のジェネラリストで、計測された親和性は Python 20.2%、JSON 14.6%、+会話 14.2%、SQL 13.3% です。</em></p>++<p align="center">+ <img src="docs/media/colibri-profiling.png" width="900" alt="Profiling ページ — エンジンが各ターンで時間を使う場所">+</p>+<p align="center"><em><strong>Profiling</strong> ページ: エンジンが各ターンで時間を使う場所をフェーズごとに示し、直近 30 ターンを推移として表示します。+ここでは CPU マシン上の Qwen3.6: プロンプト 36 トークンと生成 55 トークンで壁時計時間 19.0 秒、2.9 tok/s、+ディスクサービス 11.4 秒は計算と重なっています。</em></p>## 研究のミッションdiff --git a/README.md b/README.mdindex 3344d5d0..3dae7bc7 100644--- a/README.md+++ b/README.md@@ -63,18 +63,26 @@ it may pick; it reads the probability of each one, generates nothing, and reportnot sure. Here: <strong>request changes at 99.9%</strong>, entropy 0.005, 4 tokens read, 0 generated.</em></p><p align="center">- <img src="docs/media/colibri-brain.png" width="900" alt="the Brain page — 19,456 experts as a live cortex">+ <img src="docs/media/colibri-brain.png" width="900" alt="the Brain page: the measured expert atlas of GLM-5.2 drawn as a cortex, ten regions to enter"></p>-<p align="center"><em>The <strong>Brain</strong> page: all 19,456 experts as a living cortex — colour is the storage tier,-brightness is routing heat, and every expert routed in a turn flashes white. Hovering shows the expert's-<a href="https://github.com/JustVugg/colibri/issues/175">measured topic affinity</a>.</em></p>+<p align="center"><em>The <strong>Brain</strong> page, <strong>Explore</strong>: the <a href="https://github.com/JustVugg/colibri/issues/175">measured expert atlas</a> of GLM-5.2+drawn as a cortex. 13,260 characterised experts in ten regions (Python, SQL, mathematics, poetry, law, Chinese…);+position is measured routing affinity, not a learned embedding. Choose a region to enter it. <strong>Live routing</strong> switches+to the model actually running: one cell per expert, colour is the storage tier, and every expert routed in a turn flashes white.</em></p><p align="center">- <img src="docs/media/colibri-atlas.png" width="900" alt="the Atlas page — the measured expert atlas as a 3-D galaxy">+ <img src="docs/media/colibri-brain-region.png" width="900" alt="inside the Python region: 1,142 experts, one of them selected with its measured affinities"></p>-<p align="center"><em>The <strong>Atlas</strong> page: the <a href="https://github.com/JustVugg/colibri/issues/175">measured expert atlas</a>-as a 3-D galaxy — 13,260 characterised experts, 1,041 replicated specialists clustering by topic-(poetry, law, Chinese, SQL…). Position is measured routing affinity, not a learned embedding. Drag to spin.</em></p>+<p align="center"><em>Inside the <strong>Python</strong> region: 1,142 experts as a constellation, each labelled by layer and index. The panel shows+one of them, layer 17 expert 178: a generalist with entropy 3.13, whose measured affinity is 20.2% Python, 14.6% JSON,+14.2% conversation, 13.3% SQL.</em></p>++<p align="center">+ <img src="docs/media/colibri-profiling.png" width="900" alt="the Profiling page: where the engine spends each turn">+</p>+<p align="center"><em>The <strong>Profiling</strong> page: where the engine spends each turn, by phase, with the last 30 turns as a trend.+Here Qwen3.6 on a CPU box: 19.0 s of wall time for 36 prompt and 55 generated tokens, 2.9 tok/s, 11.4 s of disk+service overlapped with compute.</em></p>## The research missiondiff --git a/README.zh-CN.md b/README.zh-CN.mdindex cf037414..c25436c6 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -47,18 +47,23 @@ Brain 页面和性能分析,支持浅色与深色主题。图中是 Qwen3.6熵 0.005,读取 4 个 token,生成 0 个。</em></p><p align="center">- <img src="docs/media/colibri-brain.png" width="900" alt="大脑页面——以实时皮层呈现 19,456 个专家">+ <img src="docs/media/colibri-brain.png" width="900" alt="大脑页面:GLM-5.2 的实测专家图谱绘成一块皮层,十个可进入的区域"></p>-<p align="center"><em><strong>大脑(Brain)</strong>页面:将全部 19,456 个专家呈现为活的皮层——颜色代表存储层级,-亮度代表路由热度,每轮被路由到的专家都会闪白。将光标停在专家上,即可查看其-<a href="https://github.com/JustVugg/colibri/issues/175">实测主题亲和度</a>。</em></p>+<p align="center"><em><strong>大脑(Brain)</strong>页面的 <strong>Explore</strong> 视图:将 GLM-5.2 的<a href="https://github.com/JustVugg/colibri/issues/175">实测专家图谱</a>绘成一块皮层。+13,260 个已分析专家分为十个区域(Python、SQL、数学、诗歌、法律、中文……);位置取自实测路由亲和度,而非学习出的嵌入向量。+选择一个区域即可进入。<strong>Live routing</strong> 视图切换到正在运行的模型:每个专家一格,颜色代表存储层级,每轮被路由到的专家都会闪白。</em></p><p align="center">- <img src="docs/media/colibri-atlas.png" width="900" alt="图谱页面——以 3D 星系呈现实测专家图谱">+ <img src="docs/media/colibri-brain-region.png" width="900" alt="Python 区域内部:1,142 个专家,其中一个被选中并显示其实测亲和度"></p>-<p align="center"><em><strong>图谱(Atlas)</strong>页面:将<a href="https://github.com/JustVugg/colibri/issues/175">实测专家图谱</a>-呈现为 3D 星系——共 13,260 个已分析专家,其中 1,041 个可复现的专门专家会按主题聚集-(诗歌、法律、中文、SQL……)。位置取自实测路由亲和度,而非学习出的嵌入向量。拖拽即可旋转。</em></p>+<p align="center"><em><strong>Python</strong> 区域内部:1,142 个专家组成的星座,每个都标注了层号和序号。面板显示其中一个:第 17 层第 178 号专家,+一个熵为 3.13 的通才,其实测亲和度为 Python 20.2%、JSON 14.6%、对话 14.2%、SQL 13.3%。</em></p>++<p align="center">+ <img src="docs/media/colibri-profiling.png" width="900" alt="性能剖析页面:引擎在每一轮中的时间去向">+</p>+<p align="center"><em><strong>性能剖析(Profiling)</strong>页面:引擎在每一轮中的时间去向,按阶段划分,并以最近 30 轮作为趋势。+此处为 CPU 机器上的 Qwen3.6:36 个提示词元与 55 个生成词元共用时 19.0 秒,2.9 tok/s,其中 11.4 秒的磁盘服务与计算重叠。</em></p>## 研究使命diff --git a/README.zh-TW.md b/README.zh-TW.mdindex 9b50aab1..05e8b7ba 100644--- a/README.zh-TW.md+++ b/README.zh-TW.md@@ -47,18 +47,23 @@ Brain 頁面和效能分析,支援淺色與深色主題。圖中是 Qwen3.6熵 0.005,讀取 4 個 token,生成 0 個。</em></p><p align="center">- <img src="docs/media/colibri-brain.png" width="900" alt="大腦頁面——以即時皮質呈現 19,456 個專家">+ <img src="docs/media/colibri-brain.png" width="900" alt="大腦頁面:GLM-5.2 的實測專家圖譜繪成一塊皮質,十個可進入的區域"></p>-<p align="center"><em><strong>大腦(Brain)</strong>頁面:將全部 19,456 個專家呈現為活的皮質——顏色代表儲存層級,-亮度代表路由熱度,每輪被路由到的專家都會閃白。將游標停在專家上,即可查看其-<a href="https://github.com/JustVugg/colibri/issues/175">實測主題親和度</a>。</em></p>+<p align="center"><em><strong>大腦(Brain)</strong>頁面的 <strong>Explore</strong> 檢視:將 GLM-5.2 的<a href="https://github.com/JustVugg/colibri/issues/175">實測專家圖譜</a>繪成一塊皮質。+13,260 個已分析專家分為十個區域(Python、SQL、數學、詩歌、法律、中文……);位置取自實測路由親和度,而非學習出的嵌入向量。+選擇一個區域即可進入。<strong>Live routing</strong> 檢視切換到正在執行的模型:每個專家一格,顏色代表儲存層級,每輪被路由到的專家都會閃白。</em></p><p align="center">- <img src="docs/media/colibri-atlas.png" width="900" alt="圖譜頁面——以 3D 星系呈現實測專家圖譜">+ <img src="docs/media/colibri-brain-region.png" width="900" alt="Python 區域內部:1,142 個專家,其中一個被選取並顯示其實測親和度"></p>-<p align="center"><em><strong>圖譜(Atlas)</strong>頁面:將<a href="https://github.com/JustVugg/colibri/issues/175">實測專家圖譜</a>-呈現為 3D 星系——共 13,260 個已分析專家,其中 1,041 個可重現的專門專家會按主題聚集-(詩歌、法律、中文、SQL……)。位置取自實測路由親和度,而非學習出的嵌入向量。拖曳即可旋轉。</em></p>+<p align="center"><em><strong>Python</strong> 區域內部:1,142 個專家組成的星座,每個都標註了層號和序號。面板顯示其中一個:第 17 層第 178 號專家,+一個熵為 3.13 的通才,其實測親和度為 Python 20.2%、JSON 14.6%、對話 14.2%、SQL 13.3%。</em></p>++<p align="center">+ <img src="docs/media/colibri-profiling.png" width="900" alt="效能剖析頁面:引擎在每一輪中的時間去向">+</p>+<p align="center"><em><strong>效能剖析(Profiling)</strong>頁面:引擎在每一輪中的時間去向,按階段劃分,並以最近 30 輪作為趨勢。+此處為 CPU 機器上的 Qwen3.6:36 個提示詞元與 55 個生成詞元共用時 19.0 秒,2.9 tok/s,其中 11.4 秒的磁碟服務與計算重疊。</em></p>## 研究使命diff --git a/docs/api.md b/docs/api.mdindex 6e22cdab..76f39fac 100644--- a/docs/api.md+++ b/docs/api.md@@ -293,31 +293,35 @@ dashboard on the same port. On a headless host (no display, often no GPU at all)use `coli serve`, or `coli web --no-browser`, and point a browser at it fromanother machine. Nothing in the dashboard needs a desktop session on the host.-What you get:--- **Chat** with live metrics: a flashing token counter while generating, then- tok/s, time-to-first-token, prompt→completion counts and queue wait;-- **Runtime panel**: your hardware (CPU, GPUs + VRAM, RAM, cores), the- scheduler, and the live expert-tier bar — how many of the 19,456 experts sit- in VRAM / RAM / disk right now;-- **Brain**: the whole model as a 76×256 cortex, one cell per expert. Colour =- tier, brightness = routing heat, and the experts routed in each turn flash- white and decay — you watch the model think. Hover any cell for its tier,- heat and [measured topic affinity](https://github.com/JustVugg/colibri/issues/175);-- **Atlas**: the measured expert atlas as a 3-D galaxy (publish `experts.json`- from `tools/expert_atlas/analyze.py --web`).+What you get is one workspace with a dock to switch page:++- **Chat**: streaming answers, a reasoning toggle, image input where the engine+ supports it, the KV slot to answer in, and the conversation exported as a file;+- **Brio**: closed-set answers. A document, a question and the only answers+ allowed; the engine reads the probability of each answer, generates nothing,+ and reports an entropy that says when it is not sure. Same thing as+ `POST /v1/brio` (see [brio.md](brio.md));+- **Brain**, two views. *Explore* draws the+ [measured expert atlas](https://github.com/JustVugg/colibri/issues/175) of GLM-5.2 as a cortex with ten regions to+ enter (publish `experts.json` from `tools/expert_atlas/analyze.py --web`).+ *Live routing* shows the model actually running: one cell per expert,+ colour = tier, brightness = routing heat, and the experts routed in each+ turn flash white and decay;+- **Profiling**: where the engine spends each turn, by phase (I/O wait, expert+ matmul, attention, LM head, other), the disk service overlapped with compute,+ and the last 30 turns as a trend;+- a light and a dark theme.The dashboard talks to the engine over a small line protocol and plain JSONendpoints — nothing heavier than the engine itself. `web/` is a pure OpenAI-APIclient (React + TypeScript) and also works against any other compatibleendpoint; the terminal `coli chat` remains the first-class interface.-The layout is responsive down to phone widths, and the sidebar carries the full-telemetry stack — hardware, scheduler, tier bar, per-turn time breakdown, tok/s-trend and per-GPU expert counts:+The layout is responsive down to phone widths; the per-turn time breakdown and+the tok/s trend live on the Profiling page:<p align="center"><img src="media/colibri-mobile.png" width="270" alt="the dashboard on a phone-sized viewport" /> - <img src="media/colibri-metrics.png" width="300" alt="the telemetry sidebar" />+ <img src="media/colibri-profiling.png" width="560" alt="the Profiling page: where the engine spends each turn" /></p>diff --git a/docs/media/colibri-atlas.png b/docs/media/colibri-atlas.pngdeleted file mode 100644index 5e5e76ea..00000000Binary files a/docs/media/colibri-atlas.png and /dev/null differdiff --git a/docs/media/colibri-brain-region.png b/docs/media/colibri-brain-region.pngnew file mode 100644index 00000000..f0a83f67Binary files /dev/null and b/docs/media/colibri-brain-region.png differdiff --git a/docs/media/colibri-brain.png b/docs/media/colibri-brain.pngindex 9ac5676a..53cd0e50 100644Binary files a/docs/media/colibri-brain.png and b/docs/media/colibri-brain.png differdiff --git a/docs/media/colibri-metrics.png b/docs/media/colibri-metrics.pngdeleted file mode 100644index 853d6868..00000000Binary files a/docs/media/colibri-metrics.png and /dev/null differdiff --git a/docs/media/colibri-mobile.png b/docs/media/colibri-mobile.pngindex 5c1c63c9..e742e702 100644Binary files a/docs/media/colibri-mobile.png and b/docs/media/colibri-mobile.png differdiff --git a/docs/media/colibri-profiling.png b/docs/media/colibri-profiling.pngnew file mode 100644index 00000000..10d38c50Binary files /dev/null and b/docs/media/colibri-profiling.png differ