Reproduce “LLM-Assisted Code Cleaning For Training Accurate Code Generators” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Naman Jain, Tianjun Zhang, Wei-Lin Chiang, Joseph E. Gonzalez, Koushik Sen, Ion Stoica

Researchers from the University of California, Berkeley, introduce an LLM-assisted pipeline to clean and improve the quality of existing code datasets by enhancing readability, modularity, and incorporating natural language plans. This approach significantly boosts the performance and data efficiency of code generation models, with a fine-tuned CODELLAMA-7B on the cleaned data outperforming larger ALPHACODE models and achieving comparable `PASS@1` with 15% of the original data volume.

Key insights

  • Stylistic and structural code quality, such as readability and modularity, directly improves the performance and data efficiency of code generation LLMs.
  • Large Language Models (LLMs) can effectively transform and refactor existing code into higher quality versions while maintaining functional correctness, which is more effective than direct synthetic data generation.
  • While LLMs can successfully follow accurate high-level plans, their ability to automatically generate such precise plans for complex problems remains a significant limitation.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.