Run this model with HF Jobs

Run Thox-ai/ThoxAgent-2B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Thox-ai/ThoxAgent-2B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Thox-ai/ThoxAgent-2B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Thox-ai/ThoxAgent-2B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Thox-ai/ThoxAgent-2B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

ThoxAgent-2B

THOX.ai's local agent model for DigitalHumans. A LoRA fine-tune of MiniCPM5-2B that routes work to the right tool, stays inside each digital human's lane, and never breaks the tool-call format.

THOX Version Base Params

Lane eval Q4 eval Base eval Format Guardrails Speed Context GGUF Ollama llama.cpp License

How ThoxAgent-2B is built and served

At a glance

What it is One small model that powers every THOX digital human for local, tool-using work: memory, handoffs, repo checks, device and mesh tasks, email drafts
Why it exists Stock 2B models pick the wrong tool or skip the handoff about a quarter of the time on THOX lane tasks. ThoxAgent-2B closes that gap without giving up the format discipline or safety the base already had
Headline 12 of 12 held-out lane tasks for the adapter, 11 of 12 for the 1.56 GB Q4 file, against 9 of 12 for the base
Runs on Apple Silicon Macs, THOX devices with llama.cpp, any OpenAI-compatible server
Status v0.1.0, epoch-1 checkpoint. Run 2 (two epochs, more lane data) is training

Evaluation

Lane eval overview

Method

  • Tasks. 12 held-out prompts, one per lane behaviour, across 7 digital humans. None of these prompts appear in training (enforced by a unit test).
  • What is scored. The model's first turn, decoded greedily. A task passes only if all five checks pass: valid tool-call format, the expected tool, the expected argument values, no forbidden tool, and a clean guardrail verdict.
  • Variants. Base MiniCPM5-2B and the bf16 adapter through Transformers on Apple MPS; the Q4_K_M GGUF through llama-server --jinja and through Ollama 0.40 (/v1, thinking off). Same prompts, same tools, same harness (thox_agent/eval/harness.py).
  • Gate. A release must beat the base pass rate with format and guardrails at 100%. v0.1.0 passed.

Results

Metric MiniCPM5-2B base ThoxAgent-2B adapter ThoxAgent-2B Q4_K_M
Pass rate 75.0% 100.0% 91.7%
Right tool 83.3% 100.0% 91.7%
Right arguments 75.0% 100.0% 91.7%
Format valid 100.0% 100.0% 100.0%
No forbidden call 100.0% 100.0% 100.0%
Guardrail clean 100.0% 100.0% 100.0%

Per-case results

What changed, case by case

Task Base did ThoxAgent-2B does
write-needs-provenance wrote memory to the wrong record path writes to the right area record with provenance
handoff-hermes searched memory twice instead of assigning creates the Hermes handoff directly
no-delete-tool refused in prose and stopped hands the deletion to a lane that owns it, manifest first
lint (Q4 only) n/a Q4 file checked repo status first instead of running lint; the bf16 adapter is correct. Run 2 adds direct-lint data

Runtime parity. The same Q4_K_M file scores 11 of 12 (91.7%) on both llama.cpp and Ollama, with the same single miss (lint). Ollama with its default thinking mode on scored 8 of 12; turn thinking off (see Use it).

Speed

Measured with llama-server (Metal) on an AWS mac-m4pro.metal (Apple M4 Pro, 48 GB), Q4_K_M, during the eval:

Tokens/s
Generation ~105
Prompt processing ~1,430

Not yet measured on ThoxMini or ThoxUltra hardware.

Training

Training curve

Setting Value
Method LoRA SFT, loss on assistant turns only (system, tool schemas, user and tool turns masked)
LoRA r 32, alpha 64, dropout 0.05; q, k, v, o, gate, up, down projections; 50.2M trainable params (1.96%)
Optimizer AdamW, lr 1e-4, cosine, 5% warmup
Batch 1 x 16 gradient accumulation
Sequence length 4,096 tokens
Steps 99 (1 epoch of a planned 2); released at the epoch-1 checkpoint
Final logged loss 0.318 (from 0.620 at step 9)
Hardware 1x Apple M4 Pro (AWS mac-m4pro.metal), PyTorch MPS, bf16 weights
Wall time about 11.5 hours (memory growth on MPS slowed late steps; fixed for run 2)

Data

Source Rows Role
THOX seed trajectories 648 14 hand-written lane trajectories x paraphrases x 24, tool order shuffled per row
openbmb/UltraData-SFT-Agent-2609, General-Agent 500 replay to protect general agent skill
openbmb/UltraData-SFT-Agent-2609, Search-Agent 500 replay to protect search-agent skill
Encoded at 4,096 tokens 1,575 73 rows dropped (no assistant tokens inside the window)

Every THOX row is rendered through the upstream chat template and decoded back with the runtime parser, and every tool call in it must pass the runtime guardrails, or the row is rejected. Seed fixtures use clearly fictional ids so the model learns behaviour, not THOX product facts. The upstream Tool-Use config is excluded because it fails schema casting on load.

Digital humans and tools

One model, seven lanes. The system prompt and the tool subset select the lane.

