atlas

Research map / Large language models / Agents, code and math

Llemma: An Open Language Model for Mathematics

ICLR 2024 · Large language models › Agents, code and math · approach: Retrieval-augmented formal theorem proving · 15 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Continues pretraining Code Llama on the 55B-token Proof-Pile-2 math corpus to produce open 7B and 34B Llemma models that lead open base models on MATH and show few-shot tool use and formal theorem proving.

Problem

Open language models lag behind closed math-specialized models (e.g., Minerva) on mathematical reasoning, and no open, reproducible math-specialized base model with released data existed.

Approach

Adapt a code-pretrained base model to mathematics via continued pretraining on a curated math mixture (Proof-Pile-2 with arXiv, OpenWebMath, and the AlgebraicStack code dataset), releasing all artifacts openly.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · GSM8kaccuracy: 29.6% -> 51.5%Helped
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · OCWaccuracy: 7.0% -> 11.8%Helped
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · MMLU-STEMaccuracy: 40.5% -> 49.0%Helped
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · SATaccuracy: 40.6% -> 71.9%Helped
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · MATHaccuracy: 12.2% -> 25.0%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 7B and 34B · GSM8k+Python and MATH+Pythonpass@1: 27.1% -> 40.1%; 17.2% -> 21.5%; 52.7% -> 62.6%; 23.5% -> 27.1%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 7B · miniF2F-valid (Isabelle informal-to-formal)proven theorems: 16.31% -> 20.60%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 7B · miniF2F-test (Isabelle informal-to-formal)proven theorems: 17.62% -> 22.13%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 34B · miniF2F-valid (Isabelle informal-to-formal)proven theorems: 18.45% -> 21.03%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 34B · miniF2F-test (Isabelle informal-to-formal)proven theorems: 18.03% -> 21.31%Helped
Continue pretraining Code Llama on Proof-Pile-2Code Llama 7B · miniF2F-test (Lean formal-to-formal)proven theorems: 20.49% -> 26.23%Helped
Continue pretraining Code Llama 34B on Proof-Pile-2Code Llama 34B · miniF2F-test (Lean formal-to-formal)proven theorems: 22.13% -> 25.82%Helped

Surprising findings

Limitations

Experimental setup

Datasets: Proof-Pile-2 AlgebraicStack OpenWebMath RedPajama ArXiv The Pile MATH GSM8k MetaMathQA miniF2F

Benchmarks: MATH GSM8k OCWCourses MMLU-STEM SAT miniF2F

Metrics: accuracy maj@k pass@1 perplexity

Baselines: Minerva Code Llama Llama 2 Sledgehammer ReProver COPRA

Builds on: Code Llama Minerva OpenWebMath RedPajama GPT-NeoX

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy