Run this model with HF Jobs

Run David0dods/Qwen2.5-Coder-7B-Codeforces-Tutor on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/David0dods/Qwen2.5-Coder-7B-Codeforces-Tutor. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/David0dods/Qwen2.5-Coder-7B-Codeforces-Tutor on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
File size: 1,728 Bytes
b6f4e27
 
 
 
 
 
 
 
 
 
6cf18ff
 
b6f4e27
6cf18ff
b6f4e27
6cf18ff
b6f4e27
6cf18ff
b6f4e27
6cf18ff
 
 
 
b6f4e27
6cf18ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
base_model: unsloth/Qwen2.5-Coder-7B-bnb-4bit
tags:
- text-generation-inference
- transformers
- unsloth
- qwen2
license: apache-2.0
language:
- en
datasets:
- open-r1/codeforces-cots
---
# Qwen2.5-Coder-7B-Codeforces

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.

##  Key Features
* **Dual-Mode Inference:** Can switch between generating a progressive, 1-2 sentence theoretical hint (Tutor Mode) or a fully functional, optimized Python solution (Expert Mode).
* **Memory Efficient:** Fine-tuned using **Unsloth** and optimized with an 8-bit Paged AdamW optimizer to compress a 7B model workflow into a single 16GB T4 GPU envelope.
* **Context Preservation:** Maintained a robust **2048/3072 sequence length** to handle complex problem statements and retrieved vector database context without dropping long-dependency tokens.

---

##  Prompt Template
To get the exact structured output and prevent hallucinations, you **must** use the following prompt format when querying the model:

### 1. Tutor Mode (For Hints Only)
```text
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: