dipta007/Ganit
Viewer • Updated • 32.3k • 108
How to use dipta007/GanitLLM-1.7B_SFT_CGRPO with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="dipta007/GanitLLM-1.7B_SFT_CGRPO")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("dipta007/GanitLLM-1.7B_SFT_CGRPO")
model = AutoModelForCausalLM.from_pretrained("dipta007/GanitLLM-1.7B_SFT_CGRPO")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use dipta007/GanitLLM-1.7B_SFT_CGRPO with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "dipta007/GanitLLM-1.7B_SFT_CGRPO"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "dipta007/GanitLLM-1.7B_SFT_CGRPO",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/dipta007/GanitLLM-1.7B_SFT_CGRPO
How to use dipta007/GanitLLM-1.7B_SFT_CGRPO with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "dipta007/GanitLLM-1.7B_SFT_CGRPO" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "dipta007/GanitLLM-1.7B_SFT_CGRPO",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "dipta007/GanitLLM-1.7B_SFT_CGRPO" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "dipta007/GanitLLM-1.7B_SFT_CGRPO",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use dipta007/GanitLLM-1.7B_SFT_CGRPO with Docker Model Runner:
docker model run hf.co/dipta007/GanitLLM-1.7B_SFT_CGRPO
GanitLLM-1.7B_SFT_CGRPO is a compact Bengali mathematical reasoning model trained using the novel Curriculum-GRPO approach. Key improvements over the base Qwen3-1.7B model:
| Property | Value |
|---|---|
| Model Type | Causal Language Model |
| Base Model | Qwen/Qwen3-1.7B |
| Parameters | 1.7B |
| Training | SFT + Curriculum-GRPO |
| Context Length | 4,096 tokens |
| Language | Bengali, English |
This model was trained using our multi-stage pipeline:
<think> and <answer> tag structurefrom transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "dipta007/GanitLLM-1.7B_SFT_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)
vllm serve dipta007/GanitLLM-1.7B_SFT_CGRPO --max-model-len 4096
| Model | Bn-MGSM | Bn-MSVAMP | Avg. Words | Bengali % |
|---|---|---|---|---|
| Qwen3-1.7B (base) | 15.20 | 14.10 | 1124 | 19.64% |
| GanitLLM-1.7B_SFT_CGRPO | 52.80 | 66.80 | 210 | 87.80% |
| Model | Parameters | Training | Link |
|---|---|---|---|
| GanitLLM-4B_SFT_CGRPO | 4B | SFT + CGRPO | Link |
| GanitLLM-1.7B_SFT_CGRPO | 1.7B | SFT + CGRPO | Link |
| GanitLLM-1.7B_SFT_GRPO | 1.7B | SFT + GRPO | Link |
| GanitLLM-1.7B_CGRPO | 1.7B | CGRPO | Link |
| GanitLLM-0.6B_SFT_CGRPO | 0.6B | SFT + CGRPO | Link |
@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},
}
This model is released under the Apache 2.0 License.