Views
No views yet
1# Download MBPP+ and HumanEval+ datasets
2wget -O evaluation/code_eval/data/MbppPlus.jsonl https://huggingface.co/datasets/evalplus/mbppplus/resolve/main/MbppPlus.jsonl
3wget -O evaluation/code_eval/data/HumanEvalPlus.jsonl https://huggingface.co/datasets/evalplus/humanevalplus/resolve/main/HumanEvalPlus.jsonl1# Navigate to test directory
2cd test/
3
4# Set GPU device
5export CUDA_VISIBLE_DEVICES=6
6
7# Execute complete pipeline
8bash run_testtime_gpu6.sh1# From test/ directory
2python test_complete_pipeline.py \
3 --model "Qwen/Qwen2.5-7B" \
4 --benchmark "mbpp" \
5 --problem_id "Mbpp/478" \
6 --max_tokens 2048 \
7 --gpu 6 \
8 --verbose \
9 --output_dir ../tmp1# From test/ directory
2bash run_batch_evaluation.sh "Qwen/Qwen2.5-7B" "mbpp" 10 6--benchmark mbpp --problem_id "Mbpp/X"--benchmark humaneval --problem_id "HumanEval/X"--benchmark test (example problems)tmp/{benchmark}/{problem_id}/ # Single problem results
├── initial_solution/ # LLM's original solution + correctness
│ ├── {problem_id}_original_problem.txt # Original benchmark problem
│ ├── {problem_id}_llm_solution.txt # LLM solution + correctness evaluation
│ └── {problem_id}_extracted_program.py # Extracted function code
├── ipo_triples/ # Input-Program-Output triples
├── task_prompts/ # Generated reasoning tasks
├── llm_responses/ # LLM responses to tasks
├── extracted_answers/ # Extracted answers from responses
├── {problem_id}_reward_analysis.json
├── {problem_id}_reward_summary.txt
└── {problem_id}_pipeline_summary.json
test/batch_results/ # Batch evaluation results
├── batch_evaluation_{timestamp}/
│ ├── batch_evaluation_results.json # Detailed results with correctness stats
│ └── evaluation_summary.md # Summary report with accuracy ratesbase_input/plus_input instead of assert parsingf function naming following AZR methodology| Model | Base | #data | Code Avg | Math Avg | Total Avg |
|---|---|---|---|---|---|
| Base Models | |||||
| Qwen2.5-7B | - | - | 52.0 | 27.5 | 39.8 |
| Qwen2.5-7B-Ins | - | - | 56.3 | 37.0 | 46.7 |
| Qwen2.5-7B-Coder | - | - | 56.6 | 23.9 | 40.2 |
| Reasoners Trained on Curated Code Data | |||||
| AceCoder-RM | Ins | 22k | 58.3 | 37.4 | 47.9 |
| AceCoder-RM | Coder | 22k | 57.3 | 27.5 | 42.4 |
| AceCoder-Rule | Ins | 22k | 55.4 | 36.9 | 46.2 |
| AceCoder-Rule | Coder | 22k | 60.0 | 28.5 | 44.3 |
| CodeR1-LC2k | Ins | 2k | 60.5 | 35.6 | 48.0 |
| CodeR1-12k | Ins | 10k | 61.3 | 33.5 | 47.4 |
| Reasoners Trained on Curated Math Data | |||||
| PRIME-Zero | Coder | 484k | 37.2 | 45.8 | 41.5 |
| SimpleRL-Zoo | Base | 8.5k | 54.0 | 38.5 | 46.3 |
| Oat-Zero | Math | 8.5k | 45.4 | 44.3 | 44.9 |
| ORZ | Base | 57k | 55.6 | 41.6 | 48.6 |
| Absolute Zero Training w/ No Curated Data (Ours) | |||||
| AZR (Ours) | Base | 0 | 55.2 +3.2 | 38.4 +10.9 | 46.8 +7.0 |
| AZR (Ours) | Coder | 0 | 61.6 +5.0 | 39.1 +15.2 | 50.4 +10.2 |
| Model Family | Variant | Code Avg | Math Avg | Total Avg |
|---|---|---|---|---|
| Llama3.1-8b | 28.5 | 3.4 | 16.0 | |
| Llama3.1-8b | + AZR (Ours) | 31.6 +3.1 | 6.8 +3.4 | 19.2 +3.2 |
| Qwen2.5-3B Coder | 51.2 | 18.8 | 35.0 | |
| Qwen2.5-3B Coder | + AZR (Ours) | 54.9 +3.7 | 26.5 +7.7 | 40.7 +5.7 |
| Qwen2.5-7B Coder | 56.6 | 23.9 | 40.2 | |
| Qwen2.5-7B Coder | + AZR (Ours) | 61.6 +5.0 | 39.1 +15.2 | 50.4 +10.2 |
| Qwen2.5-14B Coder | 60.0 | 20.2 | 40.1 | |
| Qwen2.5-14B Coder | + AZR (Ours) | 63.6 +3.6 | 43.0 +22.8 | 53.3 +13.2 |
1conda env create -f azr_env.yml
2conda activate azr
3pip install -r flashattn_requirements.txtpython -m absolute_zero_reasoner.data_construction.process_code_reasoning_data⚠️WARNING⚠️: The Python executor in this repository is very raw and intended for research purposes only. It is not secure for production environments. We plan to update our executor to more secure implementations in the future. Your use of our code is at your own discretion and risk.
1export OUTPUT_SEED_PATH=data/<new_ded_abd_seed_data_name>.jsonl
2export OUTPUT_CODE_F_SEED_PATH=data/<new_ind_seed_data_name>.jsonl
3bash scripts/seeding/<7b|14b|coder3b|coder7b|coder14b|llama>.shbash scripts/selfplay/<7b|14b|coder3b|coder7b|coder14b|llama>.sh1export OUTPUT_SEED_PATH=data/<your_ded_abd_seed_data_name>.jsonl
2export OUTPUT_CODE_F_SEED_PATH=data/<your_ind_seed_data_name>.jsonl
3bash scripts/selfplay/<7b|14b|coder3b|coder7b|coder14b|llama>.shazr.executor=sandboxfusion.trainer.wandb_run_id=<run_id>.1python -m absolute_zero_reasoner.utils.convert2hf \
2 <veRL_ckpt_path>/actor \
3 <veRL_ckpt_path>/actor/huggingface/ \
4 <hf_ckpt_path>azr.reward.generation_reward_config, check the ones already implemented such as diversity and complexity rewards. Be Creative!A conversation between User and Assistant. The user asks a question, and the Assistant solves it. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>. User: {question}\nAssistant: <think>git clone https://hf-mirror.com/datasets/livecodebench/code_generation_lite evaluation/code_eval/coding/LiveCodeBench/code_generation_litebash evaluation/code_eval/scripts/run_lcb_gen.sh --model <andrewzh/Absolute_Zero_Reasoner-Coder-3b>1conda create -n evalplus python=3.11
2pip install --upgrade "evalplus[vllm] @ git+https://github.com/evalplus/evalplus@d362e933265c3e7e3df8101c930a89c3c470cd9f"
3Evaluation:
4```bash
5condda activate evalplus
6bash evaluation/code_eval/scripts/run_evalplus.sh 0 <humaneval|mbpp> <andrewzh/Absolute_Zero_Reasoner-Coder-3b>1@misc{zhao2025absolutezeroreinforcedselfplay,
2 title={Absolute Zero: Reinforced Self-play Reasoning with Zero Data},
3 author={Andrew Zhao and Yiran Wu and Yang Yue and Tong Wu and Quentin Xu and Yang Yue and Matthieu Lin and Shenzhi Wang and Qingyun Wu and Zilong Zheng and Gao Huang},
4 year={2025},
5 eprint={2505.03335},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2505.03335},
9}