nirmata
Small language models that run on the computer you already have. No graphics card, no internet connection, and math and code answers that are checked before you see them.
- The smallest is 49 MB
- Eight models, installed and tested
- Runs on an ordinary processor
In development. Nothing is available to download yet.
How nirmata works
An eight-minute film for anyone, technical or not. It goes through everything below, narrated, with captions and chapters.
Read the narration
1What nirmata is
This is nirmata: a family of small language models that run on an ordinary computer. No graphics card. No internet connection. The smallest is forty-nine megabytes.
A language model is a program that has learned to continue text. Give it the start of a sentence, and it predicts what comes next, one small piece at a time. Those pieces are called tokens, and a token is about three quarters of a word.
2Why small
Most language models today are enormous, and they run in huge data centers. nirmata goes the other way. Its goal is the smallest, cheapest model that still does its job well.
Its files fit on a phone, a Raspberry Pi, or an old laptop. It runs on the ordinary processor that every computer has. Nothing you type ever leaves your machine. And every model was trained on a single rented graphics card, most of them in a few hours.
3A team of specialists
Instead of one big model that tries to do everything, nirmata is a team of specialists. One writes children’s stories. One solves grade-school math word problems. One writes short Python functions.
A coordinator reads your request and plans the work, and a verifier checks the math. The team grows by adding specialists, not by making one model bigger.
Each model comes in two sizes. Parameters are the numbers a model learns in training. The small size has about a hundred and fifty million of them, in a forty-nine megabyte file, and writes several hundred tokens a second on a single processor core. The medium size has about five hundred million, in a file of a hundred and seventy-two megabytes.
4Inside a model
Inside every model, each layer holds eight small experts. A router sends each word through just two of them. So the model has the room of eight experts, but each word costs only the work of two.
Most of those numbers are stored as just three values: minus one, zero, and plus one. That takes two bits each, so the files stay tiny. And the processor applies them with additions and subtractions, instead of multiplications.
There’s also a fast mode, which uses one expert per word instead of two. It’s up to about one and a half times faster, and only slightly less accurate.
5How a model learns
Building a model happens in stages. First, a general base model reads billions of words: plain English, stories, code, and math. The medium base read fourteen billion tokens, over about two days.
Then a copy of it specializes, reading only its own subject. Next, it learns the exact layout of the requests it will be given. Then its experts are trained down to those three values, learning from their own full-precision version as they go.
Finally, it practices. It answers thousands of questions, keeps only the answers that check out, and learns from them. A new version replaces the old one only if it does better on the same tests.
All the training text comes from public datasets, and every license is written into the model itself. Test questions are kept out of the training data, so the scores are fair.
6Checking the work
Small models make mistakes, so nirmata checks what it can. For a math problem, the math model writes sixteen short programs. The engine works out every answer exactly, and the verifier weighs the votes.
For code, the examples in your request become tests. The program runs against them, and it is rewritten until every test passes.
These checks are worth about as much as making the model three times bigger. With eight tries, the small code model matches the medium one with a single try.
7Working together
You can talk to one specialist by name. Or choose auto, and every specialist reads your message. The one that’s least surprised by it gives the answer.
Or choose team. Ask for several things at once, and the coordinator splits your request. It calls the right specialist for each part, and puts the answers back together.
Say you ask it to solve a word problem, then write a short story that ends with the answer. The math model finds twenty-nine dollars, with five programs out of five agreeing. Then the stories model writes the story.
The coordinator also chats on its own, uses a calculator for plain arithmetic, and can search a folder of your own documents to show you the passage you need.
8What it can do
Working as a team, the larger models go from fifty-seven to sixty-seven percent on grade-school math. And from forty-six to seventy-one percent on short Python tasks.
On the project’s own mixed test, where a request needs several skills at once, a single model gets about one in five right. The team gets seven in ten.
When you ask for a story about something, the stories model writes about exactly that, ninety-four times out of a hundred.
And it’s honest about its limits. It isn’t a general assistant, and it knows little about the wider world. The code model writes only Python. And it remembers only a short conversation.
9Where it runs
Everything runs on your own machine. A small program runs the models on Linux, Windows, and ARM computers. You can use them in a web page, in a desktop app, or from a Windows package with nothing else to install.
Other programs can talk to it through the same interface as OpenAI’s, so existing tools just work. And with one recipe file and a graphics card, you can train a specialist of your own on a folder of your documents.
10Private by default
It’s private by default. It works offline, and model-written code runs only if you allow it, inside a sandbox with strict limits. When you share it on a network, it asks for a key. And bad requests or broken model files are caught and refused.
11Where it stands
Today, eight models are installed and tested. A bigger rebuild of the medium models, trained on forty billion more tokens, is in training now, with results expected around October twenty-first.
Code that makes the models about three times faster on a processor is finished, and waiting to be merged. And nothing is published yet, because no license has been chosen.
Along the way, a few lessons stood out. Checking answers beat making models bigger. Better data beat everything else. And the way a question is laid out can matter as much as the training.
•In short
Small models. Checked answers. On hardware you already have. This is nirmata.
nirmata in one page
What it is. A family of small language models, and the software to run them, built from scratch. Each model is a “mixture of experts”: every word goes through only a few parts of the model. The largest parts are stored as just three values, −1, 0 and +1, which keeps the files small and lets an ordinary processor run them with additions and subtractions instead of multiplications.
What it does well. Each model is a specialist with one narrow job, and the engine checks their work: math answers are computed and voted on, and code is tested and rewritten until it passes. With those checks the larger models reach about 70% on grade-school math, on short Python tasks and on the project’s own test of mixed requests. One model on its own scores 57%, 46% and 20% on the same tests.
What it is not. It is not a general assistant. The models know little about the wider world, the code model writes only Python, and the coordinator can show you a passage from your documents but cannot yet write an answer from it.
| Measure | Small (170M) | Medium (500M) |
|---|---|---|
| Parameters, in all and used for each word | 151 million and 47 million | 507 million and 167 million |
| File size | 49 MB | about 172 MB |
| Models installed | stories, math, code | stories, math, code, coordinator, math verifier |
| Text it sees at once | 512 tokens | 1,024 tokens (the coordinator 2,048) |
| Speed on a processor, 1 and 8 threads | 276 and 748 tokens a second | 85 and 298 tokens a second |
| Memory while writing | 65 MB | 244 MB |
The family
Eight models are installed: the best version of each so far. A new version replaces an installed one only if it does better on the same problems.
Small
49 MB each. For phones, a Raspberry Pi and old laptops.
- nirmata-stories-s 0.2Continues children’s stories.0.339 bits per byte on unseen stories (lower is better)
- nirmata-math-s 0.4Turns a word problem into a short Python function whose value is the answer.41.3% on GSM8K, 47.6% with a vote of 11
- nirmata-code-s 0.3Writes short Python functions.39.3% on MBPP, 20.7% on HumanEval
Medium
About 172 MB each. For laptops and desktops.
- nirmata-stories-m 0.2Writes a story from a request, or continues yours.Writes about what was asked 94.3% of the time
- nirmata-math-m 0.2Turns a word problem into a short Python function.57.4% on GSM8K, 67.4% with 16 programs and the verifier
- nirmata-code-m 0.1Writes short Python functions.46.3% on MBPP, 31.7% on HumanEval
- nirmata-coordinator-m 0.5Plans the team’s work and chats on its own.59.5% on the mixed test at default settings; answers chat directly 83.3% of the time
- nirmata-math-verifier-m 0.1Judges math programs, so a vote counts the likely right ones more.67.4% on GSM8K in the team, against 65.5% for a plain majority
All the medium files together take about 860 MB. They are memory-mapped, so parts a request never touches cost no memory.
How it works
Eight experts, two at a time
Inside each layer of a model sit eight small networks called experts. A router sends each word through the two that suit it best. So the model has the room of all eight, but each word costs the work of about two.
Three values: −1, 0 and +1
About 90% of the numbers a model learns sit in its experts, and each is stored as −1, 0 or +1 times one shared scale. That takes 2 bits a number, so the smallest file is 49 MB, and a processor applies them with additions and subtractions. Rounding a finished model to three values wrecks it; training with them for half as long as the original run brought the project’s first test model within 0.005 of full precision.
Answers that are checked
For a math problem, the math model writes a short program, and the engine works out its value exactly, without running any code. In careful mode it writes 16 programs and the verifier weighs their votes, so a reply can say “16 of 16 programs agree; verifier 0.97”. For code, the examples in your request become tests: the code runs against them in a sandbox and is rewritten, up to 32 times, until every test passes.
These checks are worth about as much as making a model three times bigger: with 8 attempts, the small code model matches the medium one with a single try.
A fast mode
Every specialist can also send each word through one expert instead of two. That is 1.3 to 1.6 times faster and only slightly less accurate (0.3 to 1.2 points on grade-school math, up to 3.6 on the code tests), because the models were trained to work either way.
How a model learns
- Read widelyA general base model reads plain English, stories, code and math. The medium base read 14 billion tokens in about two days, on one rented graphics card.
- SpecializeA copy of the base reads only its own subject: word problems, Python or stories.
- Learn the layoutIt learns the exact layout of the requests it will be given, graded only on its answers.
- Three valuesIts experts switch to −1, 0 and +1 and keep training, learning from their own full-precision version as they go.
- PracticeIt answers many questions, and only the answers a check confirms become new training data. For math this took grade-school scores from 53.6% to 57.4%.
- Beat the last versionThe new version answers the same problems as the installed one, and replaces it only if it wins.
All the training text comes from public datasets, and each source’s license is written into the model file itself. Test questions are kept out of the training data by checking for shared runs of 13 words, so the scores are fair.
One model or many
Every model in the folder is served at once. Each request chooses how they are used.
By name
Ask one specialist directly, for example nirmata-math-m. Your message is laid out the way that model was trained to read it.
auto
Every specialist reads your message, and the one least surprised by it answers. It sent 9 of 9 test prompts to the right specialist, but one specialist answers the whole message, so a request that mixes skills fails.
team
The coordinator splits your request into parts, calls the right specialist or tool for each with all its checks, and puts the answers together. It also chats on its own, does plain arithmetic with an exact calculator, and can search a folder of your documents to show you the passage you need (the right one 73% of the time).
What the coordinator writes and what the engine answers, for one request
- You#1 Mia buys 4 muffins at $3 each and 6 cookies at $1.50. She pays with $50. How much change does she get?
#2 Then write a short story that ends with the answer. - CoordinatorCALL math: #1
- EngineRESULT math [1]: 29 (5 of 5 programs agree)
- CoordinatorCALL stories: Write a short story about a girl named Mia who gets $29 in change.
- EngineRESULT stories [2]: Mia skipped to the bakery with her money…
- ReplyMia gets $29 back. [1] [2]
What it can do today
The medium models, measured on a processor with every program actually run in a sandbox. The team uses careful settings: more programs and more attempts, so it takes longer.
| Test | One model, one try | The team, careful settings |
|---|---|---|
| Grade-school math word problems GSM8K, 1,319 problems |
57.4% | 67.4% |
| Short Python tasks MBPP, 257 tasks |
46.3% | 71.2% |
| Python functions from a description HumanEval, 164 problems |
31.7% | 48.2% |
| Requests that need several skills the project’s own test, 390 requests |
19.5% | 70.5% |
| Stories about what was asked 300 story requests |
94.3% | no check for stories |
- With many more tests per problem (EvalPlus), the team’s code scores fall to 61.6% on MBPP and 40.9% on HumanEval: some programs pass the examples in the request but fail on other inputs.
- For mixed requests, “one model” means
auto, where one specialist answers everything. At default settings the team scores 60.8%. - Careful settings take time on a shared processor: about 66 seconds for a math question with 16 programs, 50 to 70 seconds for a coding request with 32 attempts.
- The team also answers 83.3% of everyday chat prompts directly, and shows the right passage from your documents 73.0% of the time.
Where it runs
On your own machine
A small program written in C++, with nothing else to install, runs the models on Linux, Windows and ARM computers. It carries versions of its core for several kinds of processor and picks the best one yours supports.
In front of people
A web page, a desktop app, and a Windows package (a zip of about 126 MB with the server, the three small models and two launchers: one starts it on this computer, the other shares it with the phones and computers on your network, behind a key). There is also a Docker image for servers.
From other programs
The servers speak the same interface as OpenAI’s, so existing tools such as the OpenAI libraries, LangChain and Open WebUI work by pointing them at the local address.
# any OpenAI client, pointed at nirmata on this computer client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="unused") client.chat.completions.create(model="team", messages=[...])
A specialist of your own
A short recipe file points at a folder of your documents, and one command trains a model on an NVIDIA graphics card. The result runs anywhere the others do. A model trained from scratch on a few megabytes of text learns its style, not general knowledge, so the recipe can start from a broad base instead.
name: my-expert data: paths: [my_docs] base: preset: moe-170m
| Platform | Checked |
|---|---|
| Linux on x86-64 | Yes, at every processor level the program supports |
| Linux on ARM64 (Raspberry Pi 4 and 5, Graviton) | Correct output under an emulator; speed not yet measured, and no real Raspberry Pi tested |
| Windows on x86-64 | The same output as Linux under Wine; not yet tested on real Windows |
| macOS | Not yet |
Private by default
- It works offline. Apart from activating a licence and renewing it about every two weeks, which send our licence server this computer’s public key and a signed time (and, the first time, the activation code and a name for the computer), the program, the servers, the page and the desktop app make no network requests of their own, and the servers listen only on this computer unless told otherwise.
- Model-written code runs only if you allow it. It is off by default and never on in the desktop app. When it is on, the code runs in a separate process in an empty folder, with limits of 1 GB of memory, 16 MB files and a CPU time limit, and with file writes, deletes, new processes and network sockets blocked. That is damage control for honest mistakes, not a wall against hostile code; one known gap, where two database modules can still write files, is first on the list to fix.
- On a network, it asks for a key, and refuses an empty one. Other websites cannot use it through your browser unless you allow them.
- Bad requests and broken model files are caught and refused. A review of the whole codebase found about 55 issues, and every real one is fixed and tested.
- It reads only the folders it was started with. A request can never name a folder to read.
What it can’t do yet
- Little knowledge of the wider world. Questions about history, science or the news get fluent but unreliable answers, and there is no web search yet. On six standard knowledge tests the medium base scores 46.3 on average, about what Pythia-410M scores after reading 21 times as much text; the specialists score near chance there.
- Narrow formats. Math comes back as a Python function, code as Python, stories as children’s stories. Asked for JavaScript or C, the code model answers in Python. Only the coordinator chats.
- A short memory. 512 tokens for the small models, 1,024 for the medium specialists and 2,048 for the coordinator: enough for a short conversation.
- Code checks need tests. Code without examples in the request is only checked for errors.
- New specialists wait for the coordinator. A specialist you add works at once by name and with
auto, but the coordinator calls it only after it is trained on examples that use it.
Where it stands
The eight installed models were built and tested on one training machine between 5 and 12 October 2026. Three things are moving now.
Training now: a bigger medium base
The medium base is reading 40.9 billion more tokens, and then all four medium models will be rebuilt from it as version 1.0. In mid-October it had passed step 297,000 of 623,900. The estimate is the base around 18 October, the specialists around 20 October, and the results around 21 October (US Eastern). Each new model is installed only if it beats the one it would replace.
Finished, merging after that evaluation
New processor code makes the medium models about three times faster: the medium math model on 8 threads goes from 191 to 562 tokens a second, with no change in accuracy measured. Release packages for Linux and Windows are built and tested too. Nothing is uploaded.
Planned next
A reader that answers from your documents and cites them, a specialist that writes database queries, one for JavaScript, HTML and CSS, then a coordinator retrained to call them. Installers will then ship without models and download them on request, each checked against a pinned version and checksum.
Not published yet. No license has been chosen, so no model, package or installer is public.
What building it taught
- Checks beat size.The small code model with 8 attempts matches the medium one with a single try, and 16 voted programs with a verifier add 10 points on grade-school math.
- Data beat everything else tried.Better story data and a tokenizer that fit it cut bits per byte by 24% and 48%. The model’s shape barely mattered.
- Layout can matter as much as training.A stray newline at the end of a prompt once dropped grade-school math from 39% to 1.7%, and one sentence per line is worth 2.3 points.
- Three values work only if the model trains with them.Rounding a finished model loses everything; training with three values brings it back to within a hair of full precision.
- Practice on checked answers helps once.It added 3.8 points on grade-school math the first time, and nothing the second.
- Tuning costs general knowledge.The specialists lost about 10 points on the multiple-choice tests, and the coordinator about 6.
Words used on this page
- Language model
- A program that has learned to continue text, predicting what comes next one small piece at a time.
- Token
- The piece a model reads and writes: a word, part of a word, or a symbol. About three quarters of a word.
- Parameters
- The numbers a model learns in training. In a mixture of experts, each word passes through far fewer than the total.
- Specialist
- A model trained for one subject: math, code or stories.
- Coordinator
- The model that runs team mode: it chats, calls specialists and tools, reads their results and writes the reply.
- Verifier
- A model that judges whether a math program is right, so its vote can be weighed.
- Mixture of experts
- A layer of several small networks (experts) with a router that sends each word to a few of them.
- Ternary
- Numbers restricted to −1, 0 and +1 times a scale.
- Fast mode
- One expert per word instead of two: 1.3 to 1.6 times faster, slightly less accurate.
- Team mode
- All the loaded models working on one request, with checks.
- Votes and attempts
- How many math programs the team writes before taking the weighed majority, and how many times it may rewrite code until the tests pass.
- Sandbox
- The restricted process model-written code runs in, when you allow it.
- Context
- How much text a model sees at once: 512, 1,024 or 2,048 tokens here.
- Bits per byte
- How well a model predicts text it never trained on. Lower is better, and it compares models with different tokenizers fairly.
- GSM8K, MBPP, HumanEval
- Standard tests: grade-school math word problems, short Python tasks, and Python functions written from a description.
- Distillation
- Training a model to match another model’s predictions. Here a three-value model learns from its own full-precision version.