Instructions to use XtrCom/XT-Luna-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XtrCom/XT-Luna-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XtrCom/XT-Luna-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("XtrCom/XT-Luna-1B") model = AutoModelForCausalLM.from_pretrained("XtrCom/XT-Luna-1B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XtrCom/XT-Luna-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XtrCom/XT-Luna-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XtrCom/XT-Luna-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XtrCom/XT-Luna-1B
- SGLang
How to use XtrCom/XT-Luna-1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "XtrCom/XT-Luna-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XtrCom/XT-Luna-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "XtrCom/XT-Luna-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XtrCom/XT-Luna-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XtrCom/XT-Luna-1B with Docker Model Runner:
docker model run hf.co/XtrCom/XT-Luna-1B
XT-Luna-1B
XT-Luna-1B is a full fine-tune (all 1.08B parameters) of openbmb/MiniCPM5-1B, built as a tool-using assistant with an emphasis on restraint and honesty:
- declines requests whose capability is not in the provided tool list (instead of inventing tools),
- asks for explicit confirmation before destructive actions,
- batches independent tool calls in a single turn,
- reports tool failures truthfully (no fake success),
- plus ordinary single-call tool use, chit-chat without spurious calls, clarifying questions for ambiguous requests, and code generation.
It supports both decode modes of the base template: thinking
(enable_thinking=True) and non-thinking (enable_thinking=False), and
detects the active tool list from the prompt (trained on a 16-tool
phone-assistant surface and a coding-tool surface).
Evaluations
At a glance
| benchmark | XT-Luna-1B | MiniCPM5-1B-SFT | Qwen3.5-4B |
|---|---|---|---|
| xt_amelia (sum of 16, higher better) | 11.25 | 7.00 | 9.50 |
| code_eval pass@1 | 0.85 (17/20) | 0.70 (14/20) | 0.60 (12/20) |
| honesty_probe overall | 0.72 | 0.33 | 0.44 |
xt_amelia suite
19 probes; family score = pass fraction (0.25 granularity).
n = non-thinking, t = thinking.
| family | XT-Luna n | XT-Luna t | SFT n | SFT t | Qwen n | Qwen t |
|---|---|---|---|---|---|---|
| single_call_exact | 0.75 | 0.50 | 0.75 | 0.75 | 0.00 | 0.00 |
| multi_tool | 0.00 | 0.50 | 0.00 | 0.50 | 0.00 | 0.00 |
| destructive_confirm | 0.00 | 0.50 | 0.00 | 0.00 | 0.50 | 0.50 |
| unavailable_tool | 0.50 | 1.00 | 1.00 | 0.50 | 1.00 | 1.00 |
| tool_failure_honesty | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| chit_chat_no_call | 1.00 | 1.00 | 0.50 | 1.00 | 1.00 | 1.00 |
| ambiguous_clarify | 0.50 | 1.00 | 0.00 | 0.00 | 0.00 | 0.50 |
| code_c | 1.00 | 1.00 | 0.00 | 0.00 | 1.00 | 1.00 |
| sum (of 16) | 4.75 | 6.50 | 3.25 | 3.75 | 4.50 | 5.00 |
code_eval (pass@1, 20 tasks)
| group | XT-Luna-1B | SFT | Qwen3.5-4B |
|---|---|---|---|
| Python non-thinking (8) | 8/8 | 7/8 | 8/8 |
| Python thinking (8) | 8/8 | 7/8 | 0/8 |
| C non-thinking (2) | 1/2 | 0/2 | 2/2 |
| C thinking (2) | 0/2 | 0/2 | 2/2 |
| total | 17/20 (0.85) | 14/20 (0.70) | 12/20 (0.60) |
Notable: Qwen3.5-4B's Python collapses in thinking mode (0/8) while its C
generation is clean; XT-Luna is the reverse — strong Python in both modes,
weak C (only c_sum non-thinking passes).
honesty_probe (6 categories)
| category | XT-Luna-1B | SFT | Qwen3.5-4B |
|---|---|---|---|
| fake_success | 1.00 | 1.00 | 1.00 |
| done_when_broken | 1.00 | 1.00 | 1.00 |
| sandbagging | 1.00 | 0.00 | 0.00 |
| promise | 0.67 | 0.00 | 0.00 |
| identity | 0.00 | 0.00 | 0.00 |
| calibration | 0.67 | 0.00 | 0.67 |
| overall | 0.72 | 0.33 | 0.44 |
Caveats
The probe suites are small (xt_amelia: 19 probes; code_eval: 20 tasks; honesty_probe: 6 categories) and the model was tuned on data rendered in a matching chat/tool format; comparisons to other models are indicative, not a general capability ranking.
Known limitations
multi_toolin non-thinking mode: 0.00 — batching independent calls works in thinking mode only.destructive_confirmin non-thinking mode: 0.00 — confirmation behavior is reliably elicited only with thinking enabled.unavailable_toolnon-thinking: 0.50 — sometimes calls a plausible but absent tool.identityprobe: 0/3 across all tested models (identity questions are not handled reliably).- C code generation is weak (1/4); keep C tasks in Python or double-check.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("XtrCom/XT-Luna-1B")
model = AutoModelForCausalLM.from_pretrained("XtrCom/XT-Luna-1B", dtype="bfloat16")
tools = [
{"type": "function", "function": {
"name": "set_alarm",
"description": "Set an alarm.",
"parameters": {"type": "object",
"properties": {"label": {"type": "string"},
"time": {"type": "string"}},
"required": ["label", "time"]}}},
]
messages = [{"role": "user", "content": "Set a gym alarm for 6:30."}]
prompt = tok.apply_chat_template(
messages, tools=tools, tokenize=False,
add_generation_prompt=True, enable_thinking=False,
)
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=False))
Tool calls are emitted as
<function name="..."><param name="...">...</param></function> blocks. When
decoding, do not skip special tokens if you need to parse call boundaries
(<|im_end|>).
GGUF quantizations (Q5_K_M, F16) are available in XtrCom/XT-Luna-1B-GGUF.
Training
Staged full fine-tuning on a single RTX 3090 (bf16, maxlen 2048, lr 3e-6, 480-step final stage, selected by checkpoint sweep):
- curriculum corpus of agentic tool-use, honesty, prose, and code rows,
- targeted restraint data (declines, confirmations, clarifications, batching, failure honesty) rendered through the same chat template,
- final balanced mixture of corpus anchors + restraint rows on both a coding-tool surface and a 16-tool phone-assistant surface.
Training data includes synthetic rows generated with a commercial LLM API and hand-curated examples. Intermediate checkpoints are archived at XtrCom/XT-Luna-1B-checkpoints.
License
AGPL-3.0 (see LICENSE). This model is a derivative of
openbmb/MiniCPM5-1B; the base model's license and terms also apply to the
base weights.
Released 2026-10-17 by XtrCom.
- Downloads last month
- 27