open-r1/codeforces-cots
Viewer • Updated • 254k • 4.83k • 231
How to use David0dods/Qwen2.5-Coder-7B-Codeforces-Tutor with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("David0dods/Qwen2.5-Coder-7B-Codeforces-Tutor", device_map="auto")This model is a fine-tuned version of Qwen2.5-Coder-7B (quantized in 4-bit via QLoRA). It has been specifically trained to act as an intelligent programming tutor and expert solver for Codeforces competitive programming problems.
It is designed to serve as the generation node in a broader RAG (Retrieval-Augmented Generation) architecture, dynamically adapting its response based on the structured instruction provided in the prompt.
To get the exact structured output and prevent hallucinations, you must use the following prompt format when querying the model:
Instruction: You are a programming tutor. Give ONE short hint for this problem. Do NOT give code or reveal the full solution. Just the key insight in 1-2 sentences.
Difficulty Rating: [e.g., 1300]
Topics: [e.g., greedy, math, sortings]
Problem:
[Insert Codeforces Problem Text Here]
Hint:
Base model
Qwen/Qwen2.5-7B