--- license: mit library_name: pytorch pipeline_tag: text-generation tags: [tool-calling, agent, function-calling, on-device, webgpu, from-scratch, byte-level] --- # LocalAgent — tiny 30M byte-level tool-calling agent A **28M-parameter, pretrained-from-scratch, byte-level** agent for tool dispatch. Selection is **generable** (no fixed-N classifier): a 5-way **route head** gates modality, a **dense two-tower selector** scores *any* tool by its description embedding, and a **pointer head** copies argument values from the prompt. 50-tool surface. Trained on a corrected, paraphrase-rich + referent- conditioned dataset ([danelcsb/localagent-dispatch-data](https://huggingface.co/datasets/danelcsb/localagent-dispatch-data)). Eval (held, disjoint phrasings + slots): - free-form OOD **call-name 53%** / top-1 56% (45 hand-written queries) - paraphrase-eval selection **63%** · referent-conditioned (contextual) selection **72%** Pure **PyTorch** (no `transformers`). Load with this repo's `LocalAgentLM` / `ModelConfig`. ## Files - `model.pt` / `model.safetensors` + `config.json` — checkpoint (backbone + ptr + dense_selector + route_head). - `model.fp16.onnx` — ONNX graph (`logits`, `hidden`) for the in-browser demo. - `dispatch_heads.json` / `heads.json` / `meta.json` — head weights + tokenizer/tool contract. **Demo:** https://huggingface.co/spaces/danelcsb/localagent-webgpu · **Data:** https://huggingface.co/datasets/danelcsb/localagent-dispatch-data · **Code:** https://github.com/sangbumchoi/localagent