Instructions to use sunkencity/qwen25-3b-openclaw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sunkencity/qwen25-3b-openclaw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sunkencity/qwen25-3b-openclaw") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sunkencity/qwen25-3b-openclaw") model = AutoModelForCausalLM.from_pretrained("sunkencity/qwen25-3b-openclaw") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use sunkencity/qwen25-3b-openclaw with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("sunkencity/qwen25-3b-openclaw") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- vLLM
How to use sunkencity/qwen25-3b-openclaw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sunkencity/qwen25-3b-openclaw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sunkencity/qwen25-3b-openclaw", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sunkencity/qwen25-3b-openclaw
- SGLang
How to use sunkencity/qwen25-3b-openclaw 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 "sunkencity/qwen25-3b-openclaw" \ --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": "sunkencity/qwen25-3b-openclaw", "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 "sunkencity/qwen25-3b-openclaw" \ --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": "sunkencity/qwen25-3b-openclaw", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi new
How to use sunkencity/qwen25-3b-openclaw with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sunkencity/qwen25-3b-openclaw"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "sunkencity/qwen25-3b-openclaw" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use sunkencity/qwen25-3b-openclaw with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sunkencity/qwen25-3b-openclaw"
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:8080/v1 hermes config set model.default sunkencity/qwen25-3b-openclaw
Run Hermes
hermes
- MLX LM
How to use sunkencity/qwen25-3b-openclaw with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "sunkencity/qwen25-3b-openclaw"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "sunkencity/qwen25-3b-openclaw" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sunkencity/qwen25-3b-openclaw", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use sunkencity/qwen25-3b-openclaw with Docker Model Runner:
docker model run hf.co/sunkencity/qwen25-3b-openclaw
qwen25-3b-openclaw
A Qwen2.5-3B-Instruct model fine-tuned for exceptional tool/function calling ability, purpose-built as the local agent model for OpenClaw / LocalClaw served via vLLM.
Model Summary
| Property | Value |
|---|---|
| Base model | Qwen/Qwen2.5-3B-Instruct |
| Fine-tuning method | LoRA (rank=16, alpha=32, all 32 layers) |
| Training framework | mlx-lm on Apple M4 Max |
| Training data | ~57k tool-call examples (hermes-function-calling-v1 + glaive-function-calling-v2) |
| Training steps | 600 |
| Tool format | <tool_call> / </tool_call> (Qwen/Hermes convention) |
| Serving target | vLLM with --enable-auto-tool-choice --tool-call-parser hermes |
Evaluation
Evaluated on a held-out set of 50 tool-calling examples from the training distribution.
| Metric | Score |
|---|---|
| tool_score (composite) | 0.989 |
| name_accuracy | 1.000 |
| arg_f1 | 0.983 |
| parse_rate | 0.980 |
| val_loss | 0.010 |
- name_accuracy: fraction of examples where the correct function name was called
- arg_f1: token-level F1 between predicted and ground-truth arguments
- parse_rate: fraction of outputs that contained a valid, parseable
<tool_call>block - tool_score:
name_accuracy × 0.4 + arg_f1 × 0.4 + parse_rate × 0.2
What It's Good For
- OpenClaw / LocalClaw agent — drop-in local model for the tool-calling tier; handles calendars, email, web search, browser control, and custom skill tools
- Any OpenAI-compatible tool-use pipeline — responds to the standard
toolsparameter and produces structured function calls - Offline / privacy-first deployments — 3B parameters runs fast on Apple Silicon or a modest GPU; no cloud dependency
- Multi-tool selection — trained on examples with multiple available tools; reliably selects the right one
- Argument extraction — near-perfect extraction of typed arguments from natural-language queries
What It's Not Good For
- Long multi-turn reasoning chains (consider a larger model for orchestration)
- Tasks requiring no tools — the model is biased toward calling tools when they're available
- Languages other than English (training data is English-only)
Tool Call Format
The model outputs tool calls using the Hermes <tool_call> convention:
<tool_call>
{"name": "function_name", "arguments": {"arg1": "value1", "arg2": 42}}
</tool_call>
Multiple parallel calls are output sequentially, each in its own block.
The system prompt should include available tools in <tools></tools> XML tags:
You are a function calling AI model. You are provided with function signatures
within <tools> </tools> XML tags. You may call one or more functions to assist
with the user query.
<tools>
{"type": "function", "function": {"name": "get_weather", "description": "...", "parameters": {...}}}
</tools>
For each function call return a json object within <tool_call> </tool_call> tags.
Quick Start with vLLM
pip install vllm
vllm serve sunkencity/qwen25-3b-openclaw \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--port 8000
This exposes an OpenAI-compatible API at http://localhost:8000/v1 with structured tool_calls in responses.
Integration with OpenClaw / LocalClaw
LocalClaw auto-discovers models from a running vLLM server. After starting the server above, add to ~/.localclaw/openclaw.local.json:
{
"agents": {
"defaults": {
"model": {
"primary": "vllm/sunkencity/qwen25-3b-openclaw"
}
}
}
}
LocalClaw will route tool-calling tasks to this model automatically via the three-tier routing system.
Python Usage (mlx-lm)
from mlx_lm import load, generate
model, tokenizer = load("sunkencity/qwen25-3b-openclaw")
messages = [
{
"role": "system",
"content": (
"You are a function calling AI model.\n\n"
"<tools>\n"
'{"type": "function", "function": {"name": "get_weather", '
'"description": "Get current weather", "parameters": {"type": "object", '
'"properties": {"location": {"type": "string"}}, "required": ["location"]}}}\n'
"</tools>\n\n"
"For each function call return a json object within <tool_call> </tool_call> tags."
),
},
{"role": "user", "content": "What is the weather in San Francisco?"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256, verbose=False)
print(response)
# <tool_call>
# {"name": "get_weather", "arguments": {"location": "San Francisco"}}
# </tool_call>
Training Details
Datasets:
- NousResearch/hermes-function-calling-v1 — 1,883 examples, already in
<tool_call>format - glaiveai/glaive-function-calling-v2 — 55,000 examples converted from
<functioncall>format
Preprocessing:
- Conversations truncated to the first tool-call turn (system + user + assistant) to ensure tool call output is always within the sequence budget
<functioncall>→<tool_call>normalization including balanced-brace extraction and single-quoted argument repair- 90/5/5 train/valid/eval split
LoRA config:
fine_tune_type: lora
num_layers: 32 # all transformer layers
lora_parameters:
rank: 16
alpha: 32
dropout: 0.0
scale: 10.0
optimizer: adamw
learning_rate: 2e-4
batch_size: 4
iters: 600
max_seq_length: 2048
mask_prompt: true # loss only on assistant turns
grad_checkpoint: true
Hardware: Apple M4 Max (128 GB unified memory), ~34 minutes wall-clock
Training Code
Training was performed using the tool-tuner framework — an autoresearch-inspired autonomous LoRA experiment loop built with mlx-lm.
License
Apache 2.0 — same as base model.
- Downloads last month
- 101
Quantized