docs: create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
license_link: https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct/blob/main/LICENSE
|
4 |
+
language:
|
5 |
+
- tr
|
6 |
+
- en
|
7 |
+
datasets:
|
8 |
+
- erayalp/medium_turkish_math_reasoning
|
9 |
+
base_model:
|
10 |
+
- erayalp/qwen2.5-0.5b-instruct-sft-v1-tr-math-easy
|
11 |
+
pipeline_tag: text-generation
|
12 |
+
library_name: transformers
|
13 |
+
---
|
14 |
+
## Objective
|
15 |
+
This model is the **second phase** of a multi-stage training pipeline designed to improve the Turkish mathematical reasoning capabilities of the compact [Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) model.
|
16 |
+
|
17 |
+
Starting from [`erayalp/qwen2.5-0.5b-instruct-sft-v1-tr-math-easy`](https://huggingface.co/erayalp/qwen2.5-0.5b-instruct-sft-v1-tr-math-easy), which was fine-tuned on simple Turkish math problems, this version continues training using **moderately difficult** examples to improve the model’s step-by-step reasoning and generalization before advancing to full-complexity GSM8K-TR tasks.
|
18 |
+
|
19 |
+
#### This model is intended for:
|
20 |
+
- Research on curriculum learning in small models
|
21 |
+
- Evaluating Turkish math reasoning tasks of moderate complexity
|
22 |
+
|
23 |
+
### Limitations
|
24 |
+
- Still not robust on **multi-step, abstract**, or **edge-case** problems.
|
25 |
+
- May hallucinate or give overconfident answers to complex prompts.
|
26 |
+
- Prompt sensitivity and reasoning depth are **in progress** — expect improvements in later phases.
|
27 |
+
|
28 |
+
### Roadmap
|
29 |
+
1. ~~Phase 1: SFT with basic arithmatic and math problems~~
|
30 |
+
2. **Phase 2: SFT with moderately difficult math problems**
|
31 |
+
3. Phase 3: SFT with full-scale GSM8K-TR complexity
|
32 |
+
4. Phase 4: GRPO-based training to optimize multi-step reasoning and reduce hallucinations
|
33 |
+
|
34 |
+
## How to Use
|
35 |
+
|
36 |
+
You can easily run inference using the Transformers library:
|
37 |
+
|
38 |
+
```python
|
39 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
40 |
+
import torch
|
41 |
+
model_name = "erayalp/qwen2.5-0.5b-instruct-sft-v2-tr-math-medium"
|
42 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
43 |
+
model = AutoModelForCausalLM.from_pretrained(
|
44 |
+
model_name,
|
45 |
+
torch_dtype="auto",
|
46 |
+
device_map="auto"
|
47 |
+
)
|
48 |
+
prompt = "Ali’nin 3 kalemi vardı. 2 kalem daha aldı. Ali’nin şimdi kaç kalemi var?"
|
49 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
50 |
+
output = model.generate(**inputs, max_new_tokens=256)
|
51 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|