Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Paper2Code is an innovative multi-agent LLM system designed to automate the generation of code repositories directly from scientific papers in machine learning. It employs a sophisticated three-stage pipeline, encompassing planning, analysis, and code generation, each managed by specialized agents. This approach ensures faithful and high-quality implementations, outperforming existing baselines on relevant benchmarks.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Paper2Code is a cutting-edge multi-agent LLM system that streamlines the process of transforming scientific papers, particularly in machine learning, into functional code repositories. It operates through a meticulously designed three-stage pipeline: planning, analysis, and code generation, with each stage handled by specialized agents. This system has demonstrated superior performance against strong baselines on both Paper2Code and PaperBench datasets, consistently producing high-quality and faithful implementations.
Read the original paper on arXiv: Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning
Installation
Getting started with Paper2Code is straightforward. You can choose between using the OpenAI API or leveraging open-source models with vLLM.
For OpenAI API:
pip install openai
export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
# Navigate to the scripts directory to run examples
# cd scripts
For Open Source Models with vLLM:
pip install vllm
# Navigate to the scripts directory to run examples
# cd scripts
Alternatively, you can install all dependencies at once:
pip install -r requirements.txt
Examples
Paper2Code can generate code from a given paper, such as 'Attention Is All You Need'.
Using OpenAI API (PDF-based JSON format):
export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
cd scripts
bash run.sh
Using Open Source Models with vLLM (PDF-based JSON format):
cd scripts
bash run_llm.sh
The output will be structured into planning, analyzing, and coding artifacts, culminating in a final output repository, for example, outputs/Transformer_repo.
Why Use Paper2Code
- Automated Code Generation: Significantly reduces the manual effort and time required to translate research papers into executable code.
- High-Quality Implementations: The multi-agent LLM system ensures that the generated code is faithful to the paper's methodology and produces high-quality results.
- Benchmarked Performance: Proven to outperform strong baselines on established benchmarks like Paper2Code and PaperBench.
- Flexibility: Supports both proprietary (OpenAI) and open-source (vLLM) large language models, offering users choice and control.
- Structured Output: Generates a complete code repository with clear artifacts for each stage of the process.
Links
- GitHub Repository: Paper2Code
- arXiv Paper: Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning
- Hugging Face Dataset: paper2code
Related repositories
Similar repositories that may be relevant next.

Benchmark Radar: A Living Database for AI Benchmarks and Evaluation
September 29, 2026
Benchmark Radar is an extensive open-source project that tracks over 20,710 AI benchmark, evaluation, dataset, and data-quality records from 37 public sources. It provides daily updates, linked evidence, and tools for researchers and developers to discover and analyze AI benchmarks. This project is essential for anyone needing to stay current with AI evaluation trends and model performance.

Pydantic AI Harness: Enhancing Your AI Agents with Robust Capabilities
September 28, 2026
Pydantic AI Harness is the official capability and harness library for Pydantic AI, designed to extend agents for complex, long-running tasks. It provides a modular system of "capabilities" for functionalities like file system interaction, web research, memory, and sub-agent delegation. This library enables developers to build sophisticated and durable AI agents with ease.

Bernstein: Open-Source Governance and Orchestration for AI Agents
September 28, 2026
Bernstein is an open-source framework designed for the governance and orchestration of AI agents, allowing users to define rules declaratively. It enforces these policies and generates verifiable, replayable records of all agent activities. This Python-based solution provides a robust layer for managing complex AI agent workflows with transparency and accountability.

Meshtastic-MCP: AI Tooling for Meshtastic Device Control and Testing
September 27, 2026
Meshtastic-MCP provides an MCP server and agent skills designed for AI tooling to discover, drive, observe, and test Meshtastic devices and applications. It offers a comprehensive suite of capabilities, from portable device control to advanced hardware-free end-to-end testing and replay functionalities. This project aims to streamline the development and testing of Meshtastic ecosystems.
Source repository
Open the original repository on GitHub.
21 counted GitHub visits