A search bar that parses itself.
A 29,597-parameter model turns a typed phrase into a structured filter. It is running in this tab right now, on your CPU for one query and on WebGPU for a batch, and it has never seen the schema below.
your schema
Edit anything. The field names never reach the model, so renaming them changes the answer but not the parse.
query
— µsroles
filter
How it works
One mechanical scan splits the phrase into tokens and emits sparse feature rows for each one: shape, case, length bucket, operator-lexicon membership. Your schema is added as three more kinds of row, none of which carry a field name.
- this token matched a field, and the field has this kind
- this token matched a value belonging to the nearest preceding field
- this token is one position away from a field
The model sums those rows, mixes nearby evidence with a five-token convolution and two neighbour gathers, then carries context in both directions with gated affine scans. A two-layer head emits one of twelve roles per token. Ordinary TypeScript compiles the roles into a filter and resolves surface forms back to real fields, tolerating aliases, plurals and single-character typos.
The scan is the reason the architecture suits a GPU. There are two backends over the same 40 KiB of int6 weights: plain TypeScript, and a WGSL compute kernel running one workgroup per query. Both are checked against the PyTorch checkpoint, and against each other, to within 1e-3.
Backends
The query above parses on the CPU, because one short phrase is faster there than a WebGPU dispatch and readback. The architecture pays off on batches: every query is an independent workgroup and the recurrence is a prefix scan, so 32 channels and every query in the batch run at once.
Measured in your browser, on your hardware, when you press the button. The WGSL kernel is checked against the CPU path on every load; roles must match exactly and logits to within 1e-3.
Accuracy
Trained on schemas drawn from issue trackers, mail, files and commits. Evaluated on contacts, music, recipes and shipments, which share no field word, alias or enum value with training.
| heldout (training schemas, fresh seed) | 1.0000 |
| transfer (unseen schemas) | 0.9888 |
The heldout row only checks whether the model memorised its training seed. The transfer row is the result. Removing the hashed word-identity feature rows raised transfer from 0.9865 to 0.9888.
Both figures come from a generated evaluation corpus of four thousand queries. They do not establish accuracy on real user phrasing. This is a feasibility spike rather than a library: there is no published package, and the quantised weights here are decoded to f32 at load rather than computed in int6.