File size: 3,567 Bytes
b327bb8
 
2c025b4
 
 
 
 
 
 
91911d1
 
 
 
 
6309b31
b327bb8
622df32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: transformers
license: apache-2.0
language:
- en
- zh
base_model:
- Qwen/Qwen2.5-1.5B-Instruct
pipeline_tag: text-generation
tags:
- text-generation-inference
- Code
- Math
- RL
- CoT
---
![M.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/JXIomwktKoqTBjJQNy3rj.png)

# **Monoceros-QwenM-1.5B**

> **Monoceros-QwenM-1.5B** is a **chain-of-thought reasoning model** fine-tuned from **Qwen-1.5B**, specifically designed for solving **mathematical problems** in both **English** and **Chinese**. It brings advanced reasoning and step-by-step problem-solving capabilities in a compact size, ideal for educational tools, tutoring systems, and math-focused assistants.

## **Key Features**

1. **Chain-of-Thought Math Reasoning**  
   Trained to produce intermediate steps for math problems, Monoceros-QwenM-1.5B enables interpretability and transparent logic in answers — critical for educational and verification purposes.

2. **Bilingual Proficiency (English + Chinese)**  
   Capable of understanding, reasoning, and explaining math problems fluently in **both English and Simplified Chinese**, making it suitable for multilingual learning environments.

3. **Compact yet Capable**  
   While only 1.5B parameters, this model delivers strong performance for arithmetic, algebra, geometry, word problems, and logical puzzles with minimal resource demands.

4. **Step-by-Step Computation**  
   Provides structured, multi-step answers that mirror human-like problem solving, making it easy to follow and learn from.

## **Quickstart with Transformers**

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "prithivMLmods/Monoceros-QwenM-1.5B"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "Solve: A train travels 180 km in 3 hours. What is its average speed?"
messages = [
    {"role": "system", "content": "You are a helpful tutor skilled in solving math problems with step-by-step explanations."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
```

## **Intended Use**

- **Math Tutoring Bots**: Step-by-step solvers for students across basic to intermediate levels.
- **Bilingual Educational Apps**: Teaching math in **English** and **Chinese**, improving accessibility.
- **STEM Reasoning Tools**: Reasoning for science, engineering, and logic-based problems.
- **Lightweight LLM Applications**: Embedded use cases in browsers, mobile apps, or low-resource environments.

## **Limitations**

1. **Limited Domain Generalization**:  
   Optimized for math; performance may drop in creative writing, casual conversation, or unrelated topics.

2. **Parameter Scale**:  
   Though efficient, it may underperform compared to larger models on highly complex or abstract math.

3. **Bias from Base Model**:  
   Inherits any biases from Qwen-1.5B’s pretraining. Outputs should be validated in sensitive settings.

4. **Prompt Sensitivity**:  
   Precise, structured input yields better stepwise results.