axstream-matcher (LFM2.5-350M fine-tune)

The instant-tier matcher for axstream — a streaming action language for computer-use agents. Given a library of known voice-command templates and a spoken utterance, this model answers one constrained question in ~100ms on Apple Silicon: which known command is this, and what are the variable words?

input  (system): the user's command library — id, description, slots, examples
input  (user):   "uh can you open apple music for me"
output:          {"template": "open_app", "slots": {"app": "apple music"}}

It never plans, never sees the screen, never invents actions — it recognizes. Misses return "none", which routes the utterance to a full LLM. Slot values are copied verbatim from the utterance by contract (train- and serve-time enforced), so the matcher cannot act on words the user didn't say.

Files

file what
lfm25-350m-axstream-v2-Q4_K_M.gguf v2 — current. Trained on variable 10–40-template libraries, sibling families, deliberate look-alike traps, and description-only templates.
lfm25-350m-axstream-Q4_K_M.gguf v1 (kept for reproducibility).
adapter_model.safetensors v1 LoRA adapter over LiquidAI/LFM2.5-350M.

v2 results

v2 targets the failure modes observed running v1 in production: accuracy collapse past ~15 in-context templates, wrong matches on plausible unknown commands ("open apple maps" with no maps template present), and never matching templates that lack examples. Evaluated through the real serving path (llama-server + JSON-schema constrained decoding), v1 vs v2 on the same suites:

gate v1 v2
exact canonical examples @ 25-template libraries 96.0% 100%
wrong-match rate on deliberate-rival non-commands 23.3% 4.8%
accuracy at 40-template libraries 73% 91%
library-size sweep spread (10→40 templates) 11 pts 4 pts
paraphrase holdout (generated by a model family unused in training) — 94.0%
description-only (example-less) templates ~0% 92.2%
latency p50 (M-series, Q4_K_M, prefix-cached) ~110ms ~120ms

In axstream, v2 is paired with an embedding prerank (top-10 shortlist, measured recall@3 = 100% on the live library), which keeps the effective context in the 10-candidate sweet spot at any library size.

v1 results

Evaluated through the real serving path (llama.cpp llama-server + JSON-schema constrained decoding) on a 521-example held-out test set of dictated-speech commands over dynamic 8–14-template libraries, including compound-sentence negatives, near-miss app names, and chit-chat:

metric base LFM2.5-350M this model
end-to-end correct (template + slots) 47.3%* 94.2%
template accuracy 53.2%* 96.0%
slot values exact (given template) 53.3%* 97.5%
refusal recall on non-commands 55.0%* 94.3%
wrong-match rate on non-commands 45.0%* 5.7%
latency p50 (M-series, Q4_K_M, prefix-cached) 104ms 114ms

*base measured on the round-1 test set (387 examples); this model's numbers are from the harder superset. Trained in 3.7 minutes on one RTX 4090 (~$0.10).

Usage

Serve the GGUF with llama.cpp and constrain the output with a JSON schema over your template ids (grammar-constrained decoding makes invalid output impossible). The exact prompt builder and schema this model was trained against are open source: axstream/tiny.py.

llama-server -m lfm25-350m-axstream-v2-Q4_K_M.gguf --port 8791 -ngl 99 -c 8192 --no-webui

(v2 was trained with prompts up to 3072 tokens — give the server headroom with -c 8192.)

Or as the matcher inside axstream directly — see the quickstart.

Training

LoRA (r=32, α=64) on all projections including LFM2's conv-block in_proj / out_proj and MLP w1/w2/w3, per the official unsloth LFM2.5 recipe. Prompts are byte-identical to the serving format; response-only masking; trained on one rented RTX 4090. The dataset and generation pipeline are not released.

v1: ~2.6k synthetic dictation-style examples with machine-validated labels (verbatim-slot checks, cross-model judge filtering), 3 epochs at lr 5e-5, seq 2048. ~4 minutes, ~$0.10.

v2: ~5.5k train rows over a harder curriculum — every context library sampled at 10–40 templates (median 23, shuffled); ~12 authored families of near-identical sibling commands trained co-present; ~580 deliberate-rival negatives (a plausible command whose true template is absent while a confusable same-verb template is present → gold none); 400 positives whose true template renders description-only; paraphrase refresh across six spoken style axes including whisper-transcript artifacts. Generation by one model family, judging by two others, and the paraphrase holdout by a fourth used nowhere in training. 2 epochs at lr 5e-5, seq 3072. Well under $1.

Limitations

  • English, macOS-command domain, dictated-speech register.
  • v2 is in-distribution for 10–40-template contexts; beyond that, pre-filter (axstream preranks to a top-10 shortlist with a local embedding model).
  • v2 traded a little recall for its much lower wrong-match rate: some preamble-heavy phrasings ("open the browser and search for …") over-refuse and route to the LLM tier — the safe direction.
  • Slot values are verbatim by contract, so tasks whose spoken word maps to a different UI value (say "times", click the button named "Multiply") are out of scope for the matcher by design.
  • This is a recognizer. Pair it with guards before acting on its output — in axstream, replays verify targets against the live screen and anything destructive is risk-gated.

License and attribution

This model is a derivative of LiquidAI/LFM2.5-350M by Liquid AI, Inc., modified by merging a LoRA adapter fine-tuned on synthetic voice-command data and quantizing to GGUF (Q4_K_M). Distributed under the LFM Open License v1.0 (see LICENSE).

Note: under LFM Open License v1.0 §5, commercial use by entities (including affiliates) with ≥ $10M annual revenue is not licensed. This restriction travels with the weights and cannot be relicensed away.

Not affiliated with or endorsed by Liquid AI, Inc.

Downloads last month
32
GGUF
Model size
0.4B params
Architecture
lfm2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for milsoni201/lfm25-350m-axstream-matcher

Adapter
(33)
this model