Pith 16M
Pith 16M is a small typed decision model. You give it a state and one or more questions, each either a choice
between named options or a yes/no noul, and it returns a probability for every option.
It has two parts. The first is a 15.6M-parameter encoder that started life as cross-encoder/ettin-reranker-32m-v1. It is smaller than that because I cut the vocabulary down to the tokens its training text actually uses. The second is a set of six small modules I wrote by hand, for skills an encoder this size can't learn: chess, chord recognition, causal probability questions, a few kinds of logic puzzle, colour preferences and reading Python. Their weights are written down directly rather than trained.
| Parameters | 15,577,787 in model.safetensors: 15,576,579 trained, plus 1,208 module weights written by hand |
| Initial weights | cross-encoder/ettin-reranker-32m-v1, vocabulary cut from 50,368 to 7,516 tokens |
| Context | 7,999 tokens. Longer requests are refused, unless one of the modules can answer them on its own |
| Licence | CC BY-NC 4.0, non-commercial use (LICENSE) |
The encoder is a trimmed Ettin reranker that I fine-tuned. The six modules are written by hand, and they get the first look at every question. The bottom panel shows the attention mask that lets each option read the shared context without seeing the other options.
What's borrowed and what's new
Most of the encoder side is other people's ideas, so I'll start there.
The way Pith reads a question comes from the per-option readers on the board: tasksource-decider-nano, Bekko and Prism-1. The instructions and state are read once, and each option gets its own little block that can see that shared context but not the other options. The Crivo paper found that at 32M parameters, starting from a reranker, scoring each option separately beats reading them all together by 2.8 points of skill at roughly matched training compute. In my short test runs (one epoch, two seeds) the tree layout beat a joint layout, where every option sits in one sequence and can see all the others, by about a point of accuracy, so I went with it.
The last two layers borrow a trick from UniMC: there the shared context also gets to read every option, so the options can learn something about each other without looking at each other directly. The Crivo paper suggested this for decision models but didn't try it. In the same short runs it added about half a point more.
Those gains mostly didn't survive full training. After three epochs this model is within noise of the same model trained with the joint reader on the same data: +0.25 points of accuracy on my dev sample (95% interval −0.47 to +0.89). So the tree reader seems to speed up learning without moving where training ends up. I kept it anyway: it costs no parameters, and the order the options come in can't change the answer.
The loss is Crivo's, and the training setup comes from Amber's card: the learning rates, the cap of 3,000 rows per tasksource source, the 60% teacher gate, the augmentations and the 13-word decontamination rule.
Two things are new. One is the trimmed vocabulary. The other is the set of hand-written modules, which I describe below. The idea for those came from interpretable weight-space programming, where an agent writes a small network's weights by hand instead of training them. That paper builds stand-alone models. Here I bolt such pieces onto a trained encoder.
The idea: trim the vocabulary, keep the encoder
In a small encoder, the token embedding table holds most of the weights. Ettin 32M has 50,368 tokens × 384 dimensions, which comes to 19.3M of its 32M parameters. Most of those rows are tokens that rarely show up in decision tasks: odd code fragments, rare subwords, scripts the model barely saw.
How the tokens were chosen
Before fine-tuning, I counted how often each token shows up in 200,000 training rows, each rendered the way the model reads it. Nothing from the suite was counted. Then I kept all 243 byte-level tokens (so any UTF-8 text still encodes without unknown tokens), the 116 special and added tokens, the 5,641 most frequent of the rest, and the 1,516 extra tokens BPE needs to build the ones I kept. That's 7,516 tokens, and they cover 94.3% of the token occurrences in the counted rows. Like Ettin's, the tokenizer applies NFC normalization first.
Text that used a dropped token gets split into smaller kept pieces, so nothing becomes [UNK]. It just takes more
tokens, about 24% more on average. I didn't tune the cut-off of 6,000.
With everything else held fixed, trimming this model cost about 0.3 points on my dev sample for half the
parameters. The loss falls on tasks that hinge on exact names: a tool called QueryHealthData turns into something
like Qu ery He alth Data. The trimming script is trim_vocab.py, and
make_init.py builds the starting checkpoint with it.
Programmed modules
Some benchmarks in the suite come down to exact computation: finding the best chess move, naming the chord at a beat, working out a causal effect from a table of probabilities, solving an ordering puzzle, or saying what a Python function returns. A 16M encoder is close to chance on all of them, and more training didn't change that. So for each of these I wrote a small module by hand.
Each module has a parser and a core. The parser is ordinary code that pulls the numbers out of the request: the notes and their timings, the colours, the probability table, the chess board. The core does the computation, and where it can be written as a network, its weights are set by hand, in closed form. The chord core, for example, is a few ReLUs that measure how long each note overlaps the target beat, two attention heads that find the bass note and the melody, and a template matcher over the 127 chords. Nothing in any module is trained, and nothing is fitted to the evaluation data.
The modules work by claiming questions. Before the encoder runs, each module looks at the question. If it recognises its own input format, it answers and the encoder skips that question; if not, it stays out of the way. On my 18,847-request dev sample the modules claimed questions only in their own six benchmarks, and every other answer came out exactly as the encoder alone gives it.
| Module | What it does | Hand-written weights | Dev skill, encoder alone → with the module |
|---|---|---|---|
| Chord | note overlaps, bass and melody heads, chord templates | 297 | 1.6 → 54.5 on POP909 |
| Palette | colours in CIELAB, one attention head over the user's earlier ratings | 21 | 0 → 20.7 on cfcolor |
| Causal | each CLadder estimand as a fixed contraction of the parsed probability tables, plus graph rules | 4 | 0 → 89.0 on CLadder |
| Puzzles | swaps as permutation matrices, turns as rotations, time windows as interval checks, orderings as masks | 118 | 41% → 99% on the 166 BBH questions it claims |
| Chess | a 768-weight evaluation layer inside a short alpha-beta search | 768 | 0 → 30.0 on ChessBench |
| Code | runs the function in a sandbox and picks the matching candidate | 0 | 16.3 → 100 on CRUXEval |
Every module's docstring in deci.py describes it in under 200 words, which is enough to rebuild it.
Together they raise my dev index from 29.84 to 36.34.
I built them without looking at the evaluation data. The chord and palette modules were developed on synthetic data I generated: pop-style note textures, and simulated people rating palettes. The causal module was developed on the 33,463 CLadder questions that aren't in the suite, where it gets 95.3% right. The puzzle modules were developed on generators I wrote from the task formats, and the chess move generator on standard test positions, where it matches the known move counts exactly. I only checked each module on the dev sample once at the end. The exception is the chord module, which I checked twice. The first check showed it misreading clean seventh chords, so I fixed that and checked again: 54.0 the first time, 54.5 the second.
The code module runs code that arrives with the request, so it only does that inside an operating-system sandbox:
- on macOS,
sandbox-execwith no network, no file writes and no new processes; - on Linux,
bwrapwhere it's allowed. Where it isn't, as on Hugging Face Jobs and stock Ubuntu 24.04, the process locks itself down with Landlock and seccomp before Python starts, so it can't write, delete or rename files, open any socket, start other processes or signal them. Neither needs special privileges, and on first use the module checks that the kernel really refuses all of those. Where neither is available,unshare -rn(no network) is the last resort.
Inside, the code runs in a separate Python process with an empty environment. That process gets a second of CPU and a
0.8-second time limit, can't write files, and has no open, exec or eval. It can only import pure
standard-library modules. If a host doesn't offer one of these sandboxes, the module never runs anything, and
CRUXEval falls back to the encoder.
These modules know the formats of particular tasks. They help on the public benchmarks and should help on private tests of the same skills, but they do nothing for new kinds of task. The parsers and the chess search are plain code, so if the board lists Pith as a model with experts (as it does Dinah-1) or as an inference technique (as it does Crivo-Prumo), either label is fair.
Decision Index 0.3, public suite
I ran the whole public suite with the kit (commit 25c6ec7) on Hugging Face Jobs, on one RTX PRO 6000, with the
encoder in bf16 and all six modules on. The run is complete. Every one of the 140,620 requests was answered except
335 that are longer than 7,999 tokens, which are refused, never truncated. The predictions and run files are in
arvkevi/pith-decision-index.
| Pith 16M | Pith 48M | |
|---|---|---|
| Public index | 36.83 | 39.35 |
| Knowledge & reasoning | 26.2 | 27.8 |
| Language understanding | 25.9 | 30.5 |
| Retrieval & classification | 52.4 | 53.7 |
| Tools & automation | 53.1 | 55.2 |
| Arts & human taste | 31.5 | 34.5 |
Joint-reader models of the same two sizes, without the modules, scored 29.30 and 33.99 on this suite. Most of the gap comes from the six benchmarks the modules cover: CLadder, CRUXEval, BBH, POP909, ChessBench and cfcolor.
Latency, as the kit measures it (inside the engine, tokenization included, model loading excluded), was a median of 8 ms per request, a mean of 18 ms and an 80th percentile of 13 ms. Both models shared the GPU during the run, which probably pushed these up a little. Nearly all of the slowest requests are chess positions, where the search runs on the CPU. The slowest took about a second.
Every benchmark (chance-corrected skill: 0 is guessing, 100 is perfect)
| Area | Benchmark | Pith 16M | Pith 48M |
|---|---|---|---|
| Knowledge & Reasoning | GPQA Diamond | 0.7 | 3.4 |
| Knowledge & Reasoning | GSM8K | 5.1 | 10.7 |
| Knowledge & Reasoning | ChessBench | 31.6 | 31.6 |
| Knowledge & Reasoning | MuSR | 13.1 | 19.7 |
| Knowledge & Reasoning | SATA-Bench | 0.7 | 0.8 |
| Knowledge & Reasoning | CRUXEval | 100.0 | 100.0 |
| Knowledge & Reasoning | CLadder | 89.3 | 89.2 |
| Knowledge & Reasoning | HLE | 0.0 | 0.0 |
| Knowledge & Reasoning | MMLU-Pro | 2.9 | 4.5 |
| Knowledge & Reasoning | BBH fixed-option tasks | 56.6 | 55.6 |
| Knowledge & Reasoning | WinoGrande | 2.1 | 4.0 |
| Language Understanding | ContractNLI | 59.0 | 67.5 |
| Language Understanding | ANLI | 7.4 | 10.6 |
| Language Understanding | HellaSwag | 2.2 | 5.3 |
| Language Understanding | ACOS | 34.5 | 43.4 |
| Language Understanding | FinEntity | 40.8 | 45.3 |
| Language Understanding | iSarcasmEval | 0.0 | 0.0 |
| Language Understanding | VAST | 47.1 | 52.4 |
| Language Understanding | NLI4CT | 10.6 | 11.5 |
| Language Understanding | RAGTruth response-level hallucination | 39.9 | 47.8 |
| Retrieval & Classification | BANKING77 | 89.2 | 91.1 |
| Retrieval & Classification | CLINC150+OOS | 86.1 | 90.1 |
| Retrieval & Classification | BRIGHT | 8.4 | 11.6 |
| Retrieval & Classification | Amazon ESCI | 31.1 | 36.6 |
| Retrieval & Classification | PhishNChips phishing decisions | 29.9 | 18.4 |
| Retrieval & Classification | HoVer claim verification | 64.2 | 67.9 |
| Tools & Automation | BFCL | 84.3 | 88.8 |
| Tools & Automation | ToolRet | 51.6 | 51.8 |
| Tools & Automation | API-Bank | 51.8 | 56.3 |
| Tools & Automation | Home appliance simulator | 0.0 | 0.0 |
| Tools & Automation | When2Call MCQ | 71.9 | 72.2 |
| Arts & Human Taste | BPoMP | 67.3 | 72.9 |
| Arts & Human Taste | Humicroedit | 13.4 | 15.4 |
| Arts & Human Taste | POP909-CL | 57.4 | 57.4 |
| Arts & Human Taste | cfcolor | 27.8 | 27.8 |
| Arts & Human Taste | Habermas Machine | 0.0 | 4.7 |
| Arts & Human Taste | New Yorker caption matching | 23.3 | 28.7 |
The board ranks on the Full score: 60% private tests of the same skills and 40% private tasks from new domains, run by the maintainers. The public index isn't part of it.
Use
With the Decision Index kit installed (commit 25c6ec7) and this
repo downloaded to a folder called pith-16m (hf download arvkevi/pith-16m --local-dir pith-16m):
import sys
sys.path.insert(0, "pith-16m") # deci.py lives in the model folder
from deci import DeciEngine
engine = DeciEngine(model="pith-16m")
response, _ = engine(
state={"ticket": "My card was charged twice for the same order."},
questions={
"intent": {"type": "choice", "instructions": "What does the customer want?",
"criteria": {"refund": "Money back for the duplicate charge",
"cancel": "Cancel the order",
"info": "Just asking for information"}},
"urgent": {"type": "noul", "instructions": "The customer needs a fast response."},
})
The full public run:
PYTHONPATH=pith-16m python -m decision_index run --engine deci:DeciEngine --model pith-16m --suite-dir <suite-0.3> --out runs/pith-16m --compact
deci.py needs torch, transformers and safetensors. Because of the tree mask, the encoder always uses
PyTorch's built-in attention; flash-attention can't take that kind of mask. Everything is deterministic. The chess
search runs on the CPU and takes about 0.2 seconds per position.
How it reads a request
Each question becomes one sequence:
[CLS] instructions [SEP] state [SEP] [MASK] option 1 [SEP] [MASK] option 2 [SEP] ...
The attention mask turns it into a tree. The instructions and state attend only to themselves. Each option block attends to them and to itself, and its positions restart where the state ends, so every option sits in the same place and reads as if it were alone. In the last two layers the instructions and state also attend to the options, and that's the only route by which one option can affect another.
The reranker's own scoring head reads each option's [MASK]. A softmax over the question's options, divided by a
temperature fitted on held-out training data, gives the probabilities. Because every option block is in the same
position and the mask treats them all alike, shuffling the options can't change the answer.
A string state is used as it is, and an object state is rendered as JSON. A noul is a choice between yes and no.
The same rendering is used for every benchmark, with no benchmark-specific prompts and no option filtering.
Training
I trained it once, for three epochs (89,199 steps) from the trimmed reranker. That took 4 hours 50 minutes on one RTX PRO 6000, shared with the 48M's training run. Batches hold up to 32,768 padded tokens, built from whole questions of up to 7,999 tokens. I used AdamW at a learning rate of 1e-4, with 3% warm-up, cosine decay to zero and weight decay 0.01. The released weights are an exponential moving average with decay 0.999.
For each question, the loss is soft cross-entropy plus half a Brier term against the gold answer, mixed 50/50 with the KL divergence to the probabilities of PelaAI/KnowLine-4B-Gen5.5 (Apache-2.0). Where there's no teacher label, or where the teacher agreed with the gold less than 60% of the time on a source, only the gold is used. Options are shuffled; half the time the state moves into the instructions, as it does in many Decision Index rows; and field names, roles and tool-call formats are varied.
Data
| Store | Share | What's in it |
|---|---|---|
| Tool use | 18% | which tool to call, whether to call one now, and with which arguments, from glaive-function-calling-v2, ToolACE and hermes-function-calling-v1; When2Call's train split; ToolRet training queries with BM25 hard negatives |
| API-Bank | 3% | API-Bank's training dialogues in the suite's layout, with full-length tool catalogs |
| Benchmark train splits and generated rules | 30% | train splits of ARC, BANKING77, CLINC150, ESCI, GSM8K, HoVer, iSarcasmEval, RAGTruth, CLadder, ACOS, ContractNLI, NLI4CT, VAST, Humicroedit and New Yorker, plus SGD; generated logic, date, deduction and tracking puzzles; perturbed limericks; phishing emails and links |
| Everything else | 49% | tasksource-jev-typed-decisions (at most 3,000 rows per source, non-commercial rows included), procedural-typed-decisions, LocalLLaMA/typed-decisions, and knowledge multiple choice |
I dropped every training row whose state, question or options share a 13-word span with a Decision Index 0.3 suite row, and every row whose whole state is a short suite state. Template text that turns up in at least 20 different suite states doesn't count as overlap. For ContractNLI and the generated puzzles only exact matches count, since their texts are formulaic enough that 13-word matches are mostly coincidence. Tool documentation was exempt, because the same schemas turn up everywhere, but the questions and conversations around it were still checked. Sources, row counts and licences are in DATA.md. Several suite benchmarks contribute their train splits, so those scores are in-distribution, not zero-shot.
Limitations
Knowledge-heavy and language-heavy reasoning stays close to chance: GPQA, HLE, MMLU-Pro, WinoGrande, HellaSwag and ANLI. A 16M encoder holds little world knowledge, and none of the modules reaches these tasks.
The modules recognise particular input formats. A private test that asks for the same skill in a different layout may not be claimed, and then the encoder answers it instead. I tried to make the chord and palette modules accept common variations, such as other field names, chord names instead of pitch sets, or RGB triples instead of hex, but I can't anticipate every format. The code module also needs an operating-system sandbox, and on a host without one it stays off.
Some of the training data was generated to look like specific public benchmarks (the puzzles and the perturbed limericks), so those gains may carry over less to the private tests.
Rare names (tools, products, people) split into more tokens than they do in the untrimmed reranker, which costs a little on tasks that hinge on one name. The model is mostly English. It's also overconfident. On the public run its average confidence is 0.68 against an accuracy of 0.60 (expected calibration error 0.092, each benchmark weighted equally), and the answers it gives with about 97% confidence are right 87% of the time. If you act on its probabilities, recalibrate them on your own data first.
Licence
CC BY-NC 4.0 for the weights and code. Some of the training data allows non-commercial use only, and a few sources state no terms at all; DATA.md lists every source with its licence. The base model, cross-encoder/ettin-reranker-32m-v1, is Apache-2.0, and the Ettin encoders it comes from are MIT. Both notices are in LICENSE.
The family
| Model | Parameters | From | Public 0.3 | Full |
|---|---|---|---|---|
| Pith 16M | 15,577,787 | ettin-reranker-32m-v1, 7,516 tokens kept | 36.83 | pending |
| Pith 48M | 47,580,347 | ettin-reranker-68m-v1, 9,686 tokens kept | 39.35 | pending |
Thanks to the authors of Amber, Crivo, Mola, tasksource-decider and Bekko for writing up what worked for them, to the authors of interpretable weight-space programming for the idea behind the modules, to tasksource for the typed-decision collections, and to the Ettin team for the encoders.
Made by arvkevi.
- Downloads last month
- -
Model tree for arvkevi/pith-16m
Base model
jhu-clsp/ettin-encoder-32m