138 lines
5.2 KiB
Markdown
138 lines
5.2 KiB
Markdown
|
|
---
|
||
|
|
library_name: transformers
|
||
|
|
license: apache-2.0
|
||
|
|
base_model: Qwen/Qwen3-0.6B
|
||
|
|
pipeline_tag: text-generation
|
||
|
|
language:
|
||
|
|
- bn
|
||
|
|
- en
|
||
|
|
tags:
|
||
|
|
- math
|
||
|
|
- bengali
|
||
|
|
- reasoning
|
||
|
|
- grpo
|
||
|
|
- curriculum-learning
|
||
|
|
datasets:
|
||
|
|
- dipta007/Ganit
|
||
|
|
---
|
||
|
|
|
||
|
|
# GanitLLM-0.6B_CGRPO
|
||
|
|
|
||
|
|
<p align="center">
|
||
|
|
<a href="https://arxiv.org/abs/2601.06767">
|
||
|
|
<img src="https://img.shields.io/badge/%F0%9F%94%A5_Accepted_at-ACL_2026_(Findings)_%F0%9F%94%A5-b12a00?style=for-the-badge&labelColor=ffb300" alt="Accepted at ACL 2026 (Findings)">
|
||
|
|
</a>
|
||
|
|
</p>
|
||
|
|
|
||
|
|
[](https://arxiv.org/abs/2601.06767)
|
||
|
|
[](https://arxiv.org/abs/2601.06767)
|
||
|
|
[](https://dipta007.github.io/GanitLLM/)
|
||
|
|
[](https://huggingface.co/datasets/dipta007/Ganit)
|
||
|
|
[](https://huggingface.co/collections/dipta007/ganitllm)
|
||
|
|
[](https://github.com/dipta007/GanitLLM)
|
||
|
|
|
||
|
|
## Highlights
|
||
|
|
|
||
|
|
**GanitLLM-0.6B_CGRPO** is a Bengali mathematical reasoning model trained with Curriculum-GRPO directly on the base model (without SFT). This variant shows limited improvement at this scale. Key results:
|
||
|
|
|
||
|
|
- **+8.8 accuracy** on Bn-MGSM benchmark (8.4 → 17.2)
|
||
|
|
- **+23.0 accuracy** on Bn-MSVAMP benchmark (12.2 → 35.2)
|
||
|
|
- **11.67% Bengali reasoning** (similar to base model)
|
||
|
|
- **34.9% fewer tokens** in generated solutions (1265 → 824 words)
|
||
|
|
|
||
|
|
> **Note**: This model shows limited gains at the 0.6B scale. For better performance, use [GanitLLM-0.6B_SFT_CGRPO](https://huggingface.co/dipta007/GanitLLM-0.6B_SFT_CGRPO) or consider larger models.
|
||
|
|
|
||
|
|
## Model Overview
|
||
|
|
|
||
|
|
| Property | Value |
|
||
|
|
|----------|-------|
|
||
|
|
| **Model Type** | Causal Language Model |
|
||
|
|
| **Base Model** | Qwen/Qwen3-0.6B |
|
||
|
|
| **Parameters** | 0.6B |
|
||
|
|
| **Training** | Curriculum-GRPO (no SFT) |
|
||
|
|
| **Context Length** | 4,096 tokens |
|
||
|
|
| **Language** | Bengali, English |
|
||
|
|
|
||
|
|
## Training Details
|
||
|
|
|
||
|
|
This model was trained with a single-stage pipeline:
|
||
|
|
|
||
|
|
1. **Curriculum-GRPO**: Reinforcement learning with difficulty-aware sampling directly on the base model using GANIT-RLVR (~7.3k examples)
|
||
|
|
|
||
|
|
### Reward Functions
|
||
|
|
- **Format Reward**: Validates `<think>` and `<answer>` tag structure
|
||
|
|
- **Correctness Reward**: +2.0 for Bengali answer match, +1.0 for English match
|
||
|
|
- **Bengali Reasoning Reward**: Ensures >80% Bengali text in reasoning
|
||
|
|
|
||
|
|
## Quickstart
|
||
|
|
|
||
|
|
```python
|
||
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||
|
|
|
||
|
|
model_name = "dipta007/GanitLLM-0.6B_CGRPO"
|
||
|
|
|
||
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||
|
|
model = AutoModelForCausalLM.from_pretrained(
|
||
|
|
model_name,
|
||
|
|
torch_dtype="auto",
|
||
|
|
device_map="auto"
|
||
|
|
)
|
||
|
|
|
||
|
|
problem = "একটি দোকানে ১২টি আপেল আছে। যদি ৫টি আপেল বিক্রি হয়, তাহলে কতটি আপেল বাকি থাকবে?"
|
||
|
|
|
||
|
|
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.
|
||
|
|
|
||
|
|
Question: {problem}"""
|
||
|
|
|
||
|
|
messages = [{"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=2048, temperature=0.7)
|
||
|
|
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
|
||
|
|
response = tokenizer.decode(output_ids, skip_special_tokens=True)
|
||
|
|
print(response)
|
||
|
|
```
|
||
|
|
|
||
|
|
### Using vLLM
|
||
|
|
|
||
|
|
```bash
|
||
|
|
vllm serve dipta007/GanitLLM-0.6B_CGRPO --max-model-len 4096
|
||
|
|
```
|
||
|
|
|
||
|
|
## Performance
|
||
|
|
|
||
|
|
| Model | Bn-MGSM | Bn-MSVAMP | Avg. Words | Bengali % |
|
||
|
|
|-------|---------|-----------|------------|-----------|
|
||
|
|
| Qwen3-0.6B (base) | 8.40 | 12.20 | 1265 | 12.43% |
|
||
|
|
| **GanitLLM-0.6B_CGRPO** | **17.20** | **35.20** | **824** | **11.67%** |
|
||
|
|
|
||
|
|
## Related Models
|
||
|
|
|
||
|
|
| Model | Parameters | Training | Link |
|
||
|
|
|-------|------------|----------|------|
|
||
|
|
| GanitLLM-4B_CGRPO | 4B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-4B_CGRPO) |
|
||
|
|
| GanitLLM-1.7B_CGRPO | 1.7B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-1.7B_CGRPO) |
|
||
|
|
| GanitLLM-0.6B_SFT_CGRPO | 0.6B | SFT + CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-0.6B_SFT_CGRPO) |
|
||
|
|
| GanitLLM-0.6B_SFT_GRPO | 0.6B | SFT + GRPO | [Link](https://huggingface.co/dipta007/GanitLLM-0.6B_SFT_GRPO) |
|
||
|
|
| **GanitLLM-0.6B_CGRPO** | 0.6B | CGRPO | [Link](https://huggingface.co/dipta007/GanitLLM-0.6B_CGRPO) |
|
||
|
|
|
||
|
|
## Citation
|
||
|
|
|
||
|
|
```bibtex
|
||
|
|
@inproceedings{dipta2026ganitllm,
|
||
|
|
title={GanitLLM: Difficulty-Aware Bengali Mathematical Reasoning through Curriculum-GRPO},
|
||
|
|
author={Shubhashis Roy Dipta and Khairul Mahbub and Nadia Najjar},
|
||
|
|
booktitle={Findings of the Association for Computational Linguistics: ACL 2026},
|
||
|
|
year={2026},
|
||
|
|
eprint={2601.06767},
|
||
|
|
archivePrefix={arXiv},
|
||
|
|
primaryClass={cs.CL},
|
||
|
|
url={https://arxiv.org/abs/2601.06767},
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## License
|
||
|
|
|
||
|
|
This model is released under the Apache 2.0 License.
|