PaperCoder is a multi-agent LLM system that transforms paper into code repository.
It follows a three-stage pipeline: planning, analysis, and code generation, each handled by specialized agents.
Our method outperforms strong baselines both on Paper2Code and PaperBench and produces faithful, high-quality implementations.
- Note: The following command runs example paper (Attention Is All You Need).
pip install openai
cd scripts
bash run.sh
- Note: If you wish to use the
o3-mini
version, please make sure to install the latest version of the OpenAI package.
pip install openai
- Clone the
s2orc-doc2json
repository to convert your PDF file into a structured JSON format.
(For detailed configuration, please refer to the official repository.)
git clone https://github.com/allenai/s2orc-doc2json.git
- Running the PDF processing service.
cd ./s2orc-doc2json/grobid-0.7.3
./gradlew run
- Convert your PDF into JSON format.
mkdir -p ./s2orc-doc2json/output_dir/paper_coder
python ./s2orc-doc2json/doc2json/grobid2json/process_pdf.py \
-i ${PDF_PATH} \
-t ./s2orc-doc2json/temp_dir/ \
-o ./s2orc-doc2json/output_dir/paper_coder
- Note: The following command runs example paper (Attention Is All You Need).
If you want to run PaperCoder on your own paper, please modify the environment variables accordingly.
cd scripts
bash run.sh