QED-Nano is a 4B parameter model explicitly post-trained to strengthen its proof-writing capabilities. Despite its small size, QED-Nano achieves an impressive 40% score on the challenging IMO-ProofBench benchmark (+20% over the Qwen3 base model), matching the performance of GPT-OSS-120B from OpenAI. With an agent scaffold that scales inference-time compute to over 1M tokens per problem, QED-Nano approaches the performance of Gemini-3-Pro. Crucially, the same agentic scaffold on the base model (Qwen3-4B-Thinking-2507) barely improves performance.
imoproofbench.png
QED-Nano is based on Qwen/Qwen3-4B-Thinking-2507, and was post-trained via a combination of supervised fine-tuning and reinforcement learning with a reasoning cache (to be able to train for continual improvement with our agentic scaffold at test time) on a mixture of Olympiads proof problems from various public sources.
1from transformers import AutoModelForCausalLM, AutoTokenizer
23model_name ="lm-provers/QED-Nano"4device ="cuda"# for GPU usage or "cpu" for CPU usage56# load the tokenizer and the model7tokenizer = AutoTokenizer.from_pretrained(model_name)8model = AutoModelForCausalLM.from_pretrained(9 model_name,10).to(device)1112# prepare the model input13prompt ="Generate a rigorous proof to the following question: is \sqrt{2} rational or irrational?"14messages_think =[15{"role":"user","content": prompt}16]1718text = tokenizer.apply_chat_template(19 messages_think,20 tokenize=False,21 add_generation_prompt=True,22)23model_inputs = tokenizer([text], return_tensors="pt").to(model.device)2425# Generate the output26generated_ids = model.generate(**model_inputs, max_new_tokens=32768)2728# Get and decode the output29output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]30print(tokenizer.decode(output_ids, skip_special_tokens=True))
[!TIP]
We recommend setting temperature=0.6 and top_p=0.95 in the sampling parameters.
vLLM and SGLang
You can use vLLM and SGLang to deploy the model in an API compatible with OpenAI format.
In this section, we report the evaluation results of QED-Nano on IMO-ProofBench, ProofBench, and IMO-AnswerBench. All evaluations except those on IMO-AnswerBench are reported as avg@3 unless stated otherwise.
QED-Nano is a domain-specific model that is designed for one thing and one thing only: proving theorems. Using as a general assistant will likely produce nonsense outside of this domain. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.
QED-Nano is a joint collaboration between the research teams at CMU, ETH Zurich, Numina, and Hugging Face. Below is a list of the individual contributors and their affiliations:
CMU
Amrith Setlur, Yuxiao Qu, Ian Wu, and Aviral Kumar