Skip to main content
QUICK REVIEW

[Paper Review] GPT-Neo: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow

Dan Hendrycks, Steven Basart|arXiv (Cornell University)|Mar 21, 2021
Software Engineering ResearchComputer Science32 references137 citations
TL;DR

The paper evaluates code generation using APPS, introducing a 10,000-problem benchmark and showing GPT-Neo fine-tuned on APPS achieves notable but limited code-generation ability, with syntax errors decreasing as models scale.

ABSTRACT

GPT-Neo is an implementation of model & data-parallel GPT-2 and GPT-3-like models, utilizing Mesh Tensorflow for distributed support. This codebase is designed for TPUs. It should also work on GPUs, though we do not recommend this hardware configuration.

Motivation & Objective

  • Define a rigorous benchmark (APPS) for code generation from natural language to Python.
  • Assess how large language models perform on real code generation tasks using automatic test-case evaluation.
  • Analyze the impact of model size, fine-tuning, and decoding strategies on code generation performance.

Proposed method

  • Construct APPS with 10,000 problems, 131,777 test cases, and 232,421 human-written solutions.
  • Pretrain GPT-2 on GitHub-derived Python data with decontamination; fine-tune on APPS with problem statements and formats.
  • Evaluate code by executing generated programs against test cases (test-case average) and requiring all test cases pass (strict accuracy).
  • Use beam search with beam width 5 and evaluate five beams per problem.
  • Compare GPT-2 variants, GPT-Neo, GPT-3 (few-shot), and codex-style larger models on Introductory/Interview/Competitive difficulty levels.

Experimental results

Research questions

  • RQ1How well can large language models generate Python code when given natural language descriptions?
  • RQ2Does fine-tuning on a dedicated code-generation benchmark improve performance relative to general pretraining?
  • RQ3What is the relationship between model size, syntax errors, and code correctness on APPS?
  • RQ4How do automatic evaluation metrics (test-case accuracy vs BLEU) correlate with true code correctness?

Key findings

  • GPT-Neo 2.7B passes about 15% of test cases on Introductory problems with a single generated solution and ~4% strict accuracy.
  • Syntax errors drop dramatically with model size and fine-tuning; GPT-Neo 2.7B has ~3% syntax errors on Introductory problems.
  • BLEU scores are not reliable indicators of code correctness and can be anticorrelated with gold-standard accuracy.
  • GPT-3 (175B) solves very few problems in a few-shot setting on APPS, indicating limited code-generation ability in that setup.
  • Larger code-focused models (Codex-like) show stronger performance than GPT-Neo 2.7B, but still far from solving APPS fully.
  • Beam search (Top-5) improves correct solution rates, enabling GPT-Neo 2.7B to achieve higher strict accuracy in Introductory problems.

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.