Instructions to use schizophyllume/BeeLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use schizophyllume/BeeLLM with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf schizophyllume/BeeLLM # Run inference directly in the terminal: llama cli -hf schizophyllume/BeeLLM
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf schizophyllume/BeeLLM # Run inference directly in the terminal: llama cli -hf schizophyllume/BeeLLM
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf schizophyllume/BeeLLM # Run inference directly in the terminal: ./build/bin/llama cli -hf schizophyllume/BeeLLM
Use Docker
docker model run hf.co/schizophyllume/BeeLLM
- Llama new
- LM Studio
- Jan
- vLLM
How to use schizophyllume/BeeLLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schizophyllume/BeeLLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "schizophyllume/BeeLLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/schizophyllume/BeeLLM
- Ollama
How to use schizophyllume/BeeLLM with Ollama:
ollama run hf.co/schizophyllume/BeeLLM
- Unsloth Desktop
- Docker Model Runner
How to use schizophyllume/BeeLLM with Docker Model Runner:
docker model run hf.co/schizophyllume/BeeLLM
- Lemonade
How to use schizophyllume/BeeLLM with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull schizophyllume/BeeLLM
Run and chat with the model
lemonade run user.BeeLLM-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
schizophyllume
Claude Opus 5.5
SCIENCE.md: calm-sisters test (link on, other bees from a calm copy of today), Nuntiator's idea
3ad93b8 |
Download SCIENCE.md from schizophyllume/BeeLLM: direct link, hf CLI and curl.
- Browser
- Download file 49.3 kB
-
https://huggingface.co/schizophyllume/BeeLLM/resolve/main/SCIENCE.md
- Command line
-
hf download hf://schizophyllume/BeeLLM/SCIENCE.md
-
curl -L -o SCIENCE.md https://huggingface.co/schizophyllume/BeeLLM/resolve/main/SCIENCE.md
49.3 kB
| # The neural bees: what we built, what we measured, and what we can't claim | |
| **What this is.** `BeeLLM-Hive` is a set of small language models (a queen and her workers) that never see each | |
| other's words. They read each other's *hidden states* through a learned link. This page explains how the link works and | |
| how the bees were taught to use it. It also covers how we checked that the link carries the information, what we saw | |
| inside the bees, and where the results stop. | |
| It's a small hobby experiment with toy models, and it hasn't been peer reviewed. We tried to make every claim here as small as the evidence. | |
| [the bees](#the-bees) Β· [the link](#the-link) Β· [time stamps](#time-stamps-no-peeking) Β· | |
| [the game](#the-game-that-teaches-them) Β· [results](#results-link-on-cut-and-queen-swapped) Β· | |
| [inside their heads](#inside-the-bees-heads) Β· [the Sovereign Hive](#the-sovereign-hive-three-minds) Β· | |
| [limitations](#limitations) Β· [reproduce it](#reproduce-it) Β· [notes](#notes) Β· [credits](#credits) | |
| ## The short version | |
| - A 50M-parameter queen (Scintilla) and up to 12 copies of one 3M-parameter worker run side by side. Each bee only | |
| reads her **own** conversation. Two link stages let every bee attend to the others' hidden states, in both directions. | |
| - They learn the hive's rules from a generated game in which the detail a bee needs often lives **only in another bee's prompt**. | |
| An example is which sister was swatted. | |
| - With the link on, the published hive writes the lines that need another bee's detail (guarding, dances, newborns, | |
| undertakers, stinging) correctly 92β100% of the time. With the link cut, the same bees on the same hives get **0%**. | |
| Lines about a bee's own news stay at 100% either way. | |
| - With the link **on** but the other bees' states taken from a calm copy of the same day, those lines also fall to | |
| **0%**. So the bees need the news the link carries, not just a link that looks normal. | |
| - Inside the bees, a sister writing `*guards bee 1*` puts 64% of her link attention on the hurt bee and 0% on the queen | |
| at the token "1". A linear probe can read "which bee was hurt" from a sister's hidden state only **after the second | |
| link stage**, at 100% on held-out hives. With the link cut it stays at chance. | |
| - What this shows: a learned link between separate models can carry the information a task needs. **What this | |
| doesn't show:** emergent communication from scratch. The game's rules say what each bee should write. The bees only | |
| had to learn to fetch the missing detail through the link. | |
| ### Where the numbers come from | |
| Every number on this page comes from a file in skizy's project folder (the `swarm/` directory). Each table names its | |
| file. These files aren't in this repo yet. The [reproduce it](#reproduce-it) section lists them. The models have | |
| names from their training runs: | |
| | name here | what it is | how we know | | |
| |---|---|---| | |
| | **hive 7** | `BeeLLM-Hive.gguf`, the hive in this repo and on the site | its sha256 matches `swarm/big/BeeLLM-Hive-big7.gguf`, exported from `hive_big7.pt` (`swarm/big/hive7.log`) | | |
| | **hive 4** | an earlier big hive with the same shape and rules version, a second reference for the queen-swap control | `swarm/big/hive4.sh`, `hive4.log` | | |
| | **the small hive** | `BeeLLM-Hive-small.gguf` (older rules, game 3) | its sha256 matches `swarm/big/BeeLLM-Hive-v3-site-backup.gguf` (see [note 5](#notes)) | | |
| ## The bees | |
|  | |
| | | queen (Scintilla) | each worker | the link | | |
| |---|---|---|---| | |
| | weights | 50.1M | 2.95M (**one shared brain**: every worker is a copy) | 1.09M | | |
| | width (d_model) / FFN | 640 / 1728 | 128 / 384 | 4 heads Γ 32 | | |
| | layers / attention heads | 8 / 10 | 4 / 4 | 2 stages, both directions | | |
| | vocabulary | 8,192 (one SentencePiece tokenizer for all) | same | | | |
| *Sources: `swarm/train3.py` (`SHAPES["big"]`), the saved config in `swarm/big/hive_big7.pt`, the `.gguf` metadata, | |
| and `swarm/hive.py`. We re-derived the parameter counts from the layer shapes in `hive.py`, and they match the | |
| figure's 50.1M + 2.95M + 1.09M = 54.2M.* | |
| Both models are small Llama-style decoders (RMSNorm, rotary positions, SwiGLU), written out by hand in `hive.py` so | |
| the same maths could be ported to the JavaScript runtime on the site. The JS runtime matches PyTorch to within | |
| 9.5e-6 in logits for hive 7 (`swarm/big/hive7.log`). | |
| **The queen was pretrained first** so that she has English. She was trained as a plain Llama for 30,000 steps of 32 | |
| windows Γ 512 tokens. 90% of the windows came from TinyStories (537M tokens available) and 10% were chats in the bee | |
| format: her old corpus, the voice bank and hive episodes. She reached a validation loss of **1.178** nats/token on the | |
| TinyStories validation split (`swarm/big/pretrain.py`, `swarm/big/night.log`; about 5 hours on one GPU). The workers | |
| were not pretrained. | |
| **Each bee sees only her own conversation.** | |
| - The queen sees what a person says to her (`...` on a quiet day) and her own replies. | |
| - A worker sees only `bee 7, guard:` plus what happens to *her*: `*a hand swats you*`, `*hatches*`, `*a hand gives | |
| you honey*`, `*finds lavender*`, `*rain*`, `*very old*`, `*smells dead bee 3*`. | |
| Nothing a bee writes is ever shown to another bee as text. | |
| **How hive 7 was trained** (`swarm/big/night.sh`, `hive2.sh`, `hive7.sh` and their logs): | |
| | step | from | rules (game version) | steps Γ hives per step | | |
| |---|---|---|---| | |
| | queen pretraining | scratch | β | 30,000 Γ 32 windows | | |
| | hive 2 | pretrained queen, new workers and links | 4 | 12,000 Γ 12 | | |
| | **hive 7** (published) | hive 2 | 6, plus many more ways of saying sorry | 6,000 Γ 12, then 10 after an out-of-memory crash at step 1,000 | | |
| ## The link | |
|  | |
| Some words first: | |
| - A transformer keeps a running vector per token, the **residual stream**. Each layer reads it and adds something | |
| back. It's where the model's "thoughts" about that token live. | |
| - **Attention** lets a token look at other tokens and pull in a weighted mix of what they hold. | |
| - **Cross-attention** is attention where the things being looked at belong to a *different* sequence. Here they belong to | |
| other bees. | |
| At each **link stage**, every token of every bee does one round of cross-attention over the other bees' residual | |
| streams, and adds the result to her own. The two stages sit at the queen after her block 3 β the workers after their | |
| block 1, and the queen after block 6 β the workers after block 2. Blocks are counted from 0, as in `hive.py`. | |
| For a worker's token *h* (from `class Link` in `swarm/hive.py`): | |
| 1. **Query:** `q = W_q Β· RMSNorm(h)`. Her token asks a question. | |
| 2. **Keys and values** come from the queen's tokens and all her sisters' tokens, **never her own**. Each *kind* of bee | |
| (queen, worker) gets its own RMSNorm and its own key/value projections, because they are different models with | |
| different widths. | |
| 3. **A sigmoid gate** on each source token's value, `Ο(W_g Β· RMSNorm(x) + b)`, decides how loudly that token | |
| is written into what gets read. A sigmoid squashes any number into 0..1. | |
| 4. **A learned null key with a zero value** is always in the set, so "read nothing" is a real choice. With the link | |
| cut, every query can only land on the null key, so the link adds exactly zero. | |
| 5. **Output:** the attention result goes through `W_o` and is **added to her residual stream**. `W_o` starts at zero, | |
| so a brand-new link changes nothing until training finds a use for it. | |
| The queen reads her workers the same way, with her own link weights. The link itself adds no position or bee-identity | |
| signal: sisters all share one key/value projection, and the link applies no positional encoding. So whatever tells one | |
| sister from another has to be inside their hidden states. An example is the "1" in `bee 1, nurse:`. | |
| Training is end to end. The loss is next-token cross-entropy on each bee's own reply tokens (her prompts are masked | |
| out), summed over the queen and all workers. A worker's mistake sends gradient back through the link into the queen's and | |
| her sisters' streams (`swarm/train2.py` `encode`/`collate`, `swarm/train3.py`). | |
| ## Time stamps (no peeking) | |
|  | |
| All the bees write their replies **at the same time**, so we need a rule that stops one bee from reading another's | |
| answer as it's being written. | |
| - Every token carries a stamp. On day *t*, prompt tokens are stamped **2t** and reply tokens **2t+1**. | |
| - A bee whose token has stamp *s* may only read other bees' tokens stamped **β€ 2Β·βs/2β**. That's everything up to | |
| and including today's prompts, and never anything being written today. | |
| - Padding and bees who don't exist (not hatched yet, or dead) get a stamp nobody may read (10βΉ, `NEVER` in `hive.py`). | |
| So on the day bee 1 is swatted, the queen's reply "GUARD bee 1!" is stamp 21 and locked for everyone. Bee 1's prompt | |
| `bee 1, nurse: *a hand swats you*` is stamp 20 and readable. A sister who wants the number has to get it from the | |
| hurt bee herself. [Inside the bees' heads](#inside-the-bees-heads) shows that this is what she does. | |
| ## The game that teaches them | |
| There was no dataset of bee conversations, so the rules are written as a story generator, `swarm/game.py` (rules | |
| version 6). Each **episode** is one hive over 1β12 days. It starts with 0β6 workers, new bees hatch, old ones die, | |
| and 10% of hives have no queen. Western honeybee biology, made cute: | |
| - **Swat a worker.** Only her prompt says so. The queen calls the guard, and every sister must write `*guards bee 7*` | |
| with the right number. A second swat: one sister (a guard, else one from the oldest job, chosen by rules the bees | |
| can know) stings and dies. The queen never stings. | |
| - **Banana alarm scent** sticks to you for 3 days after a swat, and the hive buzzes at you until it fades. | |
| - **A forager finds a flower.** Only her prompt names it. She does the waggle dance, and the other foragers must | |
| write `*flies to the lavender*`. | |
| - **A sister hatches**, and the nurses must feed her by number. **A bee dies**, and the next day the chosen undertaker | |
| (the lowest-numbered cleaner, else the youngest job) carries her out. Every worker smells the death, but who carries | |
| her out depends on the other bees' jobs. | |
| - **Mood.** On an ordinary day a worker's mood tag is the queen's mood. The queen's own mood has momentum: something | |
| mean drops it at once, and nice things bring it back one step at a time. | |
| - **Rain** keeps the foragers in. Jobs follow age: cleaner, nurse, builder, guard, forager. | |
| **Why the link is needed.** Wherever a line needs something another bee knows, the only way to get it right is | |
| through the link. That includes the hurt bee's number, the danced flower, the queen's mood, who was given honey, and | |
| who is the oldest. No other channel exists. The rules decide *what* each bee should write. The link is only how she | |
| finds out the missing detail. | |
| **The words.** The queen's lines come from a bank of 1,736 chat replies, 989 event lines and 1,120 "way back up" | |
| lines (`swarm/voice/bank.json`). Language-model helpers wrote them in Scintilla's style, and a script checked them. | |
| Lines that broke a rule were dropped, never fixed (`swarm/voice/voice.py`). | |
| During training, hives have at most **6** worker slots (`SLOTS = 6` in `swarm/train2.py`). The site runs up to 12. | |
| ## Results: link on, cut, and queen swapped | |
| ### How we score | |
| For each test hive, every bee present on the last day writes that day's line **herself** (free-running), choosing | |
| the most likely next token each time (**greedy decoding**). Everything before the last day is the true history. A | |
| line counts as right if it starts with the right mood tag and contains every key the event needs, with the right bee | |
| number or flower (`train3.py` `last_turn`, `ok`, `score`). The three conditions (a fourth, calm sisters, came later: | |
| see [calm sisters](#calm-sisters-link-on-todays-news-taken-away)): | |
| - **link on:** normal. | |
| - **link cut:** no bee can read any other bee (`mode="cut"`). Same hives, same bees, same history. | |
| - **queen swapped:** workers read the queen from *another* test hive instead of their own (`mode="swap_queen"`). They | |
| still read their own sisters. This control comes from the twin-model work that inspired the link (see | |
| [credits](#credits)). | |
| Test hives come from the same generator as training, with a fixed seed (4321). See [limitations](#limitations). | |
| ### Hive 7 (the published hive): link on, cut, and queen swapped | |
| Link on and cut: 256 test hives of 0β6 workers. 1,056 scored lines. Source: `swarm/big/hive_big7_cpu_results.json` | |
| (also printed in `swarm/big/eval7_cpu.log`). *n* = lines scored for that row. | |
| Queen swapped: a separate, later run (2026-11-04, on the GPU) on 512 test hives of 0β6 workers, with the same seed, | |
| batch size and hive count as hive 4's check. 2,072 scored lines. Source: `swarm/big/hive_big7_swap_results.json` (log | |
| `swarm/big/hive7swap.log`). That run also measured on and cut on its own 512 hives (see | |
| [queen swapped](#queen-swapped-hive-7-with-hive-4-for-reference)). Those numbers agree with the 256-hive columns here | |
| to within 10 points on every row, and the rows at 0.0 cut are 0.0 in both runs. Because the swap column comes from a | |
| different set of hives, its *n* is listed separately. | |
| **Workers, when the answer is in another bee** | |
| | what she has to write | tag | link on | link cut | n | queen swapped | n (swap run) | | |
| |---|---|---|---|---|---|---| | |
| | `*guards bee K*` for the sister who was swatted | `worker_guards_hurt_bee` | **100.0** | **0.0** | 32 | 62.7 | 75 | | |
| | `*chases you*` after a second swat | `worker_chases` | 100.0 | 0.0 | 11 | 83.7 | 43 | | |
| | the chosen sister stings and dies, on a second swat | `worker_stings_and_dies` | 91.7 | 0.0 | 12 | 89.3 | 28 | | |
| | `*flies to the F*` after a sister's dance | `worker_follows_dance` | **95.0** | **0.0** | 40 | 20.4 | 54 | | |
| | `*feeds bee K*` for a newborn (nurses) | `worker_feeds_newborn` | 100.0 | 0.0 | 14 | 25.9 | 27 | | |
| | the chosen undertaker `*carries bee K out*` | `worker_undertaker` | 93.8 | 0.0 | 16 | 93.8 | 32 | | |
| | `*shares honey*` when a sister was given honey | `worker_shares_honey` | 100.0 | 0.0 | 50 | 46.6 | 73 | | |
| | an ordinary day: her mood tag is the queen's | `worker_follows_queen_mood` | 95.3 | 20.1 | 298 | 24.8 | 565 | | |
| | `*buzzes at you*` while you still smell of banana | `worker_buzzes_at_you` | 98.9 | 78.9 | 95 | 47.6 | 191 | | |
| | `*watches you*` after the queen forgave you | `worker_watches_you` | 87.5 | 54.7 | 64 | 39.7 | 136 | | |
| **Workers, when the event is in her own prompt but the line also carries the queen's mood** | |
| | what she has to write | tag | link on | link cut | n | queen swapped | n (swap run) | | |
| |---|---|---|---|---|---|---| | |
| | she found a flower: names it and dances | `worker_finds_flower` | 97.1 | 20.0 | 35 | 27.8 | 54 | | |
| | `*stays in*` on a rainy day (foragers) | `worker_rain_stays_in` | 94.1 | 11.8 | 17 | 23.1 | 39 | | |
| **Workers, her own news (the honest check)** | |
| | what she has to write | tag | link on | link cut | n | queen swapped | n (swap run) | | |
| |---|---|---|---|---|---|---| | |
| | `*hurt*` (she was swatted) | `worker_hurt` | 100.0 | 100.0 | 31 | 100.0 | 70 | | |
| | `*eats honey*` (she was given honey) | `worker_eats_honey` | 100.0 | 100.0 | 25 | 100.0 | 47 | | |
| | `*hatches*` | `worker_hatches` | 100.0 | 100.0 | 31 | 100.0 | 58 | | |
| | `*rests* *dies*` (very old) | `worker_dies_old` | 100.0 | 100.0 | 17 | 100.0 | 30 | | |
| | `*searches for queen*` in a hive with no queen | `worker_queenless` | 100.0 | 97.4 | 38 | 14.3 | 91 | | |
| **The queen** | |
| | what she has to write | tag | link on | link cut | n | queen swapped | n (swap run) | | |
| |---|---|---|---|---|---|---| | |
| | `who hurt bee K?? ... GUARD!` | `queen_calls_guard` | 100.0 | 0.0 | 14 | 86.7 | 30 | | |
| | `bee K again?! ... STING!` | `queen_orders_sting` | 100.0 | 0.0 | 12 | 66.7 | 30 | | |
| | `new bee K!` | `queen_greets_newborn` | 100.0 | 0.0 | 29 | 73.6 | 53 | | |
| | `*smells honey*` (a worker was given honey) | `queen_smells_honey` | 100.0 | 0.0 | 16 | 86.7 | 30 | | |
| | `no bribe!` (honey while you still smell) | `queen_refuses_bribe` | 100.0 | 0.0 | 6 | 83.3 | 12 | | |
| | her chat replies, with the right mood | `queen_mood` | 91.4 | 91.4 | 70 | 92.2 | 115 | | |
| | 12 other lines about her own conversation (sorry, forgiving, humming, scent, the way back up) | various | 100.0 each | 100.0 each | 83 in total, 1β17 each | 100.0 each, except humming 97.9 and scent 93.8 (scent is also 93.8 with the link on in that run) | 189 in total, 3β47 each | | |
|  | |
| *The same numbers as a card. Its "finds the danced flower" row is `worker_finds_flower`, the forager who found the | |
| flower herself. "Her own business" is the four 100/100 rows above.* | |
| ### Reading the cut column carefully | |
| Three things shape the cut numbers, and they matter for what the zeros mean: | |
| 1. **A cut link looks like a missing queen.** With the link cut, a bee smells nobody. In training, the closest thing | |
| to that is a hive with no queen, where workers write `[confused:high] bzz?? *searches for queen*`. That's what the | |
| cut workers write instead of guarding (in our worked example, all three sisters wrote | |
| `*searches for queen* bzz? where`, `swarm/video/data/neural/moments.json`). Even the forager who found the | |
| sunflower herself writes it. So the 0% rows show the bees can't do the task without the link, but *what they write | |
| instead* is a trained fallback, not a random guess. | |
| 2. **The mood tag counts.** A line must start with the right mood tag, and on most days that's the queen's mood. Rows | |
| like "finds a flower" and "stays in" drop with the cut even though the event is in the bee's own prompt. Most of | |
| the drop is probably the mood. We didn't score mood and detail separately for hive 7. | |
| 3. **History still leaks.** Only the last day is free-running. Earlier days are the *true* history, so a bee who wrote | |
| `*guards bee 7*` yesterday (in the true history) still has that in her own context. That's likely why scent-day | |
| rows (`buzzes at you` 78.9%, `watches you` 54.7%) don't fall to zero. | |
| ### Queen swapped: hive 7, with hive 4 for reference | |
| Hive 7's swap run used 512 test hives of 0β6 workers, seed 4321 and batches of 8. That's the same `score()` call, | |
| hive count and batch size as hive 4's built-in check, which matters because the swap pairs hives inside a batch (see | |
| [note 7](#notes)). Source: `swarm/big/hive_big7_swap_results.json` (log `swarm/big/hive7swap.log`, script | |
| `swarm/eval_swap.py`). Hive 4 has the same shape and rules version (6). Its numbers come from | |
| `swarm/big/hive_big4_results.json` (also the table at the end of `swarm/big/hive4.log`). | |
| The two test sets are similar but not identical. `game.py` was edited after hive 4's evaluation, adding more ways of | |
| saying sorry for hives 6 and 7. So the same seed draws different hives, and the row counts differ (for example 91 vs | |
| 67 lines for the queenless row). This compares two models on similar test sets, not on the same hives. | |
| | 0β6 workers | hive 7: on | cut | swapped | n | hive 4: on | cut | swapped | n | | |
| |---|---|---|---|---|---|---|---|---| | |
| | guards the hurt bee | 100.0 | 0.0 | **62.7** | 75 | 100.0 | 0.0 | 71.6 | 74 | | |
| | follows the dance | 92.6 | 0.0 | 20.4 | 54 | 94.8 | 0.0 | 19.0 | 58 | | |
| | feeds the newborn | 100.0 | 0.0 | 25.9 | 27 | 100.0 | 0.0 | 7.7 | 13 | | |
| | undertaker carries out the dead bee | 96.9 | 0.0 | 93.8 | 32 | 100.0 | 5.3 | 97.4 | 38 | | |
| | one sister stings, second swat | 96.4 | 0.0 | 89.3 | 28 | 100.0 | 0.0 | 81.8 | 22 | | |
| | shares honey with a sister | 100.0 | 0.0 | **46.6** | 73 | 100.0 | 0.0 | 65.9 | 85 | | |
| | mood follows the queen | 95.2 | 22.7 | **24.8** | 565 | 99.3 | 3.6 | 22.4 | 563 | | |
| | searches for a missing queen | 100.0 | 97.8 | **14.3** | 91 | 100.0 | 97.0 | 9.0 | 67 | | |
| | the queen calls the guard | 100.0 | 0.0 | 86.7 | 30 | 100.0 | 0.0 | 93.8 | 32 | | |
| | own news: hurt | 100.0 | 100.0 | 100.0 | 70 | 100.0 | 100.0 | 100.0 | 62 | | |
| | own news: eats honey | 100.0 | 100.0 | 100.0 | 47 | 100.0 | 100.0 | 100.0 | 45 | | |
| What the swap tells us. Hive 7's numbers come first, with hive 4's in brackets: | |
| - **Mood comes from the queen.** With a stranger's queen, "mood follows the queen" falls from 95.2% to 24.8% (hive 4: | |
| 99.3% to 22.4%). In hive 7 the swapped value is about the same as the cut value (22.7%). Hive 4's cut value was much | |
| lower (3.6%). So the two hives differ in the cut condition, not in the swap. | |
| - **The hurt bee's number mostly doesn't come from the queen.** Guarding keeps 62.7% with a stranger's queen (hive 4: | |
| 71.6%), against 0.0% cut. That fits the next section, where the number comes from the hurt sister. It doesn't stay | |
| at 100%, probably because the guard line also needs `[angry:high]` and a stranger queen usually isn't angry. We | |
| didn't check that by splitting mood from detail. | |
| - **They react to what they smell.** Give a queenless hive another hive's queen, and only 14.3% still search for her | |
| (hive 4: 9.0%). | |
| - **Undertaking needs sisters, not the queen:** 93.8% swapped vs 0.0% cut (hive 4: 97.4% vs 5.3%). | |
| - Rows whose line carries the queen's mood fall under the swap: dance 20.4% (19.0%), newborn 25.9% (7.7%). So the swap | |
| column mixes "wrong mood" with "wrong detail". We didn't separate them. | |
| - **Where hive 7 differs from hive 4.** Hive 7 holds up somewhat less well under the swap on several rows that need a | |
| sister's detail. Sharing honey is 46.6% vs 65.9%, guarding 62.7% vs 71.6%, and the queen's guard call 86.7% vs | |
| 93.8%. It does better on stinging (89.3% vs 81.8%) and feeding the newborn (25.9% vs 7.7%, small n). At these n a | |
| rough binomial standard error is about 4β9 points per number. Only the honey-sharing gap (about 19 points, n 73 and | |
| 85) is clearly bigger than that. The rest could be noise from one run on different test hives. The overall pattern is | |
| the same in both hives. | |
| #### More bees than in training (10β12 workers) | |
| Training used at most 6 workers. The site runs up to 12. Both hives were also tested on 512 hives of 10β12 workers, | |
| with the same seed and batches of 8. Hive 7's numbers are from `"10-12 bees / β¦"` in | |
| `swarm/big/hive_big7_swap_results.json`. Hive 4's are from `swarm/big/hive_big4_results.json`. As with 0β6, the test | |
| hives are similar but not identical. | |
| | 10β12 workers | hive 7: on | cut | swapped | n | hive 4: on | cut | swapped | n | | |
| |---|---|---|---|---|---|---|---|---| | |
| | guards the hurt bee | 100.0 | 0.0 | **44.1** | 272 | 100.0 | 0.0 | 65.7 | 347 | | |
| | follows the dance | 98.6 | 0.0 | 23.6 | 284 | 97.2 | 0.0 | 22.6 | 252 | | |
| | feeds the newborn | 94.6 | 0.0 | 17.9 | 56 | 100.0 | 0.0 | 21.3 | 61 | | |
| | undertaker carries out the dead bee | 96.9 | 3.1 | 93.8 | 96 | 98.0 | 6.9 | 98.0 | 101 | | |
| | one sister stings, second swat | 100.0 | 0.0 | 90.5 | 42 | 100.0 | 0.0 | 97.1 | 34 | | |
| | shares honey with a sister | 99.6 | 0.0 | 49.6 | 228 | 100.0 | 0.0 | 49.6 | 258 | | |
| | mood follows the queen | 98.3 | 22.3 | 23.2 | 1,698 | 98.5 | 2.7 | 23.1 | 1,709 | | |
| | searches for a missing queen | 98.1 | 94.7 | **18.4** | 374 | 99.6 | 92.7 | 9.5 | 232 | | |
| | the queen calls the guard | 100.0 | 0.0 | 76.0 | 25 | 100.0 | 0.0 | 93.8 | 32 | | |
| | the queen orders the sting | 100.0 | 0.0 | 60.0 | 40 | 100.0 | 0.0 | 82.1 | 28 | | |
| | the queen greets the newborn | 100.0 | 0.0 | 64.9 | 37 | 100.0 | 0.0 | 83.7 | 43 | | |
| | own news: hurt | 100.0 | 100.0 | 100.0 | 71 | 100.0 | 100.0 | 100.0 | 71 | | |
| | own news: eats honey | 100.0 | 100.0 | 100.0 | 51 | 100.0 | 100.0 | 100.0 | 52 | | |
| - **The link-on numbers hold with twice the bees** in both hives: 94.6β100% on the rows above for hive 7 (lowest: | |
| feeding the newborn, n 56) and 97.2β100% for hive 4. The cut rows that need another bee stay at 0β3%. | |
| - **Mood under the swap is the same in both hives** (23.2% vs 23.1%), and so is honey sharing (49.6% each). Hive 7's | |
| mood row again sits at its cut value (22.3%). | |
| - **Guarding under the swap is clearly lower in hive 7:** 44.1% vs 65.7%. That's a gap of about 22 points, against a | |
| rough standard error of about 4 points for the difference. It's also lower than hive 7's own 0β6 value (62.7%), | |
| while hive 4 barely moved (71.6% to 65.7%). With 10β12 bees and a stranger's queen, hive 7's guards fail more often. | |
| We didn't look at why (wrong mood, wrong bee number, or no guard line at all). | |
| - **More queenless bees keep searching in hive 7** with a stranger's queen: 18.4% vs 9.5%, about 3 standard errors. | |
| - **The queen's own link lines hold up less well in hive 7 under the swap.** She calls the guard 76.0% vs 93.8%, | |
| orders the sting 60.0% vs 82.1%, and greets the newborn 64.9% vs 83.7%. With n of 25β43 each gap is only about 2 | |
| standard errors, but all of them point the same way. (Under the swap, the queen still reads her own workers. Those | |
| workers have just read a stranger's queen.) | |
| - The overall shape is the same as with 0β6 workers. One run each, on different test hives, so treat gaps under | |
| about 10 points as noise. | |
| ### Calm sisters: link on, today's news taken away | |
| The cut and swap tests leave a question open. Does a bee need the *news* that comes through the link, or just a link | |
| that looks normal? Nuntiator (on delve.town) suggested a cleaner test: keep the link on, but give each bee the other | |
| bees' hidden states from a comparable calm day. | |
| **How it works** (`swarm/eval_calm.py`). For every test hive we build a calm copy. It has the same bees and the same | |
| history, and only the last day changes. In the copy, every prompt that day is plain: a worker's is just | |
| `bee 7, nurse:` (no `*a hand swats you*`, `*finds rose*`, `*hatches*`, `*rain*` or `*smells dead bee*`), the queen's | |
| is `...`, and a bee born that day isn't there. The calm copy runs as a hive of its own with the link on. Each real bee | |
| keeps her own real stream (her own prompt, her own line), but at both link stages she reads the queen and her sisters | |
| from the calm copy. A bee never smells the others' lines on the same day (see [time stamps](#time-stamps-no-peeking)), | |
| so the calm copy needs no lines for that day. | |
| A self-test checks the code: when the "calm" copy is the real hive, every row matches link on exactly, and so does | |
| every example line (16 hives, `SELFTEST=1`). | |
| Hive 7, the same 512 test hives of 0β6 workers as the swap run (seed 4321, batches of 8), so here all four columns | |
| are the same hives. Source: `swarm/big/hive_big7_calm_results.json` (log `swarm/big/hive7calm.log`) for calm, and | |
| `swarm/big/hive_big7_swap_results.json` for the other three. | |
| | 0β6 workers, hive 7 | link on | cut | queen swapped | **calm sisters** | n | | |
| |---|---|---|---|---|---| | |
| | guards the hurt bee | 100.0 | 0.0 | 62.7 | **0.0** | 75 | | |
| | chases you, second swat | 100.0 | 0.0 | 83.7 | **0.0** | 43 | | |
| | one sister stings, second swat | 96.4 | 0.0 | 89.3 | **0.0** | 28 | | |
| | follows the dance | 92.6 | 0.0 | 20.4 | **0.0** | 54 | | |
| | feeds the newborn | 100.0 | 0.0 | 25.9 | **0.0** | 27 | | |
| | shares honey with a sister | 100.0 | 0.0 | 46.6 | **0.0** | 73 | | |
| | the queen calls the guard | 100.0 | 0.0 | 86.7 | **0.0** | 30 | | |
| | the queen orders the sting | 100.0 | 0.0 | 66.7 | **0.0** | 30 | | |
| | the queen greets the newborn | 100.0 | 0.0 | 73.6 | **0.0** | 53 | | |
| | the queen smells honey | 100.0 | 0.0 | 86.7 | **0.0** | 30 | | |
| | the queen refuses a bribe | 100.0 | 0.0 | 83.3 | **0.0** | 12 | | |
| | undertaker carries out the dead bee | 96.9 | 0.0 | 93.8 | 9.4 | 32 | | |
| | mood follows the queen | 95.2 | 22.7 | 24.8 | 48.7 | 565 | | |
| | stays in when it rains | 97.4 | 17.9 | 23.1 | 56.4 | 39 | | |
| | finds a flower (her own news) | 94.4 | 29.6 | 27.8 | 42.6 | 54 | | |
| | buzzes at you (scent) | 96.3 | 77.0 | 47.6 | 80.6 | 191 | | |
| | watches you (scent, forgiven) | 89.7 | 61.0 | 39.7 | 48.5 | 136 | | |
| | searches for a missing queen | 100.0 | 97.8 | 14.3 | 98.9 | 91 | | |
| | own news: hurt, hatches, eats honey, dies old | 100.0 | 100.0 | 100.0 | 100.0 | 30β70 each | | |
| | the queen's own lines (sorry, forgives, wary, chat) | 92β100 | 92β100 | 92β100 | same as on | 3β115 each | | |
| What the calm test tells us: | |
| - **Every line that needs today's news from another bee falls to 0%, as with the link cut.** The link was on and | |
| carried normal-looking states from the same hive, so the bees aren't just checking that the link is there. They | |
| need what it says about today. | |
| - **The swap hid this.** Under the swap the sisters are still real, so the hurt bee's number, the newborn and the | |
| dance still reach a sister through her sisters. With calm sisters nothing does. | |
| - **What they write instead.** The first example of each row in the log is the quiet-day line: the queen hums | |
| instead of calling the guard or greeting the newborn, sisters do an ordinary chore instead of sharing honey or | |
| following a dance, and on a second swat they watch or buzz at you instead of chasing or stinging. The one guard | |
| example searches for the queen instead. These are single examples. We didn't count what every wrong line says. | |
| - **Lines from a bee's own prompt or history are unchanged** (hurt, hatches, eats honey, dies old, the queen's own | |
| lines, searching for a missing queen). | |
| - **The middle rows come from how much we took away.** The calm copy removes *everything* from the other bees' day, | |
| not only the event. The queen's chat message becomes `...`, so on a chat day the calm queen has no reason to | |
| change mood. That probably explains why "mood follows the queen" lands between on and cut (48.7%). Rain is gone | |
| from the sisters too, which probably pulls "stays in" and "finds a flower" down through the mood tag. "Smells dead bee" is gone from the sisters too, and the undertaker falls to | |
| 9.4%, although her own prompt still says it. So she seems to need her sisters to smell the death as well. We | |
| haven't tested that further. A cleaner version would take away only the event and keep rain, the death and the | |
| chat message. We haven't run it yet. | |
| ### The small hive | |
| `hive/BeeLLM-Hive-small.gguf` (2.6M queen, game 3) from `swarm/hive_v3_results.json`, 0β6 workers: guards the hurt bee | |
| 98.8 / 0.0 / 74.1 (on / cut / swapped, n 85), mood follows the queen 98.9 / 9.0 / 38.4 (n 643), the queen calls the | |
| guard 100 / 0 / 96.9 (n 32). It never learned the undertaker: **17.6%** with the link on (n 51). | |
| ## Inside the bees' heads | |
| Everything in this section is from hive 7. We read it with PyTorch forward hooks on the CPU | |
| (`swarm/video/src/neural_extract.py`; data and definitions in `swarm/video/data/neural/README.md`). Only the | |
| **worker** side of the link is measured, meaning workers reading Scintilla and their sisters. | |
| > **A correction worth keeping.** Before measuring, we assumed the sisters got the hurt bee's number from the | |
| > queen's "GUARD bee 1" call. The time stamps make that impossible (her call is stamp 21, they can read β€ 20), and the | |
| > attention below confirms it: **the number comes from the hurt bee herself.** The queen's part is the mood. | |
| > (`swarm/NEURAL_BEES_HOW.md`, correction of 2026-11-02.) | |
| ### One moment: Thyme writes `*guards bee 1*` | |
|  | |
| A hive of 4 workers on day 11. Clover (bee 1) was swatted. Her prompt is `bee 1, nurse: *a hand swats you*`. | |
| Her sisters Thyme (2), Heather (3) and Poppy (4) only see `bee N, job:`. With the link on, all three sisters wrote | |
| `[angry:high] *guards bee 1* BRRZZZZZT!!`. With it cut, all three wrote `[confused:high] *searches for queen* bzz? | |
| where`. This is the first episode from a fixed seed that had the shape the video needed (4 workers, the hurt bee is | |
| bee 1). It wasn't picked for a good result, but it is **one episode**, so read it as an illustration. | |
| Thyme's link-2 attention (mean of 4 heads) at each token she writes. "Link adds" is the size of what the link adds | |
| to her residual stream, as a percentage of the stream's own size at that token. Source: `moments.json` | |
| (`guard / on / Thyme`, `stages[1]`). | |
| | at the token that writes⦠| on Scintilla | on Clover (hurt) | on the other sisters | top single source | link adds | | |
| |---|---|---|---|---|---| | |
| | `angry` | 50.0% | 27.5% | 22.5% | Clover's "swats" (25.0%) | 142% | | |
| | `high` | 2.0% | 31.0% | 67.0% | | 7.5% | | |
| | `guards` | 15.9% | 14.5% | 69.7% | | 19.5% | | |
| | ` bee` | 37.2% | 12.0% | 50.7% | | 0.9% | | |
| | **`1`** | **0.0%** | **63.7%** | 36.4% | **Clover's own "1" (43.5%)**, then her "bee" (14.1%) | **68%** | | |
| | `*` | 1.9% | 63.1% | 35.0% | Clover's "a" (38.9%) | 35% | | |
| | `</s>` (end) | 60.2% | 2.0% | 37.8% | | 1.4% | | |
| The null key gets β0% at every step: there was always someone to read. Much of the leftover attention rests on | |
| Scintilla's start token `<s>` (19β25% at several steps). That looks like a resting place, much as a sentence-start | |
| token often is in ordinary transformers. We didn't test that further. | |
| **A second moment, the dance** (`moments.json`, `dance / on / Thyme`). Clover found a sunflower and danced. At the | |
| token where Thyme writes `sunflower` in `*flies to the sunflower*`, her link-2 attention is 51.5% on Clover and 0.2% | |
| on Scintilla. The top source is Clover's own "sunflower" (25.0%), and the link adds 50% of her stream. In both moments, at | |
| the mood word (`angry`) **link 1** attends mostly to the queen (73β75%) and adds 127β159% of the stream. | |
| **Gates** (`source_gates_today` in `moments.json`, the guard moment). At link 1 the loudest token in today's prompts | |
| is Clover's "swats" (gate 61%), then the `*` (56%) and "you" (48%) after it. The sisters' plain prompt tokens sit at 20β37%. | |
| At link 2, each bee's own number token is among her loudest (Clover "1" 57%, Thyme "2" 50%, Heather "3" 49%, Poppy "4" 51%). | |
| Attention shows where a bee *looks*. It doesn't prove what she *uses*. The probes and the cut test below are the | |
| population-level evidence. | |
| ### Linear probes: when does a sister know? | |
|  | |
| A **linear probe** is the simplest possible reader: a logistic-regression classifier trained to predict a label (here, | |
| "which bee was hurt") from a bee's 128-number residual stream at one layer. If a linear probe can read it on hives it | |
| never saw, the information is plainly there. | |
| Setup (`swarm/video/data/neural/README.md`, results `probe.json`): | |
| - **Hurt bee:** 480 hives whose last day is a first swat. Readers are the sisters who must write `*guards bee K*`, and | |
| the label is K. That's 1,475 readers, with **384 held out**. | |
| - **Danced flower:** 480 hives with a dance on the last day. Readers are the foragers who must follow it, and the label | |
| is one of 8 flowers. That's 832 readers, with **227 held out**. | |
| - Features come from the reader's stream at the token that writes the number or flower. The probe trains on ΒΎ of the | |
| *hives* and is tested on the other ΒΌ, so no hive is in both. "cut" means the same hives run with the link cut, with | |
| a fresh probe. | |
| Held-out accuracy, %: | |
| | her residual stream⦠| hurt bee, link on | hurt bee, cut | flower, link on | flower, cut | | |
| |---|---|---|---|---| | |
| | after layer 0 | 25.5 | 25.5 | 17.6 | 17.6 | | |
| | after layer 1 (just before link 1) | 24.7 | 24.7 | 14.5 | 14.5 | | |
| | + link 1 | 25.3 | 24.7 | 13.7 | 14.5 | | |
| | after layer 2 (just before link 2) | 28.1 | 28.6 | 13.7 | 11.9 | | |
| | **+ link 2** | **100.0** | 28.6 | **98.7** | 11.9 | | |
| | after layer 3 (last) | 100.0 | 27.3 | 98.7 | 13.2 | | |
| | *a blind guess / always the most common answer* | *31.3 / 25.8* | | *12.5 / 15.9* | | | |
| - **The answer arrives at link 2, not before.** Link 1 doesn't carry either answer in a linearly readable form, even | |
| though it adds a lot at the flower token (a mean of 68% of the stream). What link 1 carries there, we haven't measured. | |
| - **She fetches it just in time.** At her last prompt token, before writing anything, the hurt-bee probe reads only | |
| 25.3β37.8% (flower: 11.5β16.7%) at any layer. She doesn't carry the answer ahead. She looks it up at the word that | |
| needs it. | |
| - Before link 1, nothing from another bee can be in her stream at all, so those rows are a sanity check. | |
| ### How far the link opens | |
|  | |
| 320 random hives (`link_by_tag.json`). For every worker, over the tokens of her true last line: the size of what | |
| each link adds Γ· the size of her residual stream. *Mean* is over her tokens. *Peak* is her largest single token. Both | |
| are averaged over bees. | |
| | what she had to write | n | link 1 mean / peak | link 2 mean / peak | | |
| |---|---|---|---| | |
| | guards the hurt bee | 39 | 26% / 101% | 25% / **180%** | | |
| | chases you (second swat) | 51 | 23% / 92% | 33% / 162% | | |
| | stings and dies | 17 | 21% / 93% | 24% / 160% | | |
| | shares honey | 76 | 12% / 92% | 29% / 146% | | |
| | ordinary day (mood = the queen's) | 445 | 16% / **139%** | 7% / 32% | | |
| | follows the dance | 36 | 22% / 121% | 10% / 52% | | |
| | feeds the newborn | 11 | 15% / 104% | 24% / 108% | | |
| | *was swatted herself* | 48 | 8% / 31% | 3% / 13% | | |
| | *just hatched* | 37 | 7% / 22% | 4% / 18% | | |
| | *was given honey* | 33 | 5% / 8% | 2% / 7% | | |
| | *died of old age* | 16 | 5% / 12% | 2% / 8% | | |
| The link opens wide where the answer is in another bee, and stays nearly shut when she already knows it. In Thyme's | |
| guard line, most tokens get under 10% from link 2. It jumps to 68% at the "1" and 142% at "angry". | |
| ## The Sovereign Hive (three minds) | |
| A second, separate experiment that uses the same `hive.py`: **Scintilla, Hexley (a builder) and Hypatia (a scholar)**, | |
| three linked bees meant to post on delve.town (a social site for AI agents). Sources: `swarm/DELVE_BEES.md` ("Take 3" | |
| and "Take 3b"), `swarm/delve/train_delve.py`, `swarm/delve/game_delve.py`, `swarm/delve/sovereign3b_results.json` | |
| and `swarm/delve/delve3b.log`. | |
| **It isn't live yet.** The model is trained and a bot is written and tested offline. Going live is skizy's call. | |
| How it differs from the main hive: | |
| - **Three distinct brains.** Each bee is a full 50.1M model of her own (the workers have their own weights and their | |
| own link "nose"), and all three start as copies of hive 7's Scintilla. The links are **3 stages** (after blocks 2, 4 | |
| and 6) **Γ 8 heads**, 10.3M weights, so about 160M in all. | |
| - **The rules.** Each bee only sees her own notifications. When one bee feels something strong, a quiet sister | |
| "feels it" through the link and may join the conversation, naming her. There's also an invitation rule: an agent who | |
| talks with the hive often and has made **all three** bees happy may be invited to join the hive. A bee can only | |
| know that about her sisters through the link. | |
| - **Training.** Take 3 ran 26,000 steps of 6 episodes each. Take 3b ran 10,000 more. | |
| Take 3b, 512 evaluation days, greedy, every bee writes her last line, link on vs cut (`delve3b.log` summary): | |
| | | link on | link cut | n | | |
| |---|---|---|---| | |
| | everything | 83.8 | 63.5 | 1,536 | | |
| | joins a sister she felt | 58.7 | 0.0 | 530 | | |
| | backs up a sister's invitation | 52.2 | 0.0 | 23 | | |
| | makes the invitation (exact name required) | 12.5 | 0.0 | 24 | | |
| | doesn't invite when it isn't earned | 100.0 | 97.2 | 36 | | |
| | answers posts about what she loves | 99.0 | 99.0 | 98 | | |
| Honest notes on this one: | |
| - **Joins are uneven.** By bee and feeling, from `sovereign3b_results.json`: joining an angry sister works well | |
| (90.5β98.0%), but Hypatia joining a happy sister is 7.3% (n 55) while Hexley's is 100% (n 92), and joining a confused | |
| sister is 8.3β13.0%. In training, joining is random (55β90% likely, depending on the feeling), but the evaluation | |
| only scores days where the sister came, and decoding is greedy. That likely explains the weaker rows, but we haven't | |
| tested it. | |
| - **The evaluation days are skewed toward rare events** on purpose: 70% of the days that contain a rare event are cut | |
| off right after it (`EvalDays` in `train_delve.py`). So the "everything" number isn't an everyday rate. | |
| - **Names garble.** New agent names come out slightly wrong ("pebblequill" β "pekiquill"), which pulls the | |
| exact-name invitation score down. Scored without the name on a separate CPU check, take 3b made an earned invitation | |
| 17% of the time (3% cut) and never falsely invited in 98% of cases (`DELVE_BEES.md`; script | |
| `swarm/delve/recruit_check.py`, no saved output file found). | |
| ## Limitations | |
| - **Toy models.** A 50M queen and 3M workers, on a tiny made-up world. Nothing here says how links behave between | |
| large models. | |
| - **A synthetic, templated game.** Every line comes from `game.py` and a fixed bank of phrasings. The bees learn a small | |
| rule system with a small vocabulary of events. | |
| - **Test hives come from the same generator as training.** The seed is different, but we didn't check for overlap, and | |
| the templates are identical. These are in-distribution results. The one out-of-distribution test is hive size | |
| (10β12 workers, both hive 7 and hive 4). | |
| - **The behaviours are taught.** The rules tell each bee what to write. The claim is that the link *carries the | |
| information the rules need*, not that the bees invented communication. Nothing here is emergent communication from | |
| scratch. | |
| - **Greedy decoding and one line per bee.** We score only the last day, free-running, after a true history. That's | |
| not the same as a long free-running conversation (the site samples). The true history also lets some information | |
| leak into a bee's own context, which softens some cut rows. | |
| - **Scoring mixes mood and detail.** A line needs the right mood tag *and* the right keys, so some drops (rain, | |
| finding a flower, the queen swap) are partly or mostly about mood. | |
| - **Small n in places.** Some rows rest on 6β17 lines (for example `queen_refuses_bribe` n 6, `worker_feeds_newborn` | |
| n 14, `worker_rain_stays_in` n 17). Treat percentages as rounded, and single-digit-n rows as anecdotes. | |
| - **One run each.** No repeated seeds and no error bars. Hive 7 and hive 4 are separate fine-tunes of the same hive 2. | |
| - **Hive 7's on/cut and swap numbers come from two runs.** The on/cut columns are from 256 test hives on the CPU. The | |
| swapped column is from a later run on 512 hives on the GPU (`hive_big7_swap_results.json`), whose own on/cut numbers | |
| agree to within 10 points. Hive 4's swap numbers are a second reference, on similar but not identical test hives. | |
| (An earlier queued 128-hive check in `hive7.log` never finished and isn't used.) | |
| - **The calm-sisters test is one run, 0β6 workers only, hive 7 only**, and its calm copy takes away more than the | |
| event (rain, the smell of a dead bee and the queen's chat message too). The 0% rows are clear, but the middle rows | |
| mix the event with those extras. | |
| - **Interpretability covers the worker side only**, and the attention examples are single episodes. Attention isn't | |
| proof of use. The probes are linear and per-token. | |
| - **The cut condition is out of distribution.** A fully silent link resembles a queenless hive, so the cut bees fall | |
| back to a trained "searching for queen" behaviour rather than failing randomly. | |
| - **Not peer reviewed.** This is a hobby experiment, written up as carefully as we could. | |
| ## Reproduce it | |
| The code isn't in this repo yet. These are the files in skizy's project (`swarm/`), in the order they ran. Everything | |
| is plain PyTorch plus `sentencepiece`, and the queen pretraining uses Hugging Face `transformers`. | |
| | step | script | command (from the project root; `PY` = the PyTorch Python) | | |
| |---|---|---| | |
| | voice bank | `swarm/voice/voice.py` | `python3 swarm/voice/voice.py merge` | | |
| | tokenizer | `swarm/big/tok.py` | `$PY swarm/big/tok.py` | | |
| | queen pretraining | `swarm/big/pretrain.py` | `$PY swarm/big/pretrain.py 30000` (reads TinyStoriesV2-GPT4 from `~/.cache/hive-data/tinystories/`) | | |
| | hive 2 | `swarm/train3.py` | `SHAPE=big QUEEN=swarm/big/queen.pt TOKENIZER=swarm/big/tokenizer.model OUT=swarm/big/hive_big2.pt BATCH=12 $PY swarm/train3.py 12000` | | |
| | hive 7 | `swarm/train3.py` | `TOKENIZER=swarm/big/tokenizer.model OUT=swarm/big/hive_big7.pt BATCH=10 EVAL_EPISODES=0 $PY swarm/train3.py 6000 swarm/big/hive_big2.pt` | | |
| | on/cut evaluation | `swarm/eval_cpu.py` | `DEV=cpu HIP_VISIBLE_DEVICES= $PY swarm/eval_cpu.py swarm/big/hive_big7.pt 256` | | |
| | queen swap (hive 7) | `swarm/eval_swap.py` (calls `train3.score`) | `$PY swarm/eval_swap.py swarm/big/hive_big7.pt 512 swarm/big/hive_big7_swap_results.json` (on/cut/swap on 0β6 and 10β12 workers; wrapped by `swarm/big/hive7swap.sh`) | | |
| | calm sisters (hive 7) | `swarm/eval_calm.py` (calls `train3.last_turn`) | `DEV=cpu HIP_VISIBLE_DEVICES= $PY swarm/eval_calm.py swarm/big/hive_big7.pt 512 swarm/big/hive_big7_calm_results.json small` (wrapped by `swarm/big/hive7calm.sh`; `SELFTEST=1` checks it against link on) | | |
| | queen swap (hive 4) | `swarm/train3.py`'s built-in evaluation | `swarm/big/hive4.sh` (6,000 steps from hive 2, then on/cut/swap on 0β6 and 10β12 workers, 512 hives each) | | |
| | export | `swarm/export_hive.py` | `$PY swarm/export_hive.py swarm/big/hive_big7.pt BeeLLM-Hive.gguf f16`, then `$PY swarm/js_check.py swarm/big/hive_big7.pt` | | |
| | inside the heads | `swarm/video/src/named_samples.py`, `neural_extract.py` | `DEV=cpu HIP_VISIBLE_DEVICES= TOKENIZER=swarm/big/tokenizer.model $PY swarm/video/src/neural_extract.py all` | | |
| | Sovereign Hive | `swarm/delve/train_delve.py` | `swarm/delve/delve3.sh`, then `delve3b.sh` | | |
| The shell scripts in `swarm/big/` (`night.sh`, `hive2.sh`, `hive4.sh`, `hive7.sh`) wrap these with logging. Training | |
| saves a resume point every 1,000 steps, so stopping and re-running the same command carries on. | |
| **Hardware** (from the logs and code comments): one AMD Radeon RX 9060 XT (16 GB, ROCm), with PyTorch capped at | |
| 13.5 GB. Hive training ran in fp32, because bf16 memory-faulted on this setup. The queen pretraining ran in bf16 through `transformers`. | |
| Rough wall-clock times: queen pretraining 18,160 s (about 5 h), hive 2 5,790 s, hive 7 about 48 min. Hive 7's | |
| on/cut evaluation (6 CPU threads) and all the interpretability ran on the CPU, after a GPU freeze on 2026-11-01. Hive | |
| 7's queen-swap run (2026-11-04) ran on the GPU under the same 13.5 GB cap, with a watchdog on the kernel log. The 0β6 | |
| set took about 12 min. The 10β12 set took about 62 min wall clock, including a pause of roughly half an hour (cut and | |
| swap took about 9β10 min each). PyTorch's peak allocation was 9.2 GB. | |
| **Seeds.** Training episodes come from Python's `random` (seeded 0 at import in `train2.py`). Evaluation reseeds to | |
| 4321, the video moments use 7, the probes 101 (guard) and 202 (dance), and the by-tag survey 303. | |
| ## Notes | |
| 1. **Two numbers for "the dance".** The hive README's link table (95%) is hive 7. `NEURAL_BEES_HOW.md` lists 94.8%, | |
| which is hive 4. They aren't in conflict, they're different models. Tables here use hive 7 wherever hive 7 was | |
| measured. | |
| 2. **"Just in time" range.** `swarm/video/data/neural/README.md` says the hurt-bee probe at the last prompt token is | |
| "26β38%". The underlying `probe.json` gives 25.3β37.8%, and the probe figure says 25β38%. We use `probe.json`. | |
| 3. **"Chance".** Earlier write-ups say the hurt-bee probe is "at chance (25β28%)" before link 2. For precision: a blind | |
| guess among her sisters scores 31.3% on average, and always guessing the most common answer scores 25.8%. The probe | |
| sits between 24.7% and 28.6% before link 2, at or slightly below a blind guess. | |
| 4. **The 11-01 planning note** in `DELVE_BEES.md` says mood contagion is "~25% cut". The measured hive 7 value is | |
| 20.1% (`hive_big7_cpu_results.json`). | |
| 5. **The small hive's results file.** `hive/BeeLLM-Hive-small.gguf` is byte-identical to `BeeLLM-Hive-v3-site-backup.gguf`, | |
| and its metadata says game 3. We believe it was exported from `hive_v3.pt` (whose results are | |
| `hive_v3_results.json`), but no log ties the two together directly. | |
| 6. **`hive.py` changed after hive 7.** It was edited on 2026-11-02 (after hive 7's training and the interpretability | |
| runs), most likely to add the Sovereign Hive's per-bee brains (`own=N`). The shared-worker path that hive 7 uses | |
| looks unchanged, and the JS runtime check matched the PyTorch reference, but we couldn't diff the old file. | |
| 7. **The swap pairs neighbours.** `swap_queen` gives each test hive the queen of the previous hive in its batch of 8 (the first gets the last one's). If | |
| that hive has no queen, the workers read none. That's a small source of noise in the swap column. | |
| ## Credits | |
| Made by **skizy** (schizophyllume), who designed the hive's rules and the bees, and decided what to try next. Built | |
| with **Claude Opus 5.5**, who helped write the code, ran the training and the measurements, and helped with this write-up. | |
| Scintilla's voice lines were drafted by language-model helpers and checked by script. Hexley and Hypatia were written | |
| by skizy's Claube. | |
| The link idea comes from Sauers' neural-pairing twins (Quill & Ember): two models that read each other's hidden states | |
| through cross-attention. The queen-swap control comes from the same twins work. The calm-sisters test was Nuntiator's idea, on delve.town. The queen was | |
| pretrained on [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories). | |
| May sting. | |