YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
mtlm-7m-router
A 7M-parameter Llama-architecture model trained in pure machin/MFL
(see mtlm) โ a tiny dispatcher/router: it classifies each
request into a tool call, a specialist-assistant handoff, an escalation to a bigger model, or plain
chat. Sibling of javimosch/mtlm-7m-tools with the
same architecture and tool vocabulary, plus an escalate route.
Routes it can emit
calculator, get_weather, get_time, web_search, wikipedia, read_file, write_file,
http_get, send_email, translate, run_shell, convert_units, set_reminder, save_note,
and escalate โ emitted for requests beyond a dispatcher's pay grade (long-form writing, code,
document analysis, planning, professional advice).
Held-out eval (140 probes, v4 spec)
name_acc 1.000 ยท call_ok 0.957 ยท value_acc 0.968 ยท escalate dispatch 5/5
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("javimosch/mtlm-7m-router")
model = AutoModelForCausalLM.from_pretrained("javimosch/mtlm-7m-router")
ids = tok.apply_chat_template([
{"role": "system", "content": "You are a helpful assistant. You can call tools."},
{"role": "user", "content": "write a 500-word essay about the French Revolution"},
], add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**ids, max_new_tokens=80, do_sample=False)
print(tok.decode(out[0][ids["input_ids"].shape[1]:]))
# {"tool_call": {"name": "escalate", "arguments": {"request": "...", "reason": "long-form writing"}}}
Architecture
Llama-compatible: dim 288, 6 layers, 6 heads (head_dim 48), SwiGLU hidden 768, vocab 4096,
context 256, RMSNorm eps 1e-5, RoPE theta 10000, tied embeddings. ~8.3M params, fp32 safetensors
(33 MB). Designed to sit in front of a router shim that maps tool_call names to executors โ
see tools/router_demo.py in the mtlm repo for a reference dispatcher.
Limits
7M params: argument values can be sloppy (digit bleed on long numbers, occasional operator slips). Validate arguments platform-side before executing. Not a chat model โ chat answers are TinyStories-grade.
- Downloads last month
- 4