Yantra 1B Agent — Sub-1B Tool-Calling Model (GGUF, QLoRA, DTSA)
TL;DR:
Yantra is a 1B-parameter function-calling model that turns a user query plus a tool list into a strict tool call. A lightweight runtime router picks the tool (82.3% accuracy); the fine-tuned MiniCPM5-1B model generates only the arguments. PAS
0.6775
on ToolACE-300 —
3.52×
our identically-served baseline (0.1922). Ships as a 688 MB Q4_K_M GGUF, MIT licensed, reproducible on a free Colab T4.
PAS
= mean of 8 sub-metrics (parseable, valid_name, expected_name, exact_args, arg_key_overlap, stopped_cleanly, recovery=0, multiturn=0).
Baseline note: 0.1922 is measured with the reference MiniCPM5 agentic model served through llama.cpp on identical prompts. That model targets SGLang's native stack, so llama.cpp understates its card numbers. The honest claim is system-vs-system under identical serving.
Routing accuracy
Router
Accuracy
Lexical (IDF + char-3gram)
244/300 (81.3%)
Pure embedding (MiniLM-L6-v2)
242/300 (80.7%)
Blend β=0.5 (shipped)
247/300 (82.3%)
Quickstart (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(model_path="base_model.Q4_K_M.gguf", n_ctx=4096, n_gpu_layers=-1)
prompt = """<user>Find me a VR game for Oculus Quest</user><tools>[{"name": "getVRGame", "description": "Search VR games", "parameters": {"properties": {"platform": {"type": "string"}, "genre": {"type": "string"}}}}]</tools><calls><bind tool="getVRGame"/>"""
out = llm(prompt, max_tokens=512, stop=["\n<bind", "<tool_result>", "<user>", "</calls>"])
print(out["choices"][0]["text"])
# <args><param name="platform">Oculus Quest</param>...</args><action_end/>
Prefer routing in code? Use the shipped Router V2 from the GitHub repo (
runtime/router.py
):
from runtime.router import ToolRouter
router = ToolRouter() # lexical-only, zero extra installs
router.fit_corpus(all_tools)
tool = router.route("Find me a VR game for Oculus Quest", tools)[0]
How it works (DTSA)
DTSA = Decoupled Tool Selection / Argument Generation.
The runtime router binds
<bind tool="…"/>
; the model emits only
<args>…</args><action_end/>
. Fixed stop sequences (
\n<bind
,
<tool_result>
,
<user>
,
</calls>
) guarantee clean termination. Routing (82.3%) is independent of the model — swap routers without retraining.
Training
Base:
openbmb/MiniCPM5-1B
· QLoRA (r=64, α=128, dropout=0.05) · Colab T4 · zero paid API calls.
Stage
Method
Data
Epochs
LR
1+3
DTSA SFT
1988 ToolACE pairs
2
1e-4
4
EG-OPD DPO
7795 pairs
1
5e-5
5
RTE SFT
error corrections
1
1e-4
8
SFT replay
66 fixes + 200 replay
1
1e-5
6
Export
Q4_K_M GGUF, 688 MB
—
—
A DPO round on 66 pairs collapsed (exact_args 0.65→0.14) and was abandoned; SFT replay on the same fixes recovered safely. The failed run is documented in the GitHub repo for transparency.
Evaluation protocol
300 ToolACE cases, seed 42, single-call only.
Prompt =
<user>query</user><tools>…</tools><calls><bind tool="ROUTED"/>
; model completes args-only.
Decoding: temperature 0.0, max_tokens 768, fixed stops; last-bind-with-args parser with tagless-
<param>
fallback.
Reproduce:
Yantra_EmbRouter_Eval.ipynb
in the GitHub repo (~10 min, no training).
Intended use
Research and prototyping for lightweight on-device / edge function-calling agents. Single-call English tool use with schema validation in front.
Limitations
65% exact-args: validate every call against the tool schema before executing.
English only, 4096 context, no safety alignment beyond the base model.
Not for high-stakes actions (payments, medical, infrastructure) without human review.
FAQ
What is Yantra?
A 1B tool-calling model + router that converts (query, tools) into a strict
<bind>/<args>/<action_end/>
call. PAS 0.6775 on ToolACE-300.
Which file do I download?
base_model.Q4_K_M.gguf
(688 MB). Load with llama.cpp / llama-cpp-python / Ollama (GGUF import).
What prompt format does it expect?
<user>{query}</user>\n<tools>{json}</tools>\n<calls><bind tool="{routed}"/>
then let it complete the
<args>
block. Use the listed stop sequences.
Can I use it commercially?
The Yantra weights and code are MIT. Verify the base model license (
openbmb/MiniCPM5-1B
) for its terms.
How is this different from the baseline MiniCPM5 agentic model?
DTSA decoupling (router + args-only model + fixed stops) makes output 100% parseable under llama.cpp serving, where the baseline echoes schemas. Measured 3.52× PAS under identical serving.
Citation
@software{yantra2026,
author = {Eulogik},
title = {Yantra: A Sub-1B Agentic Tool-Calling Model},
year = {2026},
url = {https://github.com/eulogik/yantra},
license = {MIT}
}
Acknowledgments
Base model: OpenBMB MiniCPM5-1B · Data/eval: Team ACE ToolACE · Training: Unsloth QLoRA · Inference: llama.cpp · Embeddings: sentence-transformers.
Runs of eulogik yantra-1b-agent on huggingface.co
803
Total runs
12
24-hour runs
33
3-day runs
71
7-day runs
803
30-day runs
More Information About yantra-1b-agent huggingface.co Model
yantra-1b-agent huggingface.co is an AI model on huggingface.co that provides yantra-1b-agent's model effect (), which can be used instantly with this eulogik yantra-1b-agent model. huggingface.co supports a free trial of the yantra-1b-agent model, and also provides paid use of the yantra-1b-agent. Support call yantra-1b-agent model through api, including Node.js, Python, http.
yantra-1b-agent huggingface.co is an online trial and call api platform, which integrates yantra-1b-agent's modeling effects, including api services, and provides a free online trial of yantra-1b-agent, you can try yantra-1b-agent online for free by clicking the link below.
eulogik yantra-1b-agent online free url in huggingface.co:
yantra-1b-agent is an open source model from GitHub that offers a free installation service, and any user can find yantra-1b-agent on GitHub to install. At the same time, huggingface.co provides the effect of yantra-1b-agent install, users can directly use yantra-1b-agent installed effect in huggingface.co for debugging and trial. It also supports api for free installation.