atlas

Research map / Large language models / Instruction and fine-tuning

At Which Training Stage Does Code Data Help LLMs Reasoning?

ICLR 2024 · Large language models › Instruction and fine-tuning · approach: Calibration and knowledge in LLM tuning · 3 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.

Systematically studies whether adding code data at pre-training, instruction-tuning, or both stages improves LLM reasoning, using PanGu-α 2.6B/13B and a code-mixed CodePanGu 2.6B across six reasoning tasks.

Problem

It is unclear at which training stage (pre-training or instruction tuning) adding code data actually improves LLM reasoning, since prior models mix code in with unknown training details and differing scales.

Approach

Controlled comparison at fixed parameter scale and objective: train text-only and text+code variants at pre-training and instruction-tuning stages, evaluate on logical, legal, scientific, analogical and code reasoning, and test dynamic text/code mixing schedules during instruction tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add mixed code and text during pre-trainingPanGu2.6B · JEC-QAACC: 27.00 -> 28.70Helped
Add mixed code and text during pre-trainingPanGu2.6B · ScienceQAACC: 45.93 -> 46.06Helped
Add mixed code and text during pre-trainingPanGu2.6B · CosQAACC: 47.01 -> 50.50Helped
Add mixed code and text during pre-trainingPanGu2.6B · MBPPBLEU: 0.52 -> 5.06Helped
Add mixed code and text during pre-trainingPanGu2.6B · LogicACC: 36.36 -> 40.90Helped
Add code instructions during instruction tuningPanGu2.6B · CosQAACC: 45.20 -> 48.18Helped
Add code instructions during instruction tuningPanGu2.6B · MBPPBLEU: 0.00 -> 5.61Helped
Add code instructions during instruction tuningPanGu2.6B · E-KARACC: 30.45 -> 28.66Hurt
Add code instructions during instruction tuningPanGu2.6B · ScienceQAACC: 44.45 -> 43.44Hurt
Combine code pre-training with code instruction tuningCodePanGu2.6B · MBPPBLEU: 0.00 -> 24.88Helped
Add Chain-of-Thought promptingNL (2.6B) · ScienceQAACC: 45.93 -> 68.76Helped
Add Chain-of-Thought promptingCODE (2.6B) · E-KARACC: 36.12 -> 72.84Helped

Surprising findings

Limitations

Experimental setup

Datasets: CodeParrot Common Crawl Alpaca-GPT-4 PromptCLUE CodeAlpaca CosQA MBPP C-Eval logic JEC-QA ScienceQA E-KAR OCNLI

Benchmarks: C-Eval logic JEC-QA ScienceQA E-KAR CosQA MBPP OCNLI CMNLI C3 DuReader

Metrics: accuracy BLEU exact match F1

Baselines: PanGu-α 2.6B (NL) PanGu-α 13B (NL)

Builds on: PanGu-α CodeParrot CodeAlpaca chain-of-thought prompting

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