Qwen3-32B Olympiad-CP (reasoning model for competitive programming)

An open olympiad-level competitive-programming reasoning model, fine-tuned from Qwen/Qwen3-32B. It's built to reason step by step through algorithmic programming problems and produce working code.

I trained this independently, as a solo project. It's a research artifact and an open contribution, not a product. If you build reasoning systems for code, it may be a useful starting point or comparison.

What it does

Given a competitive-programming problem (the kind where you read input, reason about an algorithm, and print output), the model works through the reasoning and writes a full program. It was trained specifically on that skill.

How it was trained

Two stages on top of the base model:

  1. Supervised fine-tuning (SFT) on open code-reasoning datasets — RStar-Coder and OpenCodeReasoning — to teach step-by-step algorithmic reasoning and clean code output.
  2. Reinforcement learning (GRPO) with a verifiable reward: the model generates candidate solutions, each is run against hidden test cases, and the fraction of tests it passes is the reward. No reward model or human labels — the signal is whether the code actually works.

SFT was run on 8×NVIDIA B200 GPUs, over roughly 1.8 billion tokens. The RL stage uses the same test-case-pass signal that makes the reward objective rather than a guess.

Intended use

  • Research on reasoning and RL-for-code.
  • A base to build on or fine-tune further.
  • Generating and studying solutions to algorithmic problems.

Limitations (read this)

  • It is not a frontier model. Large proprietary models (GPT, Claude, Gemini) are stronger at general coding. This is a specialized, independently-trained 32B, and you should expect it to be weaker outside its niche.
  • It can be confident and wrong. Always run and verify the code it produces.
  • It's tuned for competitive-programming-style problems; it is not a general assistant and has no additional safety tuning beyond the base model's.
  • No performance/benchmark claims are made here by choice — treat it as a research artifact and evaluate it yourself for your use case.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

name = "your-username/qwen3-32b-olympiad-cp"  # set to the published repo id
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="auto", device_map="auto")

msgs = [{"role": "user", "content": "Read N then N integers and print their sum.\n\nWrite a complete program."}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=2048)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))

License

Inherits the base model's license (Apache 2.0, from Qwen3-32B). Verify the base model's current license terms before commercial use.

Related work

  • cleanllm — my streaming JSONL cleaner for fine-tuning datasets (PyPI).
  • A verifiable competitive-programming RL environment (judges code against hidden tests).

Citation

If you use this model, a link back is appreciated:

@misc{qwen3_olympiad_cp,
  title  = {Qwen3-32B Olympiad-CP: an open reasoning model for competitive programming},
  author = {Aarav Verma},
  year   = {2026},
  note   = {Independently trained; SFT + GRPO with verifiable test-case reward}
}
Downloads last month
93
Safetensors
Model size
33B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for trfrasdf/qwen3-32b-olympiad-cp

Base model

Qwen/Qwen3-32B
Finetuned
(522)
this model