Instructions to use UraionLabs/uraion-forge-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UraionLabs/uraion-forge-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UraionLabs/uraion-forge-2b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("UraionLabs/uraion-forge-2b") model = AutoModelForCausalLM.from_pretrained("UraionLabs/uraion-forge-2b", 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 UraionLabs/uraion-forge-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UraionLabs/uraion-forge-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": "UraionLabs/uraion-forge-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UraionLabs/uraion-forge-2b
- SGLang
How to use UraionLabs/uraion-forge-2b 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 "UraionLabs/uraion-forge-2b" \ --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": "UraionLabs/uraion-forge-2b", "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 "UraionLabs/uraion-forge-2b" \ --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": "UraionLabs/uraion-forge-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UraionLabs/uraion-forge-2b with Docker Model Runner:
docker model run hf.co/UraionLabs/uraion-forge-2b
⚡ Uraion Forge 2B
High-Throughput Quantitative Reasoning & Agentic Tool Inference Engine
Developed by Uraion Labs
Overview
Uraion Forge 2B is an ultra-compact, high-performance language model engineered specifically for edge execution, multi-turn agentic tool calling, and high-throughput quantitative reasoning. Developed by Uraion Labs, Forge 2B transforms a 2-billion parameter foundation into a deterministic, production-grade sub-agent.
Built on the robust MiniCPM5-2B architecture (Llama-style transformer with Grouped-Query Attention and 131k RoPE context), Forge 2B features targeted post-training regularizations that resolve the most notorious failure modes of small reasoning models: token-budget exhaustion ("runaway thinking"), parameter hallucination, and multi-turn state drift.
Whether deployed across enterprise production clusters via PyTorch / Transformers / vLLM, or on edge devices, Uraion Forge 2B delivers enterprise-tier agentic reliability with deterministic execution.
Available Formats & Ecosystem
| Package | Format / Framework | Primary Use Case | Target Hardware | Repository Link |
|---|---|---|---|---|
| Base Model (This Repo) | Safetensors (BF16 / FP16) | Universal deployment, PyTorch, Transformers, vLLM, SGLang, TGI | NVIDIA GPUs (CUDA), AMD (ROCm), Linux, Windows, macOS | **** |
| Apple Silicon Native | MLX (4-bit, 8-bit, 16-bit) | Bare-metal Mac inference (90-120+ tok/s), unified memory | Apple Silicon (M1/M2/M3/M4/M5/M6) | **** |
| GGUF & Dynamic Quants | GGUF (Q2 to F16) | Ollama, llama.cpp, LM Studio, mobile / low-VRAM edge | CPU, Metal, Vulkan, Edge Devices | **** |
Key Model Highlights
- ⚡ Blazingly Fast Local Edge Execution: At 2B active parameters, Forge 2B fits comfortably within 4 GB to 11 GB of unified memory, executing at over 90+ tokens/second on Apple Silicon M-series chips via native MLX and modern NVIDIA RTX GPUs via PyTorch.
- 🧠 Concise Chain-of-Thought (CoT) Regularization: Eliminates the classic small-model pathology of runaway reasoning loops. Forge 2B is trained to allocate internal
<think>...</think>tokens proportionally to task complexity, or bypass internal CoT entirely for instant, direct programmatic answers. - 🛠️ Autonomous Agentic Tool Reliability (90.5%): Outperforms comparable compact models on multi-turn API workflows. Native support for optimistic concurrency resolution (e.g.
CONFLICT$\to$ re-read $\to$ re-acquire locks), idempotent retry handling, and complex multi-parameter JSON schema adherence. - ❓ Active Disambiguation & Clarification: Replaces arbitrary parameter hallucination with explicit clarification queries. When critical function parameters are omitted, Forge 2B halts execution and prompts the user with an interrogative question ending in
'?'. - 📈 Zero Degradation Capability Retention: Retains 100% of core pre-trained general knowledge while achieving 75.0% long-context needle retrieval (+16.7 pp improvement over base) and 58.8% MMLU / multi-choice reasoning retention.
Technical Specifications
| Parameter | Specification | Notes |
|---|---|---|
| Base Architecture | MiniCPM5-2B (LlamaForCausalLM) |
Pinned commit abe115e887989b14f05e64a3b260648329324c3f |
| Active Parameters | 2,048,286,720 (2.05B) | Full model active during forward pass |
| Layers | 42 | Transformer decoder layers |
| Hidden Dimension | 2048 | Model representation width |
| Intermediate Dimension | 6144 | SwiGLU feed-forward projection |
| Attention Heads | 16 Query Heads / 2 Key-Value Heads | Grouped-Query Attention (GQA 8:1) |
| Context Window | 16,384 native tokens (131k RoPE ceiling) | Tested up to 32k retrieval needles |
| Vocab Size | 73,440 tokens | SentencePiece / BPE vocabulary |
| Precision Formats | bfloat16 / float16 / float32 / 8-bit quantized | Native MLX safetensors & PyTorch weights |
| Target Hardware | Apple Silicon (M1/M2/M3/M4/M5/M6) & CUDA GPUs | Sub-second cold start on edge hardware |
| License | Apache 2.0 | Commercial and open-source permissive |
Quickstart Guides
1. Apple Silicon MLX Quickstart (mlx-lm)
Uraion Forge 2B is natively tuned for Apple Silicon Unified Memory via Apple's MLX framework:
pip install mlx-lm
from mlx_lm import load, generate
# 1. Load Forge 2B
model, tokenizer = load("uraionlabs/uraion-forge-2b")
# 2. Prepare structured chat prompt
messages = [
{
"role": "system",
"content": "You are Uraion Forge, an advanced autonomous reasoning and coding assistant developed by Uraion Labs."
},
{
"role": "user",
"content": "Write an efficient Python class implementing an asynchronous ring buffer with thread-safe append and pop methods."
}
]
prompt_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
# 3. Generate response with optimal temperature
response = generate(
model=model,
tokenizer=tokenizer,
prompt=prompt_text,
max_tokens=1024,
temp=0.2,
verbose=True
)
print(response)
2. PyTorch & Hugging Face Transformers Quickstart
Deploy on NVIDIA GPUs or CPU instances using standard Hugging Face Transformers:
pip install transformers torch accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if torch.cuda.is_available() else torch.float32
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("uraionlabs/uraion-forge-2b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"uraionlabs/uraion-forge-2b",
torch_dtype=dtype,
device_map="auto" if device == "cuda" else None,
trust_remote_code=True
)
if device != "cuda":
model.to(device)
# Formulate prompt
messages = [
{
"role": "system",
"content": "You are Uraion Forge, an advanced autonomous reasoning and coding assistant developed by Uraion Labs."
},
{
"role": "user",
"content": "Write an optimized Python algorithm for computing rolling volume-weighted average price (VWAP) over streaming ticks."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(device)
with torch.no_grad():
outputs = model.generate(
inputs,
max_new_tokens=1024,
temperature=0.2,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(response)
3. Structured Agentic Tool Calling & Disambiguation
Uraion Forge 2B supports deterministic JSON function calling and zero-hallucination clarification loops:
import json
# Define your tools schema
tools = [
{
"type": "function",
"function": {
"name": "query_timeseries_metric",
"description": "Query historical metric time series data for an asset or system component.",
"parameters": {
"type": "object",
"properties": {
"asset_id": {"type": "string", "description": "Asset or cluster symbol."},
"metric_name": {"type": "string", "description": "Metric name (e.g., 'volume_vwap', 'latency_p99')."},
"window_minutes": {"type": "integer", "description": "Window duration (1 to 1440 minutes)."}
},
"required": ["asset_id", "metric_name"]
}
}
}
]
system_prompt = (
"You are Uraion Forge, an autonomous agent capable of utilizing external tools and APIs.\n"
"When invoking a tool, respond with a JSON markdown code block matching the specified schema.\n"
"If a required parameter is omitted by the user, DO NOT guess or hallucinate the parameter; "
"instead, formulate a concise, direct clarification query terminating with a question mark ('?').\n\n"
f"Available Tools:\n{json.dumps(tools, indent=2)}"
)
# Example 1: Fully-specified query -> Generates structured JSON tool call
user_msg_1 = "Retrieve the 60-minute volume_vwap metric for asset 'URAI-ALPHA'."
# Forge 2B Output:
# ```json
# {
# "name": "query_timeseries_metric",
# "arguments": {
# "asset_id": "URAI-ALPHA",
# "metric_name": "volume_vwap",
# "window_minutes": 60
# }
# }
# ```
# Example 2: Missing required parameter -> Generates clarification query ending in '?'
user_msg_2 = "Query the timeseries metric for asset 'URAI-ALPHA'."
# Forge 2B Output:
# "Which metric_name (such as 'volume_vwap' or 'latency_p99') would you like to query for asset 'URAI-ALPHA'?"
Empirical Benchmark Performance
Uraion Forge 2B was rigorously evaluated across unseen confirmation benchmarks, development suites, and general capability retention probes.
1. Sealed Confirmation Benchmark Performance
Evaluated on 41 sealed, held-out tasks (20 programmatic coding specifications and 21 multi-turn agentic workflows across 6 distinct software environments):
| Mode / Configuration | Task Domain | Pass Rate | Successful / Total | Truncated Turns | Generation Latency |
|---|---|---|---|---|---|
| Agentic Tool Confirmation (Primary) | Tool Workflows | 90.5% | 19 / 21 | 2 / 21 | 2,043s |
| Agentic Tool Confirmation (Secondary) | Tool Workflows | 61.9% | 13 / 21 | 0 / 21 | 273s |
| Concise Code Generation (Secondary) | Direct Coding | 35.0% | 7 / 20 | 2 / 20 | 368s |
| Unconstrained Thinking Coding (Primary) | Direct Coding | 15.0% | 3 / 20 | 16 / 20 | 4,076s |
Production Recommendation: For direct code synthesis and programmatic calculations, operate the model in Secondary Mode (
thinking: false). This reduces truncation errors by 87.5% (from 16 down to 2) and increases execution throughput tenfold. For complex multi-turn API workflows requiring state tracking, enable Primary Mode (thinking: true) for 90.5% tool reliability.
2. General Capability Retention & Long-Context Suite
To verify that specialized agentic training did not degrade foundation capabilities, Forge 2B was audited across the 252-probe General Retention Suite against the untouched base foundation:
| Evaluation Domain | Base Model | Uraion Forge 2B | Delta | Status |
|---|---|---|---|---|
| Long-Context Needle Retrieval (16k–32k) | 58.3% (7/12) | 75.0% (9/12) | +16.7 pp | 🚀 Substantial Gain |
| Multiple Choice Reasoning (MMLU subset) | 60.1% (137/228) | 58.8% (134/228) | -1.3 pp | ✅ Preserved |
| Structured JSON Schema Extraction | 91.7% (11/12) | 83.3% (10/12) | -8.4 pp | ✅ Retained |
| Zero-Truncation Reliability Rate | 100.0% (252/252) | 100.0% (252/252) | 0.0 pp | ✅ 100% Valid Completion |
3. Numerical Verification & Export Drift
Every release artifact is structurally audited across 381 tensor weights:
- FP32 Reference Merge: Bit-level numerical equivalence verified with mean KL divergence of $1.55 \times 10^{-7}$ and 100.0% top-1 token agreement against the unfused dynamic LoRA adapter.
- Serving Smoke Pass: 100% verified pass rate on local loopback HTTP serving (
http://127.0.0.1:8899/v1) across structured JSON output, sandboxed Python code execution, and multi-turn native tool calls.
High-Throughput Quantitative Reasoning & Safeguards
Uraion Forge 2B is trained to excel at general quantitative, mathematical, and algorithmic reasoning:
- Data Structures & Streaming: High-performance ring buffers, lock-free queues, exponential moving averages, and streaming statistics.
- Concurrency & State Management: Multi-turn optimistic concurrency controls, version conflict detection (
409 Conflict), and asynchronous job polling. - Strict Privacy Guarantees: Uraion Forge 2B was post-trained exclusively on public synthetic code, standard open benchmarks, and structural API interfaces. No proprietary trading alpha, execution strategies, order flow mechanisms, or internal financial datasets are present in this model.
Citation & Contact
If you use Uraion Forge 2B in your research or applications, please cite:
@misc{uraionlabs2026forge2b,
title={Uraion Forge 2B: High-Throughput Quantitative Reasoning and Autonomous Agentic Tool Inference at the Edge},
author={{Uraion Labs Technical Team}},
year={2026},
howpublished={\url{https://huggingface.co/uraionlabs/uraion-forge-2b}},
note={Uraion Labs Open Source Release}
}
For inquiries, enterprise deployments, and partnership information, visit Uraion Labs.
- Downloads last month
- 577