Skip to main content
QUICK REVIEW

[Paper Review] OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models

Siming Huang, Tsung‐Chieh Cheng|arXiv (Cornell University)|Nov 7, 2024
Natural Language Processing TechniquesComputer Science5 citations
TL;DR

OpenCoder presents a fully open-source code LLM with reproducible pretraining data, training pipelines, and two-stage instruction tuning, achieving top performance among fully open models at 6B+ parameters. It provides an open foundation for reproducible code AI research.

ABSTRACT

Large language models (LLMs) for code have become indispensable in various domains, including code generation, reasoning tasks and agent systems. While open-access code LLMs are increasingly approaching the performance levels of proprietary models, high-quality code LLMs suitable for rigorous scientific investigation, particularly those with reproducible data processing pipelines and transparent training protocols, remain limited. The scarcity is due to various challenges, including resource constraints, ethical considerations, and the competitive advantages of keeping models advanced. To address the gap, we introduce OpenCoder, a top-tier code LLM that not only achieves performance comparable to leading models but also serves as an "open cookbook" for the research community. Unlike most prior efforts, we release not only model weights and inference code, but also the reproducible training data, complete data processing pipeline, rigorous experimental ablation results, and detailed training protocols for open scientific research. Through this comprehensive release, we identify the key ingredients for building a top-tier code LLM: (1) code optimized heuristic rules for data cleaning and methods for data deduplication, (2) recall of text corpus related to code and (3) high-quality synthetic data in both annealing and supervised fine-tuning stages. By offering this level of openness, we aim to broaden access to all aspects of a top-tier code LLM, with OpenCoder serving as both a powerful model and an open foundation to accelerate research, and enable reproducible advancements in code AI.

Motivation & Objective

  • Provide a meticulously curated, fully transparent strong baseline code LLM for research on mechanical interpretability and data distributions in code LLMs.
  • Investigate pretraining and instruction data curation pipelines to understand design choices for stronger code LLMs.
  • Offer an open, reproducible data processing pipeline, datasets, and training protocols to accelerate open scientific research in code AI.

Proposed method

  • Introduce RefineCode, a high-quality 960B-token pretraining dataset spanning 607 languages with 130 language-specific rules and weightings.
  • Design and apply a code-focused data processing pipeline including preprocessing, deduplication (exact and fuzzy), transformation (copyright removal, PII reduction), and language- and code-specific filtering rules.
  • Assemble code-related web data via an iterative recall pipeline from Common Crawl with domain-based coding classification and URL annotation.
  • Propose a two-stage instruction-tuning regimen using RealUser-Instruct, Large-scale Diverse-Instruct, and filtered instruction sets, followed by high-quality code from GitHub for Stage 2.
  • Train OpenCoder in two model sizes (1.5B and 8B) with Megatron-LM, using WSD learning schedule, specific optimizers, and large token budgets; apply a careful annealing phase with high-quality synthetic data to bridge pretraining and SFT.

Experimental results

Research questions

  • RQ1How can open-source code LLMs reach top-tier performance while remaining fully open and reproducible?
  • RQ2What data curation, deduplication, and quality strategies most effectively improve code LLM pretraining and downstream coding tasks?
  • RQ3Does a two-stage instruction tuning approach combining theoretical CS content with high-quality GitHub code improve general coding capabilities and explainability?

Key findings

  • OpenCoder surpasses previous fully open models at 6B+ parameter scale on code-related benchmarks (as shown in Figure 1).
  • RefineCode provides a high-quality, reproducible pretraining dataset (960B tokens across 607 languages) that improves training efficiency compared to The Stack v2.
  • A two-stage instruction tuning strategy (theoretical CS QA first, then high-quality code from GitHub) yields stronger performance on both code generation and understanding tasks.
  • The release includes not only model weights but also reproducible data processing pipelines, ablations, and training protocols to enable reproducible code LLM research.
  • Compared against open models in Table 1, OpenCoder-8B achieves competitive HumanEval Pass@1 scores while providing full openness of data and workflow.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.