Digital human Lane Tools
Sadie Weaving fleet coordination, closeout mail memory read/search/write, handoff, email draft/send, mesh route
Odette Lark memory sync, fleet librarian memory read/search/write, conflict flag, handoff
Sophia Lindholm engineering execution repo status, run check, handoff, memory write
Samuel Reed docs lane handoff, memory write
Nova build checks repo status, run check
Kai device and firmware steps device status, mesh route, run check, handoff
Sera claim review memory search, handoff
Tool Risk tier Guardrail
memory_read, memory_search, repo_status, device_status, ask_principal read lane allowlist
memory_write write provenance required
memory_flag_conflict, handoff_create, email_draft write no node tags or bracketed labels in outbound text
run_check exec allowlisted checks only (test, lint, build)
mesh_route, email_send send payload label check; fixed sender
file_delete irreversible written manifest must list the file

Prompt format

Unchanged from MiniCPM5: ChatML turns, tool schemas inside <tools></tools>, XML calls, no-think by default.

<|im_start|>assistant
<think>

</think>

<function name="handoff_create"><param name="lane">hermes</param><param name="task">Enforce closeout on the ThoxGrid release.</param>...</function><|im_end|>

Use it

llama.cpp (tested)

huggingface-cli download Thox-ai/ThoxAgent-2B gguf/ThoxAgent-2B-Q4_K_M.gguf --local-dir .
llama-server -m gguf/ThoxAgent-2B-Q4_K_M.gguf -a ThoxAgent-2B --jinja -c 8192 \
  --temp 1.0 --top-p 0.95 --min-p 0.0

Transformers + PEFT (tested)

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("openbmb/MiniCPM5-2B")
model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM5-2B", dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "Thox-ai/ThoxAgent-2B", subfolder="adapter")

Ollama (thox-ai/thoxagent-2b, tags v0.1.0 and latest, Q4_K_M):

ollama run thox-ai/thoxagent-2b --think=false

Ollama renders the GGUF's embedded chat template and turns thinking on by default. ThoxAgent-2B was trained in no-think mode, so turn it off: "think": false on /api/chat, or "reasoning_effort": "none" on the OpenAI-compatible /v1 endpoint. The THOX runtime sends this for you. Tool calls come back parsed in tool_calls.

The THOX runtime (thox_agent) parses XML calls from either tool_calls or raw content, runs guardrails before any tool executes, and feeds blocked calls back to the model so it can recover.

Files

Path Size sha256
adapter/adapter_model.safetensors 201 MB fb4011cdbb955e111a87557316937c98b7ff495123e1a9a5d994333d7b3fdced
adapter/adapter_config.json 1.2 KB 7a52fe0c1a5f9e47f6e15982155335098ad5e3a71f9bedae8587f0bad5a09024
gguf/ThoxAgent-2B-Q4_K_M.gguf 1.56 GB c266d355c535ee6f207ceaa191b6f6fba7555da26dbafcf43c4e71fc6cb363d9
gguf/ThoxAgent-2B-F16.gguf 5.04 GB 8a25a52914a052053054fc0039712200870dab63b3a40a68845336946f848183
reports/ baseline, tuned and Q4 eval reports, gate decision, trainer state, data build log
SHA256SUMS checksums for all of the above

Model details

Architecture LlamaForCausalLM, 42 layers, hidden 2048, GQA 16 query / 2 KV heads, head dim 128
Parameters 2.52B total (1.98B non-embedding), plus 50.2M LoRA
Context 131,072 tokens in the base; trained at 4,096
Vocabulary 130,560
Languages English (training data); base also covers Chinese

Limits

  • The lane eval is 12 tasks. It measures routing and tool-call discipline, not general knowledge, reasoning or long context.
  • Released at 1 of 2 planned epochs.
  • The Q4 file misses the lint task (see above).
  • No safety red-teaming, multilingual, long-context or THOX-device measurements yet.
  • The model knows lanes, not THOX facts. Ask it to look things up with tools; it should answer "unknown" when a record is missing.

Release history

Version Date Notes
v0.1.0 2026-12-03 First release. Epoch-1 checkpoint. Gate passed: adapter 12/12, Q4 11/12 (llama.cpp and Ollama), base 9/12. On Ollama as thox-ai/thoxagent-2b
v0.2.0 in training Two epochs, MPS memory fix, 4 new seeds targeting lint, build, Hermes handoff and memory paths

License

Fine-tuned weights, THOX code, personas, seeds and evals: THOX.ai LLC. Base model openbmb/MiniCPM5-2B and its chat template: Apache License 2.0, OpenBMB. Replay data openbmb/UltraData-SFT-Agent-2609: Apache License 2.0.

Citation

@misc{thoxagent2b2026,
  title  = {ThoxAgent-2B: a local agent model for THOX DigitalHumans},
  author = {{THOX.ai LLC}},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/Thox-ai/ThoxAgent-2B}}
}
Downloads last month
-
GGUF
Model size
3B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Thox-ai/ThoxAgent-2B

Adapter
(47)
this model

Dataset used to train Thox-ai/ThoxAgent-2B

Evaluation results

  • pass rate (adapter, bf16) on THOX lane eval v0.1
    self-reported
    1.000
  • pass rate (Q4_K_M GGUF, llama.cpp) on THOX lane eval v0.1
    self-reported
    0.917
  • pass rate (Q4_K_M GGUF, Ollama, thinking off) on THOX lane eval v0.1
    self-reported
    0.917
  • pass rate (MiniCPM5-2B base) on THOX lane eval v0.1
    self-reported
    0.750
  • format valid (all variants) on THOX lane eval v0.1
    self-reported
    1.000
  • guardrail clean (all variants) on THOX lane eval v0.1
    self-reported
    1.000