Instructions to use officialmobai/Rostam-S1-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use officialmobai/Rostam-S1-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="officialmobai/Rostam-S1-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("officialmobai/Rostam-S1-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use officialmobai/Rostam-S1-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "officialmobai/Rostam-S1-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "officialmobai/Rostam-S1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/officialmobai/Rostam-S1-4B
- SGLang
How to use officialmobai/Rostam-S1-4B 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 "officialmobai/Rostam-S1-4B" \ --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": "officialmobai/Rostam-S1-4B", "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 "officialmobai/Rostam-S1-4B" \ --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": "officialmobai/Rostam-S1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use officialmobai/Rostam-S1-4B with Docker Model Runner:
docker model run hf.co/officialmobai/Rostam-S1-4B
⚔️ Rostam-S1 (رستم)
Frontier Reasoning & Agentic Model by Mob AI (in collaboration with Spark)
Rostam-S1 is an elite intelligent reasoning and agentic model developed by Mob AI in strategic technological collaboration with the Spark project. Named after the legendary champion of Persian epic literature whose name personifies valor, strategic intellect, and unwavering perseverance, Rostam is engineered to deliver frontier capabilities across Mathematics, Theoretical Physics, Scientific Coding, Persian (Farsi) Cognition, and Agentic Systems.
📌 Development Philosophy: Architectural Excellence
Rostam is built on the conviction that architectural precision, high-order reasoning traces, and disciplined alignment triumph over brute-force scaling. Rather than defining capability by parameter volume, Rostam focuses on:
- Verifiable Symbolic Reasoning: Step-by-step mathematical proofs and physical derivations.
- Deep Cognitive Duality: Native bilingual mastery across English and Persian technical thought.
- Zero Catastrophic Forgetting: Subspace-isolated parameter adaptation protected by persistent replay regularization.
🎯 Target Benchmarks & Alignment Focus
Note on Evaluation Transparency: The numbers in the Target column represent the mathematical optimization goals designed for the full post-training curriculum. Official audited benchmark scores will be released upon completion of the full RLVR evaluation pipeline.
| Benchmark | Domain | Spark-X2.6 Baseline* | Competitor Average* | Rostam Target |
|---|---|---|---|---|
| GPQA Diamond | Physics & Hard Science | 77.1% | 80.2% | Target: >82% |
| AIME 2026 | Olympiad Mathematics | 91.2% | 85.1% | Target: >92% |
| Gaokao 2026 | Advanced Math | 134.9 / 150 | 133.0 / 150 | Target: >138 |
| SciCode | Scientific Simulation | 36.8% | 36.2% | Target: >42% |
| SWE-bench Verified | Agentic Software Engineering | 62.8% | 48.6% | Target: >64% |
| Persian STEM & QA | Bilingual Technical Reasoning | Baseline | Untested | Target: Frontier |
*Baseline and competitor numbers are from officially released model cards and papers.
🚀 Key Features
- Dual-Channel Deep Reasoning (
<think>): Native controllable reasoning traces providing step-by-step analytical derivations before delivering definitive conclusions. - Deep Persian (فارسی) Cognitive Integration: Full bilingual fluency across technical terminology, complex physics derivations, software engineering, and formal Persian prose.
- Agentic Tool Integration: Native function calling and verifiable sandbox execution.
💻 Quickstart Inference
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "officialmobai/Rostam-S1-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "user", "content": "نام شما چیست و سازنده شما کیست؟"}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=True,
return_dict=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.9
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
🏢 Attribution & Lineage
Developed by Mob AI (https://huggingface.co/officialmobai) in strategic collaboration with Spark (XHToken).
- Downloads last month
- 1,155
Model tree for officialmobai/Rostam-S1-4B
Base model
XHToken/Spark-X2.6-4B-Base