inference-at-home
Small text classifiers for the Hive, a swarm of small language models running in people's browser tabs. Each one runs in the browser, on the CPU, in WebAssembly, and decides what to do with a message before a language model answers it. The code that trains them is in hive-ml-classifier, and the code that runs them in a page is in hive-client.
Every classifier has its own folder with the weights (model.safetensors), config.json and tokenizer.json, and its own README.
| Folder | What it does | Base model | Size | Result |
|---|---|---|---|---|
classifiers/swarm-8x8 |
Puts a message in one of 64 topic cells (8 domains with 8 subjects each), so that the Hive can file and retrieve answers per cell. English only. | BAAI/bge-small-en-v1.5, 33 million parameters, int8 weights | 34 MB | 78.3% of 4,000 real questions land in an accepted cell, 82.8% of 2,091 Hive-style questions |
classifiers/intent |
The first Hive classifier. It puts a message in one of four intents: swarm, time, weather or other. |
prajjwal1/bert-mini, 11 million parameters, float32 weights | 43 MB | 94.4% accuracy and 94.3% weighted F1 on the held-out part of its 1,508 generated examples |
swarm-8x8 is the classifier the Hive uses now. intent stays here because pages that load it, such as the classifier demo on trucs.ai, still need it. The two folders have different label sets and are not interchangeable: read the labels from each folder's config.json (id2label) and not from a fixed list in code.
The two results are not comparable. intent was scored on a held-out part of the same generated set as its training data, with four coarse labels. swarm-8x8 was scored on real questions and on separately generated Hive-style questions, with 64 labels and a list of acceptable cells for each message.
Using a classifier
The files load with any safetensors reader. intent is a standard BertForSequenceClassification checkpoint with 4 labels. swarm-8x8 has two heads and int8 weights with per-row scales, and its README gives the format and a short Python example that reads it. Both run in the browser through the swarm-classifier crate of hive-client, which reads the label list from config.json.
License
Apache-2.0. The base models are MIT-licensed: prajjwal1/bert-mini and BAAI/bge-small-en-v1.5.