Downloads · 30 days
19
100% of all-time downloads
javimosch/mtlm-7m-router
mtlm-7m-router is a machine learning model from javimosch. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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, o…
Downloads · 30 days
19
100% of all-time downloads
All-time downloads
19
Public
Parameters
8.3M
33.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors33.3 MB · 100%
From the Hugging Face model README
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.
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).
name_acc 1.000 · call_ok 0.957 · value_acc 0.968 · escalate dispatch 5/5
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"}}}
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.
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.