PEFT
Safetensors
tool-use
lora
qlora
unsloth
synthetic-data

MiniCPM5-2B brand-tools controller (LoRA adapter, nim-host v1)

LoRA adapter fine-tuned on the MiniCPM5-2B base (openbmb/MiniCPM5-2B, revision 12a3808a956f869c767195e9266b59c4d21d92e2) to operate exactly two deterministic TypeScript tools: verify_company_website and find_customer_facing_pages.

What this model is

A narrow tool-use controller. It learns input-form mapping, tool order, argument discipline, clarification, honest status reporting, and expiry/foreign-ID recovery. Page selection, ownership facts and brand-voice admission live in the tools, not the model. Writing, profiling and copywriting are not training targets.

Training data

Synthetic only. The adapter was trained on sft/train.jsonl of corpus revision 2026-09-21 (1,032 conversations, 2,856 assistant decisions, 43 base families), generated by executing the real tools against deterministic fixture worlds. There are zero live-company or human-reviewed training examples. Fixture success is not real-world accuracy.

Recipe

Trainer train_unsloth.py (unsloth 2026.9.7 used only for the model; repo's own batching, masking, resume)
LoRA r=16, alpha=32, dropout 0, target modules q/k/v/o/gate/up/down
Learning rate 1e-4, cosine, warmup 3%
Epochs 2 (4,168 optimizer steps)
Quantization NF4 (4-bit) base, bf16 compute
Tokenization per-decision, assistant-only masking, native chat template (enable_thinking=False), template hash cc945752...
Max sequence 16,384 (longest decision 9,809 tokens)
Host NVIDIA RTX PRO 6000 Blackwell (sm_120), MIG 4g.96gb slice
Wall clock 3h 14m, 1,264 tok/s overall, 26.1 GiB peak
Validation loss 0.0 over 714 decisions (saturation signal; harness pass rate is the selection criterion)

An epoch-1 adapter was also saved; scores reported per checkpoint when evaluation completes.

Evaluation status

Full 258-episode validation on corpus revision 2026-09-21 (training-runs/reports/nim-validation-2026-09-21.md): 258/258 episodes (scenario macro 1.000, every one of the 43 families 6/6) against the untouched base at 0/258. Serving was the unmerged adapter over the same NF4 base used for training, greedy (temperature 0), thinking off, on the nim host (RTX PRO 6000 Blackwell MIG 4g.96gb). The base model failed every episode, missing the final-answer schema in 252 of 258 and looping past the 10-step cap in 114. Paired difference +1.000, standard error clustered by family. Synthetic fixture worlds only: fixture success is not real-world accuracy. An earlier adapter trained on the 2026-09-18 revision scored 252/258 on that revision; that score is retired and not comparable.

Using this adapter

The adapter is a LoRA delta, meant to be attached to the 4-bit base, not merged:

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

base = "openbmb/MiniCPM5-2B"
quant = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
                           bnb_4bit_compute_dtype=torch.bfloat16)
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, quantization_config=quant,
                                             device_map={"": 0})
model = PeftModel.from_pretrained(model, "G33-k/minicpm5-2b-brand-tools-controller-lora")

Call the two tools with the public schemas, one tool call per assistant turn, greedy and with thinking off. The source repository wraps this into an OpenAI-compatible endpoint (training-runs/serve_openai.py) and scores it with the fixture harness:

(cd minicpm5-eval-kit && node --experimental-strip-types scripts/evaluate.ts \
  --mode model --split validation --base-url http://127.0.0.1:30000/v1 \
  --model minicpm5-adapter --out ../training-runs/reports/minicpm5-adapter-validation.json)

Full instructions, including the decode and argument-coercion rules for this model family, are in minicpm5-eval-kit/docs/EVALUATION_GUIDE.md section 7 of github.com/geekhoo/minicpm5-2b-voice.

Serving notes

MiniCPM5 registers <function, <param, </function>, <tool_call> as special tokens: decode with skip_special_tokens=False and trim only the chat controls, or every tool call silently disappears. Tool-call parameters must be coerced by declared schema type, per OpenBMB's minicpm5xml_tool_parser.py. Serve greedy, thinking off. Evaluate the unmerged adapter on the NF4 base it trained against.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for G33-k/minicpm5-2b-brand-tools-controller-lora

Adapter
(12)
this model

Dataset used to train G33-k/minicpm5-2b-brand-tools-controller-lora