dipta007 commited on
Commit
c2b09dc
·
verified ·
1 Parent(s): 57685f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -13
README.md CHANGED
@@ -1,21 +1,119 @@
1
  ---
2
- base_model: unsloth/Qwen3-4B
3
- tags:
4
- - text-generation-inference
5
- - transformers
6
- - unsloth
7
- - qwen3
8
  license: apache-2.0
 
 
9
  language:
10
- - en
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
- # Uploaded finetuned model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- - **Developed by:** dipta007
16
- - **License:** apache-2.0
17
- - **Finetuned from model :** unsloth/Qwen3-4B
18
 
19
- This qwen3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
20
 
21
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
1
  ---
2
+ library_name: transformers
 
 
 
 
 
3
  license: apache-2.0
4
+ base_model: Qwen/Qwen3-4B
5
+ pipeline_tag: text-generation
6
  language:
7
+ - bn
8
+ - en
9
+ tags:
10
+ - math
11
+ - bengali
12
+ - reasoning
13
+ - grpo
14
+ - curriculum-learning
15
+ datasets:
16
+ - dipta007/Ganit
17
  ---
18
 
19
+ # GanitLLM-4B_CGRPO
20
+
21
+ [![Paper](https://img.shields.io/badge/arXiv-Paper-red)](https://arxiv.org/)
22
+ [![Dataset](https://img.shields.io/badge/HuggingFace-Dataset-yellow)](https://huggingface.co/datasets/dipta007/Ganit)
23
+ [![Models](https://img.shields.io/badge/HuggingFace-Models-orange)](https://huggingface.co/collections/dipta007/ganitllm)
24
+
25
+ ## Highlights
26
+
27
+ **GanitLLM-4B_CGRPO** is a Bengali mathematical reasoning model trained with Curriculum-GRPO directly on the base model (without SFT). This variant achieves the highest raw accuracy but reasons primarily in English. Key results:
28
+
29
+ - **+13.2 accuracy** on Bn-MGSM benchmark (69.2 → 82.4)
30
+ - **+8.0 accuracy** on Bn-MSVAMP benchmark (70.5 → 78.5)
31
+ - **14.94% Bengali reasoning** (similar to base model)
32
+ - **10.5% fewer tokens** in generated solutions (943 → 844 words)
33
+
34
+ > **Note**: This model achieves high accuracy but does not reason in Bengali. For Bengali reasoning, use [GanitLLM-4B_SFT_CGRPO](https://huggingface.co/dipta007/GanitLLM-4B_SFT_CGRPO) instead.
35
+
36
+ ## Model Overview
37
+
38
+ | Property | Value |
39
+ |----------|-------|
40
+ | **Model Type** | Causal Language Model |
41
+ | **Base Model** | Qwen/Qwen3-4B |
42
+ | **Parameters** | 4B |
43
+ | **Training** | Curriculum-GRPO (no SFT) |
44
+ | **Context Length** | 4,096 tokens |
45
+ | **Language** | Bengali, English |
46
+
47
+ ## Training Details
48
+
49
+ This model was trained with a single-stage pipeline:
50
+
51
+ 1. **Curriculum-GRPO**: Reinforcement learning with difficulty-aware sampling directly on the base model using GANIT-RLVR (~7.3k examples)
52
+
53
+ ### Reward Functions
54
+ - **Format Reward**: Validates `<think>` and `<answer>` tag structure
55
+ - **Correctness Reward**: +2.0 for Bengali answer match, +1.0 for English match
56
+ - **Bengali Reasoning Reward**: Ensures >80% Bengali text in reasoning
57
+
58
+ ## Quickstart
59
+
60
+ ```python
61
+ from transformers import AutoModelForCausalLM, AutoTokenizer
62
+
63
+ model_name = "dipta007/GanitLLM-4B_CGRPO"
64
+
65
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
66
+ model = AutoModelForCausalLM.from_pretrained(
67
+ model_name,
68
+ torch_dtype="auto",
69
+ device_map="auto"
70
+ )
71
+
72
+ problem = "একটি দোকানে ১২টি আপেল আছে। যদি ৫টি আপেল বিক্রি হয়, তাহলে কতটি আপেল বাকি থাকবে?"
73
+
74
+ 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.
75
+
76
+ Question: {problem}"""
77
+
78
+ messages = [{"role": "user", "content": prompt}]
79
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
80
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
81
+
82
+ generated_ids = model.generate(**model_inputs, max_new_tokens=2048, temperature=0.7)
83
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
84
+ response = tokenizer.decode(output_ids, skip_special_tokens=True)
85
+ print(response)
86
+ ```
87
+
88
+ ### Using vLLM
89
+
90
+ ```bash
91
+ vllm serve dipta007/GanitLLM-4B_CGRPO --max-model-len 4096
92
+ ```
93
+
94
+ ## Performance
95
+
96
+ | Model | Bn-MGSM | Bn-MSVAMP | Avg. Words | Bengali % |
97
+ |-------|---------|-----------|------------|-----------|
98
+ | Qwen3-4B (base) | 69.20 | 70.50 | 943 | 14.79% |
99
+ | **GanitLLM-4B_CGRPO** | **82.40** | **78.50** | **844** | **14.94%** |
100
+
101
+ ## Related Models
102
+
103
+ | Model | Parameters | Training | Link |
104
+ |-------|------------|----------|------|
105
+ | GanitLLM-4B_SFT_CGRPO | 4B | SFT + CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-4B_SFT_CGRPO) |
106
+ | GanitLLM-4B_SFT_GRPO | 4B | SFT + GRPO | [Link](https://huggingface.co/dipta007/GanitLLM-4B_SFT_GRPO) |
107
+ | **GanitLLM-4B_CGRPO** | 4B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-4B_CGRPO) |
108
+ | GanitLLM-1.7B_CGRPO | 1.7B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_CGRPO) |
109
+ | GanitLLM-0.6B_CGRPO | 0.6B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-0.6B_CGRPO) |
110
+
111
+ ## Citation
112
 
113
+ ```bibtex
114
+ will be updated
115
+ ```
116
 
117
+ ## License
118
 
119
+ This model is released under the Apache 2.0 License.