Text Generation
Transformers
Safetensors
Turkish
English
qwen2
curriculum-learning
math
supervised-fine-tuning
turkish
conversational
text-generation-inference
Instructions to use erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy 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-SFT-v1-tr-math-easy 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-SFT-v1-tr-math-easy") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy") model = AutoModelForCausalLM.from_pretrained("erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy 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-SFT-v1-tr-math-easy" # 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-SFT-v1-tr-math-easy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy
- SGLang
How to use erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy 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-SFT-v1-tr-math-easy" \ --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-SFT-v1-tr-math-easy", "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-SFT-v1-tr-math-easy" \ --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-SFT-v1-tr-math-easy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy with Docker Model Runner:
docker model run hf.co/erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy
Objective
The goal of this project is to enhance the reasoning ability of the compact Qwen2.5-0.5B model on Turkish math questions. Using supervised fine-tuning (SFT) on simpler examples as a starting point, the model will be progressively improved through curriculum learning, and later refined using Group Relative Policy Optimization (GRPO) to boost multi-step reasoning performance.
This model is intended for:
- Research on curriculum learning in small models
- Evaluating Turkish math reasoning tasks
Limitations
- Currently only trained on simpler math examples — lacks robustness for multi-step or abstract reasoning.
- May produce incorrect or overconfident answers on complex tasks.
- Performance may be sensitive to prompt phrasing.
Roadmap
- Phase 1: SFT with basic arithmatic and math problems
- Phase 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-sft-v1-tr-math-easy"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
prompt = "Ali’nin 3 kalemi vardı. 2 kalem daha aldı. Ali’nin şimdi kaç kalemi var?"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))
- Downloads last month
- 14
Model tree for erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy
Dataset used to train erayalp/qwen2.5-0.5b-instruct-SFT-v1-tr-math-easy
Viewer • Updated • 1.09k • 40 • 7