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.
Instructions to use Thox-ai/ThoxAgent-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Thox-ai/ThoxAgent-2B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Thox-ai/ThoxAgent-2B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Use Docker
docker model run hf.co/Thox-ai/ThoxAgent-2B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Thox-ai/ThoxAgent-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thox-ai/ThoxAgent-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxAgent-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Thox-ai/ThoxAgent-2B:Q4_K_M
- Ollama
How to use Thox-ai/ThoxAgent-2B with Ollama:
ollama run hf.co/Thox-ai/ThoxAgent-2B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Thox-ai/ThoxAgent-2B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Thox-ai/ThoxAgent-2B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Thox-ai/ThoxAgent-2B with Docker Model Runner:
docker model run hf.co/Thox-ai/ThoxAgent-2B:Q4_K_M
- Lemonade
How to use Thox-ai/ThoxAgent-2B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Thox-ai/ThoxAgent-2B:Q4_K_M
Run and chat with the model
lemonade run user.ThoxAgent-2B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Thox-ai/ThoxAgent-2B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default Thox-ai/ThoxAgent-2B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Thox-ai/ThoxAgent-2B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxAgent-2B:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "Thox-ai/ThoxAgent-2B:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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.
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 and for the 1.49 GB Q4_0 build, against 9 of 12 for the base |
| Runs on | ThoxAir, ThoxMini, ThoxClip, ThoxKey (host) and the ThoxUltra line, plus any Mac or PC with llama.cpp or Ollama |
| Status | v0.1.0, epoch-1 checkpoint, current. Run 2 (two epochs) scored 10/12 and was not released |
Evaluation
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 --jinjaand 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% |
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. The Q4_0 build gets it right (see Device builds) |
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-bench (Metal, 512-token prompt, 128 generated, 3 runs) on an idle AWS mac-m4pro.metal (Apple M4 Pro, 48 GB). Every build is in Device builds.
| Build | Generation tok/s | Prompt tok/s |
|---|---|---|
| Q4_0 | 127 | 1,596 |
| Q4_K_M | 119 | 1,511 |
| Q8_0 | 85 | 1,579 |
Not yet measured on ThoxMini or ThoxUltra hardware.
Device builds
Every build was scored on the same 12-task lane eval and benchmarked with llama-bench on an idle Apple M4 Pro (llama.cpp Metal). Format and guardrails pass at 100% on every build.
| Build | Size | Lane eval | Gen tok/s (M4 Pro) | Prompt tok/s (M4 Pro) | Ollama tag | sha256 |
|---|---|---|---|---|---|---|
| Q3_K_M | 1.29 GB | 9/12 | 94 | 1455 | v0.1.0-q3_k_m |
4e7b497f01ea... |
| Q4_0 | 1.49 GB | 12/12 | 127 | 1596 | v0.1.0-q4_0 |
6feb38f5e54c... |
| Q4_K_M | 1.56 GB | 11/12 | 119 | 1511 | v0.1.0-q4_k_m |
c266d355c535... |
| Q5_K_M | 1.81 GB | 12/12 | 96 | 1404 | v0.1.0-q5_k_m |
299cf6cde14e... |
| Q6_K | 2.07 GB | 12/12 | 98 | 1480 | v0.1.0-q6_k |
d012d40cddc0... |
| Q8_0 | 2.68 GB | 12/12 | 85 | 1579 | v0.1.0-q8_0 |
6fbdbd6da332... |
| F16 | 5.04 GB | 12/12 | 51 | 1659 | v0.1.0-f16 |
8a25a52914a0... |
Which build each THOX device runs. "Est. in use" is weights plus f16 KV cache at the default context plus about 256 MB of runtime. It is a planning figure, checked against the approved budgets (ThoxAir 2 GB, ThoxMini and ThoxClip 7 GB, ThoxUltra 10 GB). It has not yet been measured on device hardware.
| Device | Memory | Build | File | Est. in use | Approved budget | Ollama tag |
|---|---|---|---|---|---|---|
| ThoxAir | 4 GB | Q4_0 | 1.49 GB | 1.93 GB at 4K ctx | 2 GB | thoxair |
| ThoxMini | 12 GB | Q5_K_M | 1.81 GB | 2.43 GB at 8K ctx | 7 GB | thoxmini |
| ThoxClip | 12 GB | Q5_K_M | 1.81 GB | 2.43 GB at 8K ctx | 7 GB | thoxclip |
| ThoxKey | host | Q4_0 | 1.49 GB | 2.11 GB at 8K ctx | 2.2 GB | thoxkey |
| ThoxUltra | 16 GB | Q8_0 | 2.68 GB | 3.65 GB at 16K ctx | 10 GB | thoxultra |
| ThoxUltra Pro | 64 GB | F16 | 5.04 GB | 6.72 GB at 32K ctx | 8 GB (planning) | thoxultra-pro |
| ThoxUltra Pro+ | 128 GB | F16 | 5.04 GB | 6.72 GB at 32K ctx | 8 GB (planning) | thoxultra-proplus |
Q4_0 is the smallest build that keeps 12/12, and llama.cpp repacks it for the A733's Arm cores at load, so it is the ThoxAir, ThoxKey and latest default. Q3_K_M drops to 9/12 (the base model's score) and is not a default for any device.
Training
| 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_0.gguf --local-dir .
llama-server -m gguf/ThoxAgent-2B-Q4_0.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 latest (Q4_0), v0.1.0 (Q4_K_M), every build as v0.1.0-<quant>, and one tag per THOX device, see Device builds):
ollama run thox-ai/thoxagent-2b --think=false # latest, Q4_0
ollama run thox-ai/thoxagent-2b:thoxmini --think=false # the ThoxMini build
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-Q3_K_M.gguf, -Q4_0, -Q5_K_M, -Q6_K, -Q8_0 |
1.29 to 2.68 GB | see Device builds and reports/SHA256SUMS-gguf |
gguf/ThoxAgent-2B-F16.gguf |
5.04 GB | 8a25a52914a052053054fc0039712200870dab63b3a40a68845336946f848183 |
reports/ |
baseline, tuned and Q4 eval reports, gate decision, trainer state, data build log, device-quants.json (every build: size, sha256, eval, speed, device fit) |
|
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.
- Q4_K_M and Q3_K_M miss lane tasks; Q4_0 and larger builds pass all 12.
- Device memory figures are estimates; on-device speed and memory have not been measured yet.
- 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_K_M 11/12 (llama.cpp and Ollama), base 9/12. Same day: device builds Q3_K_M to F16 (Q4_0 and up 12/12) with one Ollama tag per THOX device; latest moved to Q4_0 |
| run 2 | 2026-12-03 | Not released. Two epochs, 4 new seeds: adapter and Q4 10/12, argument misses on repo-first and lint. Run 3 will fix the seeds |
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
- -
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Thox-ai/ThoxAgent-2B
Base model
openbmb/MiniCPM5-2BDataset used to train Thox-ai/ThoxAgent-2B
Evaluation results
- pass rate (adapter, bf16) on THOX lane eval v0.1self-reported1.000
- pass rate (Q4_K_M GGUF, llama.cpp) on THOX lane eval v0.1self-reported0.917
- pass rate (Q4_K_M GGUF, Ollama, thinking off) on THOX lane eval v0.1self-reported0.917
- pass rate (Q4_0 GGUF, llama.cpp; ThoxAir, ThoxKey, Ollama latest) on THOX lane eval v0.1self-reported1.000
- pass rate (Q5_K_M GGUF, llama.cpp; ThoxMini, ThoxClip) on THOX lane eval v0.1self-reported1.000
- pass rate (Q8_0 GGUF, llama.cpp; ThoxUltra) on THOX lane eval v0.1self-reported1.000
- pass rate (MiniCPM5-2B base) on THOX lane eval v0.1self-reported0.750
- format valid (all variants) on THOX lane eval v0.1self-reported1.000