Haku Lab

Experiment

Structured tool-calls from a 27M model

A 26.6-million-parameter ternary model — tiny — fine-tuned to turn a plain request into a structured tool call: {action, title, due, priority}. The interesting part is that it generalizes: on requests it never saw in training, it picks the right action, due, and priority about 98% of the time — evidence that a model this small genuinely learns the routing, rather than memorizing a fixed list.

Caveat. A small, under-trained research prototype. It’s strong at the structured/classification part (action · due · priority), but weak at copying an arbitrary title back verbatim when the wording is unfamiliar (~23% on novel phrasings) — open-vocabulary copy is the hard part for a model this size. Illustrative, not production.
On requests not seen in trainingResult
Right action, due and priority~98%
title copied back word for word, new phrasings~23%
Model size26.6M, ternary
No live demo. This page used to call a hosted copy of the model. That host is off, so the numbers above stand in for it.

Method

The base is a 26.6M-parameter ternary decoder (14.2M in the ternary blocks, 12.5M in the token and position embeddings) pretrained on a curated text corpus, then fine-tuned (response-only) on request→tool-call pairs. At inference it greedily decodes the JSON for the request. There’s no grammar constraint or post-processing here — the model emits the structure directly; a real deployment would constrain decoding to the schema. What this shows is that the capability — map intent to a structured action and classify its fields — fits in a model small enough to run on a phone, and it generalizes to new requests.

Get new experiments

Occasional notes when we publish. No spam.