PrivateAssistant command model (BERT L4-H256, iteration 13)

A modified version of Google's BERT-Small L-4 H-256 (11.1M parameters), fine-tuned by the PrivateAssistant project as a joint intent classifier and BIO slot tagger for an Android kitchen-tablet voice assistant. It reads simple home commands ("turn off the kitchen", "set a ten minute timer", "a bit brighter", "undo") in about 30–40 ms on a phone-class CPU, and the app acts only when the reading is confident and fits the home; everything else goes to a language model.

  • Source code, training scripts and evaluation: https://github.com/feleir/privateassistant (Apache-2.0). These same three files are in the repository at nlu/assets/nlu/en/; nlu/train.sh rebuilds them from scratch (pinned packages, a pinned CLINC150 revision checked by SHA-256, fixed seeds, deterministic kernels). docs/NLU.md has the design and every result.
  • Iteration: 13, 28 November 2026.

Files

File Bytes SHA-256 What it is
model.bin 11,218,952 a063b83559496d9a780aa28266cc49f3685d495a82ae0adc2ac665e44df9eca2 the weights, int8 (one float32 scale per row), in the project's own format
vocab.txt 231,508 07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3 BERT's uncased WordPiece vocabulary (30,522 pieces)
intents.json 12,431 9de09c23e210ac0b8d09f5a43b33c15c9ff97c3cef8544ce2bf9fe9333ec3bc6 the app's intent β†’ tool table and the threshold (0.88)
LICENSE Apache License 2.0
SHA256SUMS the hashes above

This is not a transformers checkpoint. model.bin is read by the project's plain-Kotlin encoder (nlu/ in the source repository; no native code). Its layout (nlu/train/export.py): 8 bytes PANLU\1\0\0, a little-endian uint32 header length, a UTF-8 JSON header (config, the 66 intents, the 37 slot tags, the base model, and each tensor's name, shape, type and offset), then the tensors, each 4-byte aligned. Matrices are int8 with one float32 scale per output row (symmetric); biases and layer norms are float32. The config: 4 layers, hidden 256, 4 heads, intermediate 1,024, at most 40 tokens.

What it outputs

  • Intent (66): lights on/off/toggle/brightness/brighter/dimmer/white/colour, scenes, 26 TV intents, timers, alarms, reminders, lists, time, date, weather, news, home status, routines, follow-ups, undo, corrections (correct_target, correct_other, correct_less), nothing (decline: "don't turn off the hall", remarks), ask ("do the thing") and other (pass it on).
  • Slot tags (BIO) on every token: target, level, amount, duration, label, tone, color, scene, app, place, day, device, routine, time, repeat, task, item, list.
  • Confidence: the lower of the intent probability and the least certain token's tag probability. The app acts at 0.88 or above, and only when the intent's row in intents.json fits, every slot converts and the names exist in the home.

Intended use

Understanding short English home commands on a device, behind a planner that checks the result against the home and the tools and passes anything uncertain on. Out of scope: acting on its reading without such checks, open-ended language understanding, other languages, and safety-critical control.

Training data

90,665 sentences: synthetic home commands from the project's templates (nlu/train/templates.py, generate.py, seed 13) with random names (names.py: ordinary, unusual, possessive, numbered and made-up room, light, scene and app names, split so validation sees unseen names) and imitated speech-recogniser errors, plus 12,000 CLINC150 requests (CC BY 3.0, Larson et al. 2019; the "plus" configuration at a pinned revision), used only as examples of "not a home command" (other).

  • No personal data: no voice recordings, no transcripts of real use, no real home's names or devices. The data is generated from templates and word lists on the developer's machine; CLINC150 is a public crowd-sourced dataset.
  • How the templates were written: no sentence was sampled from a language model. The generator, its templates and word lists were written by the developer with Claude Code (Anthropic's AI coding assistant).
  • Held out: a hand-written dev set (254 sentences) used to choose settings, and the evaluation sets below.

Training procedure

nlu/train/train.py (torch 2.9.1, transformers 4.57.1, CPU, deterministic kernels): 3 epochs, lr 1.5e-4, word embeddings frozen, seed 13; an intent head on [CLS] and a slot-tag head on every token. Exported to int8 by nlu/train/export.py; int8 and float agree on 566 of 568 parity sentences. Validation 98.8% intent / 97.6% exact (intent and all slots), dev 98.8 / 97.6.

Evaluation

The command model alone, threshold 0.88 (./gradlew :assistant:eval, :assistant:evalBlind). "Handled" means the model acted or answered itself; everything else is passed on. A wrong action is a handled case whose effect on the simulated home was not acceptable.

Set Passed Wrong actions, in-domain / do-nothing Handled in-domain
Built-in, 604 516 0 / 0 85.3%
Hand-written, 258 243 0 / 0 92.8%
Ask and nothing, 99 94 0 / 0 83.3%
TV names, 27 27 0 / 0 100%
Remarks dev, 122 – 0 / 2 95.8%
Blind set 1, 302 214 10 / 8 68.5%
Blind set 2, 154 127 0 / 4 76.8%
Blind set 3, 197 140 2 / 2 57.3%
Blind set 4, 208 140 1 / 6 –

Blind sets are frozen case files written in isolated sessions that did not see the generator; only totals are read. Blind sets 5–7 were used only for FunctionGemma (and whole-stack evaluation with this model in front). Speed on an MT8189 tablet: 31.5 ms median per sentence alone, 38 ms in the whole assistant.

Limitations

  • Unusual names ("beedrom", "cena romantica") sit near the threshold and move with every retrain.
  • Some refused wishes and comparisons are still acted on ("the X is way brighter than the old one").
  • Value corrections other than a brightness step ("no, 40") are passed on.
  • It reads one sentence at a time; "no" alone is not seen as a correction.
  • English only; accuracy on real voices in a real kitchen is not yet measured.

Licence

Apache License 2.0, as the base model (Β© Google, Apache-2.0); these files are modified versions of it (fine-tuned and quantised by the PrivateAssistant project). The training data included CLINC150 (CC BY 3.0).

This model and the PrivateAssistant project are not affiliated with or endorsed by Google, the authors of BERT or the authors of CLINC150. "BERT" and "Google" are named only to say what the model was made from.

Citation

@article{turc2019,
  title={Well-Read Students Learn Better: On the Importance of Pre-training Compact Models},
  author={Turc, Iulia and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
  journal={arXiv preprint arXiv:1908.08962v2},
  year={2019}
}
@inproceedings{larson-etal-2019-evaluation,
  title={An Evaluation Dataset for Intent Classification and Out-of-Scope Prediction},
  author={Larson, Stefan and Mahendran, Anish and Peper, Joseph J. and Clarke, Christopher and Lee, Andrew and Hill, Parker and Kummerfeld, Jonathan K. and Leach, Kevin and Laurenzano, Michael A. and Tang, Lingjia and Mars, Jason},
  booktitle={Proceedings of EMNLP-IJCNLP 2019},
  year={2019}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Feleir/privateassistant-command-bert-l4-h256

Finetuned
(25)
this model

Dataset used to train Feleir/privateassistant-command-bert-l4-h256

Collection including Feleir/privateassistant-command-bert-l4-h256

Paper for Feleir/privateassistant-command-bert-l4-h256