---
title: "Rostam-S1-4B"
kind: "Kit"
category: "Research"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/cfbcbe6f-688a-41e9-9fee-f248a5042fb6"
updated: "2026-11-13"
---

# Rostam-S1-4B

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Reasons step by step through math, physics, scientific code and Persian or English questions, with tool calling. A 4.1B model built on Spark-X2.6-4B, for people who want a small bilingual reasoner.

Rostam-S1-4B is a kit in the Research category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by officialmobai

## About

### What it is

Rostam-S1 is a text generation model from Mob AI, published as officialmobai and built together with the Spark project. It starts from XHToken's Spark-X2.6-4B, has 4.1B parameters and comes as Safetensors files for transformers. It targets math, theoretical physics, scientific coding, Persian and English reasoning, and agent tasks.

### Who it suits

It suits people who want a compact model that shows its working, especially in Persian or English. The card also points to developers who need function calling.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Education | Students and teachers working in Persian or English | Work through math and physics problems with written reasoning | A derivation explained step by step in Persian |
| Software | Developers | Try scientific coding help and tool calling on a small model | A short script for a simulation task |
| Research | Machine learning researchers | Study a 4B reasoning model built on Spark-X2.6-4B | A side by side look at the base model and this one |

You can skip it if you need audited benchmark scores today, or a model for languages other than English and Persian.

### Where to use it

- Python with the transformers library, on Windows, macOS or Linux
- A GPU, since the sample loads the weights in bfloat16
- Other people's quantized copies, of which Hugging Face lists three

| Use case | Who | What they get back |
| --- | --- | --- |
| Solve a math or physics question | Students | A reasoning trace followed by an answer |
| Ask in Persian | Persian speakers | Technical answers in Persian |
| Try agent style tool calls | Developers | Function calls the model decides to make |

### How to set it up

- Python and pip
- Memory for the weights: about 8.2 GB in BF16, or about 2.1 GB at 4-bit by estimate
- A GPU is the practical choice for a 4.1B model

1. Install the Hugging Face hub package.
2. Download the model files to your computer.
3. Load the model with transformers, as in the next section.

```sh
pip install -U huggingface_hub
hf download officialmobai/Rostam-S1-4B
```

### How to use it

Send a chat message and keep thinking turned on, so the model writes its reasoning before the answer. The sample sets trust\_remote\_code to True, which runs code shipped in the model repository.

```python
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))
```

| Tool | What it does |
| --- | --- |
| apply\_chat\_template | Turns your messages into the prompt format the model expects |
| enable\_thinking=True | Turns on the reasoning trace before the final answer |
| generate | Writes the reply, here with up to 512 new tokens, temperature 0.7 and top\_p 0.9 |
| tokenizer.decode | Turns the generated tokens back into text |

### Example

Run the sample as it is. It asks, in Persian, for the model's name and its maker. With thinking on, the model writes out a reasoning trace and then gives its answer.

### For newcomers and experts

This is a small chat model that can show how it reached an answer. For a first try, run the sample, then swap the Persian question for a short math problem and read the reasoning it writes first.

The card says it was adapted from Spark-X2.6-4B with subspace isolated parameter updates and replay regularization, to avoid forgetting what the base knew. It lists native function calling and sandbox execution. Its benchmark table holds targets only, and the authors say audited scores will follow the full post training evaluation.

You send a message in English or Persian → The chat template turns thinking on → The model writes a reasoning trace → The final answer follows the trace

### Good to know

The numbers in the card's benchmark table are goals the team set, not measured results. Compare the base model's figures with care, since they come from other model cards and papers.

- License: Apache 2.0
- Cost to run: none named, you supply the hardware
- Data it reaches: downloads files from Hugging Face, and the sample runs code shipped in the model repository
- Not for: relying on its benchmark numbers, which are targets and not results

## README

````markdown
# Rostam-S1-4B

Reasons step by step through math, physics, scientific code and Persian or English questions, with tool calling. A 4.1B model built on Spark-X2.6-4B, for people who want a small bilingual reasoner.

Made by officialmobai on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: Rostam-S1 is a text generation model from Mob AI, published as officialmobai and built together with the Spark project. It starts from XHToken's Spark-X2.6-4B, has 4.1B parameters and comes as Safetensors files for transformers. It targets math, theoretical physics, scientific coding, Persian and English reasoning, and agent tasks.

Who it suits: It suits people who want a compact model that shows its working, especially in Persian or English. The card also points to developers who need function calling.

```table
Industry | Who uses it | How they use it | Example
Education | Students and teachers working in Persian or English | Work through math and physics problems with written reasoning | A derivation explained step by step in Persian
Software | Developers | Try scientific coding help and tool calling on a small model | A short script for a simulation task
Research | Machine learning researchers | Study a 4B reasoning model built on Spark-X2.6-4B | A side by side look at the base model and this one
```

You can skip it if you need audited benchmark scores today, or a model for languages other than English and Persian.

Where to use it:

