Instructions to use erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k
- SGLang
How to use erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k" \ --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": "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k" \ --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": "erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k with Docker Model Runner:
docker model run hf.co/erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k
Objective
This model is the final product of the multi-stage training pipeline designed to improve the Turkish mathematical reasoning capabilities of the compact Qwen2.5-0.5B model.
Starting from erayalp/qwen2.5-0.5b-instruct-sft-v2-tr-math-medium, which was fine-tuned on 2-3 step reasoning Turkish math problems, this version continues training using ytu-ce-cosmos/gsm8k_tr to improve the model’s step-by-step reasoning and generalization to multi step grade school math performance on such small model.
This model is intended for:
- Researchers exploring reinforcement learning on small LLMs.
- Research on curriculum learning and multi-step math reasoning in small models.
- Comparative baselines for evaluating Turkish math reasoning tasks of grade school math complexity.
Limitations
- With only 0.5B parameters, it may not perform as robustly as larger models.
- Math-specific hallucinations may persist in underrepresented edge patterns.
- Prompt sensitivity and reasoning depth are open to future improvements.
Roadmap
Phase 1: SFT with basic arithmatic and math problemsPhase 2: SFT with moderately difficult math problems- Phase 3: SFT with full-scale GSM8K-TR complexity
- Phase 4: GRPO-based training to optimize multi-step reasoning and reduce hallucinations
How to Use
You can easily run inference using the Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "erayalp/qwen2.5-0.5B-instruct-GRPO-v3-tr-math-gsm8k"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
prompt = "Bir bahçede 25 gül var. 40 lale vardır. 35 papatya var. Çiçeklerin yüzde kaçı gül değildir?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Model tree for erayalp/qwen2.5-0.5b-instruct-GRPO-v3-tr-math-gsm8k
Base model
Qwen/Qwen2.5-0.5B