dipta007 commited on
Commit
6abc76b
·
verified ·
1 Parent(s): 9de9044

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -19
README.md CHANGED
@@ -1,24 +1,117 @@
1
  ---
2
- license: mit
3
- language:
4
- - bn
5
- base_model:
6
- - Qwen/Qwen3-1.7B
7
  pipeline_tag: text-generation
 
 
 
8
  tags:
9
- - MathLLM
10
- - math
11
- - reasoning
 
 
 
12
  ---
13
 
14
- | Metric | Value |
15
- |-------------------------|---------|
16
- | ganit_easy_score | 30.94 |
17
- | ganit_medium_score | 28.22 |
18
- | ganit_hard_score | 19.89 |
19
- | ganit_olympiad_score | 15.76 |
20
- | mgsm_score | 48.80 |
21
- | msvamp_score | 64.60 |
22
- | mean_words | 253.83 |
23
- | mean_time_taken | 152.66 |
24
- | mean_bengali_percentage | 87.79 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: Qwen/Qwen3-1.7B
 
 
5
  pipeline_tag: text-generation
6
+ language:
7
+ - bn
8
+ - en
9
  tags:
10
+ - math
11
+ - bengali
12
+ - reasoning
13
+ - sft
14
+ datasets:
15
+ - dipta007/Ganit
16
  ---
17
 
18
+ # GanitLLM-1.7B_SFT
19
+
20
+ [![Paper](https://img.shields.io/badge/arXiv-Paper-red)](https://arxiv.org/)
21
+ [![Dataset](https://img.shields.io/badge/HuggingFace-Dataset-yellow)](https://huggingface.co/datasets/dipta007/Ganit)
22
+ [![Models](https://img.shields.io/badge/HuggingFace-Models-orange)](https://huggingface.co/collections/dipta007/ganitllm)
23
+
24
+ ## Highlights
25
+
26
+ **GanitLLM-1.7B_SFT** is a Bengali mathematical reasoning model trained with Supervised Fine-Tuning on the GANIT dataset. This model serves as the foundation for further RL training (GRPO/CGRPO). Key improvements over the base Qwen3-1.7B model:
27
+
28
+ - **+33.60 accuracy** on Bn-MGSM benchmark (15.20 → 48.80)
29
+ - **+50.50 accuracy** on Bn-MSVAMP benchmark (14.10 → 64.60)
30
+ - **87.79% Bengali reasoning** (vs 19.64% for base model)
31
+ - **77.5% fewer words** in generated solutions (1124 → 253 words)
32
+
33
+ > **Note**: This is the SFT-only checkpoint. For best results, use the RL-enhanced versions: [GanitLLM-1.7B_SFT_CGRPO](https://huggingface.co/dipta007/GanitLLM-1.7B_SFT_CGRPO) or [GanitLLM-1.7B_SFT_GRPO](https://huggingface.co/dipta007/GanitLLM-1.7B_SFT_GRPO).
34
+
35
+ ## Model Overview
36
+
37
+ | Property | Value |
38
+ |----------|-------|
39
+ | **Model Type** | Causal Language Model |
40
+ | **Base Model** | Qwen/Qwen3-1.7B |
41
+ | **Parameters** | 1.7B |
42
+ | **Training** | Supervised Fine-Tuning |
43
+ | **Context Length** | 4,096 tokens |
44
+ | **Language** | Bengali, English |
45
+
46
+ ## Training Details
47
+
48
+ This model was trained with a single-stage pipeline:
49
+
50
+ 1. **Supervised Fine-Tuning (SFT)**: Trained on GANIT-SFT (~11k examples) to ground reasoning in Bengali
51
+
52
+ ### Training Data
53
+ - **Dataset**: GANIT-SFT (11,023 examples)
54
+ - **Format**: Bengali math problems with chain-of-thought reasoning
55
+ - **Structure**: `<think>` tags for reasoning, `<answer>` tags for final answer
56
+
57
+ ## Quickstart
58
+
59
+ ```python
60
+ from transformers import AutoModelForCausalLM, AutoTokenizer
61
+
62
+ model_name = "dipta007/GanitLLM-1.7B_SFT"
63
+
64
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
65
+ model = AutoModelForCausalLM.from_pretrained(
66
+ model_name,
67
+ torch_dtype="auto",
68
+ device_map="auto"
69
+ )
70
+
71
+ problem = "একটি দোকানে ১২টি আপেল আছে। যদি ৫টি আপেল বিক্রি হয়, তাহলে কতটি আপেল বাকি থাকবে?"
72
+
73
+ prompt = f"""A conversation takes place between the user and the assistant. The user asks a question, and the assistant solves the problem. Please reason step by step in Bengali, and put your final answer in the <answer> </answer> tags.
74
+
75
+ Question: {problem}"""
76
+
77
+ messages = [{"role": "user", "content": prompt}]
78
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
79
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
80
+
81
+ generated_ids = model.generate(**model_inputs, max_new_tokens=2048, temperature=0.7)
82
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
83
+ response = tokenizer.decode(output_ids, skip_special_tokens=True)
84
+ print(response)
85
+ ```
86
+
87
+ ### Using vLLM
88
+
89
+ ```bash
90
+ vllm serve dipta007/GanitLLM-1.7B_SFT --max-model-len 4096
91
+ ```
92
+
93
+ ## Performance
94
+
95
+ | Model | Bn-MGSM | Bn-MSVAMP | Avg. Words | Bengali % |
96
+ |-------|---------|-----------|------------|-----------|
97
+ | Qwen3-1.7B (base) | 15.20 | 14.10 | 1124 | 19.64% |
98
+ | **GanitLLM-1.7B_SFT** | **48.80** | **64.60** | **253** | **87.79%** |
99
+
100
+ ## Related Models
101
+
102
+ | Model | Parameters | Training | Link |
103
+ |-------|------------|----------|------|
104
+ | GanitLLM-1.7B_SFT_CGRPO | 1.7B | SFT + CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_SFT_CGRPO) |
105
+ | GanitLLM-1.7B_SFT_GRPO | 1.7B | SFT + GRPO | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_SFT_GRPO) |
106
+ | **GanitLLM-1.7B_SFT** | 1.7B | SFT | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_SFT) |
107
+ | GanitLLM-1.7B_CGRPO | 1.7B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_CGRPO) |
108
+
109
+ ## Citation
110
+
111
+ ```bibtex
112
+ will be updated
113
+ ```
114
+
115
+ ## License
116
+
117
+ This model is released under the Apache 2.0 License.