File size: 5,656 Bytes
47f8059
 
8ceca0d
47f8059
b93acea
47f8059
 
 
b93acea
 
 
8ceca0d
47f8059
 
 
 
 
8ceca0d
47f8059
8ceca0d
47f8059
8ceca0d
47f8059
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
 
 
 
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
 
b93acea
8ceca0d
b93acea
8ceca0d
b93acea
8ceca0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
base_model: unsloth/Qwen3-0.6B-unsloth-bnb-4bit
model_name: Math Mini 0.6B (Preview)
tags:
- text-generation
- text-generation-inference
- transformers
- qwen3
- math
- enosis-labs
- math-mini
- gguf # Tag for GGUF version
license: apache-2.0
language:
- en
---

# Math Mini 0.6B (Preview)

**Math Mini 0.6B (Preview)** is a compact, specialized model developed by **Enosis Labs** as part of the "Mini Series." It is designed to deliver efficient and precise mathematical reasoning, with a realistic and practical focus for its size. This model is fine-tuned from `unsloth/Qwen3-0.6B-unsloth-bnb-4bit`.

## Philosophy & Capabilities

The Mini Series, along with the "Enosis Math" and "Enosis Code" models, incorporates step-by-step reasoning by default, enabling more efficient, clear, and well-founded answers. All models in the Math series have been trained with carefully curated step-by-step problem-solving datasets, resulting in a greater ability to reason and explain solutions in a structured way.

**Math Mini 0.6B (Preview)** is optimized for:

* **Basic Algebra:** Solving equations and manipulating expressions.
* **Arithmetic & Sequential Reasoning:** Calculations and breaking down problems into logical steps.
* **Elementary Logic:** Applying deduction in mathematical contexts.
* **Introductory Competition Problem Solving:** Focus on foundational skills adapted to the model's scale.

Larger models in the "Enosis Math" series address advanced topics such as calculus, higher algebra, and olympiad problems. The "Code Mini" and "Enosis Code" series are oriented towards programming and algorithmic tasks, maintaining the same philosophy of explicit and efficient reasoning.

This model is a **preview version** and is under continuous improvement and evaluation.

## Quick Start

Available in both Hugging Face Transformers and quantized GGUF formats.

### Transformers (Hugging Face)

Ensure you have the latest `transformers` library. For Qwen3 models, a recent version is recommended.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline

model_id = "enosislabs/math-mini-0.6b-preview-gguf"

pipe = pipeline("text-generation", model=model_id, trust_remote_code=True)

messages = [
    {"role": "system", "content": "You are a helpful math assistant."},
    {"role": "user", "content": "Solve for x: 3x + 11 = 35"},
]

formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(formatted_prompt, max_new_tokens=100)
print(outputs[0]["generated_text"])

# Alternatively, load the model and tokenizer directly:
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=100)
response_text = tokenizer.decode(outputs[0], skip_special_tokens=False)
print(response_text)
```

### GGUF with Ollama

Download the `.gguf` file from Hugging Face and use Ollama. You can choose between other GGUF versions such as 4bit, 5bit, and 8bit. This example uses the 4bit version:

```bash
ollama run enosislabs/math-mini-0.6b-preview-gguf:Q4_K_M
```

For more control, create a `Modelfile` with the Qwen3 template:

```modelfile
FROM ./math-mini-0.6b-preview-Q4_K_M.gguf
TEMPLATE """
<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
```

Then run:

```bash
ollama create math-mini-0.6b -f Modelfile
ollama run math-mini-0.6b
```

### GGUF with llama.cpp

```bash
./main -m ./path/to/math-mini-0.6b-preview.gguf -n 256 -p "<|im_start|>system\nYou are a helpful math assistant.<|im_end|>\n<|im_start|>user\nSolve for x: 2x + 5 = 15<|im_end|>\n<|im_start|>assistant\n" --temp 0.2 -c 2048
```

### vLLM (Transformers)

```bash
pip install vllm
python -m vllm.entrypoints.openai.api_server --model enosislabs/math-mini-0.6b-preview-gguf --trust-remote-code
```

For chat:

```bash
curl -X POST "http://localhost:8000/v1/chat/completions" \
    -H "Content-Type: application/json" \
    --data '{
        "model": "enosislabs/math-mini-0.6b-preview-gguf",
        "messages": [
            {"role": "system", "content": "You are a helpful math assistant."},
            {"role": "user", "content": "What is the capital of France?"}
        ],
        "max_tokens": 50,
        "temperature": 0.2
    }'
```

## Prompt Format (Qwen3 ChatML)

For best results, use the Qwen3 ChatML format. The `tokenizer.apply_chat_template` method handles this automatically.

```text
<|im_start|>system
You are a helpful AI assistant. Provide a detailed step-by-step solution.
<|im_end|>
<|im_start|>user
{user_question}
<|im_end|>
<|im_start|>assistant
```

## Acknowledgements

* Fine-tuned from `unsloth/Qwen3-0.6B-unsloth-bnb-4bit`.
* Training process accelerated and optimized thanks to [Unsloth](https://github.com/unslothai/unsloth).

## Citation

If you use this model, please cite:

```bibtex
@software{enosislabs_math_mini_0.6b_preview_2025,
  author = {{Enosis Labs}},
  title = {{Math Mini 0.6B (Preview)}},
  year = {2025},
  publisher = {Hugging Face},
  version = {0.1-preview},
  url = {https://huggingface.co/enosislabs/math-mini-0.6b-preview-gguf}
}
```

<!--
Key points:
- More subtle and direct, less redundancy.
- Emphasizes default activation of step-by-step reasoning across the series.
- Clear and modern examples for each format.
- ChatML prompt is central to the experience.
- Assumes the repo contains both Transformers and GGUF models.
-->