- Python with the transformers library, on Windows, macOS or Linux
- A GPU, since the sample loads the weights in bfloat16
- Other people's quantized copies, of which Hugging Face lists three

```table
Use case | Who | What they get back
Solve a math or physics question | Students | A reasoning trace followed by an answer
Ask in Persian | Persian speakers | Technical answers in Persian
Try agent style tool calls | Developers | Function calls the model decides to make
```

How to set it up:

- Python and pip
- Memory for the weights: about 8.2 GB in BF16, or about 2.1 GB at 4-bit by estimate
- A GPU is the practical choice for a 4.1B model

1. Install the Hugging Face hub package.
2. Download the model files to your computer.
3. Load the model with transformers, as in the next section.

```sh
pip install -U huggingface_hub
hf download officialmobai/Rostam-S1-4B
```

How to use it: Send a chat message and keep thinking turned on, so the model writes its reasoning before the answer. The sample sets trust_remote_code to True, which runs code shipped in the model repository.

```python
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))
```

```table
Tool | What it does
apply_chat_template | Turns your messages into the prompt format the model expects
enable_thinking=True | Turns on the reasoning trace before the final answer
generate | Writes the reply, here with up to 512 new tokens, temperature 0.7 and top_p 0.9
tokenizer.decode | Turns the generated tokens back into text
```

Example: Run the sample as it is. It asks, in Persian, for the model's name and its maker. With thinking on, the model writes out a reasoning trace and then gives its answer.

For newcomers and experts: This is a small chat model that can show how it reached an answer. For a first try, run the sample, then swap the Persian question for a short math problem and read the reasoning it writes first.

The card says it was adapted from Spark-X2.6-4B with subspace isolated parameter updates and replay regularization, to avoid forgetting what the base knew. It lists native function calling and sandbox execution. Its benchmark table holds targets only, and the authors say audited scores will follow the full post training evaluation.

```flow
You send a message in English or Persian
The chat template turns thinking on
The model writes a reasoning trace
The final answer follows the trace
```

Good to know: The numbers in the card's benchmark table are goals the team set, not measured results. Compare the base model's figures with care, since they come from other model cards and papers.

- License: Apache 2.0
- Cost to run: none named, you supply the hardware
- Data it reaches: downloads files from Hugging Face, and the sample runs code shipped in the model repository
- Not for: relying on its benchmark numbers, which are targets and not results

## On Hugging Face, 13 November 2026

- Task: text generation
- Library: transformers
- Parameters: 4.1B
- Weights: about 8.2 GB in BF16; about 2.1 GB at 4-bit (estimate)
- Formats: Safetensors
- Downloads in the last 30 days: 2,751
- Likes: 5
- License: apache-2.0
- Languages: en, fa
- Based on: XHToken/Spark-X2.6-4B
- Quantized versions: 3
- Tags: transformers, safetensors, spark2_5, text-generation, reasoning, math, physics, persian, code, agentic, mob-ai, rostam

## Links

- Model: https://huggingface.co/officialmobai/Rostam-S1-4B
- Files: https://huggingface.co/officialmobai/Rostam-S1-4B/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download officialmobai/Rostam-S1-4B
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 6 KB, downloaded as a zip.

```text
README.md  6 KB
```

## Source

[officialmobai/Rostam-S1-4B on Hugging Face](https://huggingface.co/officialmobai/Rostam-S1-4B)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| Rostam-S1-4B (this page) | 2,751 | 5 | 4.1B | apache-2.0 | 2026-10-31 |
| [Quark](https://mindket.com/p/28259f8b-0dac-469e-bde3-9712d11a1c2b) | 107 | 7 | 9.7B | apache-2.0 | 2026-11-05 |
| [Sage-A1.5](https://mindket.com/p/8f410da0-850f-4ea5-bda9-65555f4144cd) | 22,224 | 404 | 36B | apache-2.0 | 2026-10-22 |
| [Sage-A1.5 GGUF (Q4\_K\_M)](https://mindket.com/p/7a186f44-d286-4d23-a115-416b5ad0f438) | 636,834 | 84 | 35.5B | apache-2.0 | 2026-10-22 |
| [K2-Horizon-0.9B](https://mindket.com/p/874b52a6-fd0a-48c4-a008-895d258251a1) | 11,244 | 105 | 1.1B | apache-2.0 | 2026-11-10 |
| [Qwen3.6-35B-A3B Claude 4.7 Opus Reasoning Distilled](https://mindket.com/p/a8bee0d0-7f10-412b-a709-a6267eb87a87) | 674 | 206 | 36B | apache-2.0 | 2026-04-23 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2026-10-31
- First published: 2026-10-30
- Checked on Hugging Face: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open officialmobai/Rostam-S1-4B on Hugging Face](https://huggingface.co/officialmobai/Rostam-S1-4B)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/cfbcbe6f-688a-41e9-9fee-f248a5042fb6)
- [Its page on Mindket](https://mindket.com/p/cfbcbe6f-688a-41e9-9fee-f248a5042fb6)
