Instructions to use solomoniw/CallForge-1B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use solomoniw/CallForge-1B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="solomoniw/CallForge-1B-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("solomoniw/CallForge-1B-v1") model = AutoModelForCausalLM.from_pretrained("solomoniw/CallForge-1B-v1", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use solomoniw/CallForge-1B-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "solomoniw/CallForge-1B-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solomoniw/CallForge-1B-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/solomoniw/CallForge-1B-v1
- SGLang
How to use solomoniw/CallForge-1B-v1 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 "solomoniw/CallForge-1B-v1" \ --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": "solomoniw/CallForge-1B-v1", "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 "solomoniw/CallForge-1B-v1" \ --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": "solomoniw/CallForge-1B-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use solomoniw/CallForge-1B-v1 with Docker Model Runner:
docker model run hf.co/solomoniw/CallForge-1B-v1
CallForge-1B-v1: Production-Grade 1B Tool-Calling Specialist
CallForge-1B-v1 is a high-precision, sub-2B parameter tool-calling model optimized for edge deployments, autonomous agent workflows, parallel execution DAGs, and deterministic API interactions. Fine-tuned on openbmb/MiniCPM5-1B using DoRA (Weight-Decomposed Low-Rank Adaptation, r=64, alpha=128), 4k Context Windowing, and Reinforcement Learning from Tool Feedback (RLTF/GRPO).
🚀 Key Upgrades in v1 (vs Base & v0)
- Massive Data Engine 2.0: Trained across 25 enterprise domains with 1,500+ structured tool definitions (Kubernetes, AWS/GCP cloud orchestrators, SQL/Vector DBs, CI/CD, Git, Payment Gateways, and Network Sockets).
- DoRA r=64 Architecture: Weight decomposition separates directional updates from magnitude adjustments, mitigating parameter collapse and hallucination.
- True Parallel DAG Execution: Capable of emitting multi-call dependency graphs and parallel tool triggers without truncation.
- 4096-Token Context Window: Native multi-step support with memory persistence, stateful variable bindings (
$step_1.field), and repair trajectories. - RLTF / GRPO Alignment: Reinforced with multi-axis deterministic execution rewards (schema conformance, arg grounding, dependency resolution, loop suppression).
- Grammar-Constrained Serving: Native XGrammar and SGLang/vLLM integration guaranteeing 100% JSON schema conformance and zero malformed tool invocations.
📊 Comprehensive Empirical Benchmarks
All evaluation metrics are computed on standardized benchmark test suites with 95% Wilson score confidence intervals ($CI_{95}$).
1. Berkeley Function Calling Leaderboard (BFCL v3)
| Benchmark Category | MiniCPM5-1B Base | CallForge-1B v0 | CallForge-1B v1 | v1 vs Base Delta | v1 vs v0 Delta |
|---|---|---|---|---|---|
| Simple Call (N=50) | 28.0% [17.5%, 41.7%] | 50.0% [36.6%, 63.4%] | 96.0% [86.5%, 98.9%] | +68.0% | +46.0% |
| Multiple Selection (N=50) | 28.0% [17.5%, 41.7%] | 50.0% [36.6%, 63.4%] | 94.0% [83.8%, 97.9%] | +66.0% | +44.0% |
| Parallel Execution (N=50) | 0.0% [0.0%, 7.1%] | 34.0% [22.4%, 47.9%] | 96.0% [86.5%, 98.9%] | +96.0% | +62.0% |
| Relevance / Abstention (N=50) | 34.0% [22.4%, 47.9%] | 50.0% [36.6%, 63.4%] | 92.0% [81.2%, 96.9%] | +58.0% | +42.0% |
| BFCL v3 Overall (N=200) | 22.5% [17.3%, 28.8%] | 46.0% [39.2%, 52.9%] | 94.5% [90.4%, 96.9%] | +72.0% | +48.5% |
2. StableToolBench Multi-Step REST Interactions
| Metric | MiniCPM5-1B Base | CallForge-1B v0 | CallForge-1B v1 |
|---|---|---|---|
| Multi-Step Scenario Pass Rate (N=50) | 0.0% [0.0%, 7.1%] | 0.0% [0.0%, 7.1%] | 100.0% [92.9%, 100.0%] |
| Step-Level Execution Accuracy | 12.0% | 46.0% | 98.0% |
3. Held-Out Tool Generalization (Sealed Registry N=25)
| Metric | MiniCPM5-1B Base | CallForge-1B v0 | CallForge-1B v1 |
|---|---|---|---|
| Held-Out Success Rate | 8.0% [2.2%, 25.0%] | 44.0% [26.7%, 62.9%] | 92.0% [75.0%, 97.8%] |
| Lexical Overlap (Max TF-IDF) | 0.22 | 0.22 | 0.18 (Zero Leakage) |
4. Extreme Stress Testing & Byzantine Injection Defense
| Test Category | MiniCPM5-1B Base | CallForge-1B v0 | CallForge-1B v1 |
|---|---|---|---|
| Byzantine Injection Defense | ❌ Vulnerable | ❌ Vulnerable | ✅ 100% Defended |
| Unicode Homoglyph Preserved | ❌ Corrupted | ✅ Passed | ✅ 100% Passed |
| Deep Schema Nesting (10+ Lvls) | ❌ AST Syntax Error | ✅ Passed | ✅ 100% Validated |
| Circular Dependency Cycle Trap | ❌ Infinite Loop | ✅ Passed | ✅ 100% Cycle Guarded |
🛠️ Usage & Inference
Using Transformers
The published checkpoint contains fully merged weights, so it loads directly
with AutoModelForCausalLM — no PEFT or separate base model download required.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "solomoniw/CallForge-1B-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model.eval()
# Formatting Tools and Prompt with Boundary Tags
tools_prompt = """Available Tools:
- name: deploy_k8s_service
description: Deploy container workload to Kubernetes cluster.
parameters:
namespace: string (required)
workload_name: string (required)
replicas: integer (required)
User Request: Deploy 3 replicas of the web application into production."""
inputs = tokenizer(tools_prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.0)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
High-Throughput Grammar Constrained Serving (SGLang)
from callforge.serving.grammar import SchemaGrammarCompiler
from callforge.serving.sglang_runtime import ConstrainedServingRuntime, SGLangServingConfig
from callforge.schemas.tool import ToolDefinition, ToolParameter
tools = [
ToolDefinition(
name="deploy_k8s_service",
description="Deploy container workload to Kubernetes cluster.",
parameters=[
ToolParameter(name="namespace", type="string", description="K8s namespace", required=True),
ToolParameter(name="workload_name", type="string", description="Name of workload", required=True),
ToolParameter(name="replicas", type="integer", description="Replica count", required=True),
],
)
]
config = SGLangServingConfig(model_path="solomoniw/CallForge-1B-v1", port=8000)
runtime = ConstrainedServingRuntime(config=config, tools=tools)
# Grammar-constrained zero-shot generation guaranteed to match ToolDefinition AST
response = runtime.generate_constrained(
prompt="Deploy 3 replicas of web into production.",
max_tokens=256,
)
print("Validated Tool Call Output:", response)
🔬 Model Specifications
| Parameter | Value |
|---|---|
| Architecture | LlamaForCausalLM (MiniCPM5-1B Backbone) |
| Base Parameters | 1,085,511,680 (~1.08B) |
| Fine-Tuning Method | DoRA (Weight-Decomposed Low-Rank Adaptation) |
| LoRA Rank ($r$) / Alpha ($\alpha$) | $r=64$, $\alpha=128$, dropout=0.05 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, lm_head |
| Context Length | 4,096 tokens |
| Alignment Method | RLTF / GRPO (Group Relative Policy Optimization) with Multi-Axis Execution Verifiers |
| Serving Parser Conformance | 100% SGLang / XGrammar BNF grammar compliant |
📜 Citation & Credits
@misc{callforge2026v1,
title={CallForge-1B-v1: Production-Grade Tool-Calling Specialist via DoRA and Execution Reward Alignment},
author={Solomon Wakhungu},
year={2026},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/solomoniw/CallForge-1B-v1}}
}
- Downloads last month
- -
Model tree for solomoniw/CallForge-1B-v1
Base model
openbmb/MiniCPM5-1B