atlas

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

AlchemistCoder: Harmonizing and Eliciting Code Capability by Hindsight Tuning on Multi-source Data

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

Fine-tunes Code LLMs (Llama 2-7B, CodeLlama-Python-7B, DeepSeek-Coder-Base-6.7B) on a harmonized multi-source code dataset using GPT-4-generated data-specific AlchemistPrompts and code comprehension tasks.

Problem

Single-source fine-tuning data for Code LLMs has limited quality and diversity, while naively mixing multi-source code data causes conflicts in languages and response styles that can hurt performance.

Approach

Generate data-specific "AlchemistPrompts" with GPT-4 that describe response characteristics and prepend them to instructions (hindsight relabeling) to harmonize conflicting multi-source data, and add code comprehension tasks (instruction evolution, data filtering, code review) built from the data construction process as training data.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune Llama 2 on harmonized multi-source dataAlchemistCoder-L · HumanEvalpass@1: 42.7%Helped
Fine-tune Llama 2 on harmonized multi-source dataAlchemistCoder-L · MBPPpass@1: 28.4%Helped
Fine-tune DeepSeek-Coder-Base on harmonized multi-source dataAlchemistCoder-DS · HumanEval and MBPPpass@1: 79.9% and 77.0%; overall improvement of 33.3%Helped
Fine-tune on harmonized multi-source dataAlchemistCoder models · DS-1000pass@1: up to 19.2%Helped
Add AlchemistPrompts to 5% of training samples (ablation)CodeLlama-Python-7B fine-tuning · HumanEval and MBPPpass@1Helped
Vary the AlchemistPrompt-customized data proportion from 0% to 20% (ablation)CodeLlama-Python-7B fine-tuning · HumanEval and MBPPpass@1: 0% to 20%; 1% to 5%Mixed
Augment original samples with AlchemistPrompt-customized variants (ablation)CodeLlama-Python-7B fine-tuning · HumanEval and MBPPpass@1Helped
Replace original samples with AlchemistPrompt-customized variants (ablation)CodeLlama-Python-7B fine-tuning · HumanEval and MBPPpass@1Helped
Add code comprehension task data (ablation)AlchemistCoder · HumanEval and MBPPpass@1: 5.1%Helped
Fine-tune with harmonized multi-source dataAlchemistCoder models · MMLU, BBH, and GSM8Koverall performance: 6.4%, 13.6%, and 14.5%Helped

Surprising findings

Limitations

Experimental setup

Datasets: Evol-Instruct-Code-80k-v1 CodeExercise-Python-27k evol-codealpaca-v1 EvolCode (generated from gpt-3.5-turbo) AlchemistPrompt-customized data code comprehension task data

Benchmarks: HumanEval HumanEval+ MBPP MBPP+ HumanEval-X DS-1000 MMLU BBH GSM8K

Metrics: pass@1

Baselines: GPT-3.5-Turbo GPT-4-Turbo CodeLlama-Instruct WizardCoder DeepSeek-Coder-Instruct Magicoder MagicoderS-CL MagicoderS-DS

Builds on: Evol-Instruct hindsight experience replay EvalPlus Magicoder

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