atlas

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

Mercury: A Code Efficiency Benchmark for Code Large Language Models

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Fine-tuning generalization and delta compression · 13 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.

Introduces Mercury, a 1,889-task LeetCode-based Python benchmark with runtime-distribution-based efficiency metric Beyond, and shows DPO beats SFT for improving code efficiency of code LLMs.

Problem

Code LLM benchmarks evaluate only functional correctness and ignore computational efficiency of generated code, and have limited test coverage and task difficulty.

Approach

Normalize code runtime against a per-task distribution of historical human solutions to get a runtime-percentile metric (Beyond) that jointly reflects correctness (failed solutions score 0) and efficiency; pair with LLM-generated test case generators and LoRA-based SFT/DPO baselines.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply DPO on Mercury-traindeepseek-coder-33b-base · Mercury-evalBeyond: 48.53 -> 66.47Helped
Apply DPO on Mercury-trainCodeLlama-34b-hf · Mercury-evalBeyond: 42.40 -> 63.94Helped
Apply DPO on Mercury-trainstarcoder2-15b · Mercury-evalBeyond: 49.17 -> 58.95Helped
Apply DPO on Mercury-trainCodeLlama-13b-hf · Mercury-evalBeyond: 38.01 -> 47.39Helped
Apply DPO on Mercury-trainstarcoder2-3b · Mercury-evalBeyond: 33.40 -> 32.42Hurt
Apply DPO on Mercury-trainCodeLlama-7b-hf · Mercury-evalBeyond: 27.45 -> 33.29Helped
Apply SFT on Mercury-trainstarcoder2-7b · Mercury-evalBeyond: 40.37 -> 35.61Hurt
Apply SFT on Mercury-traindeepseek-coder-33b-base · Mercury-evalBeyond: 48.53 -> 38.32Hurt
Apply SFT on Mercury-trainCodeLlama-34b-hf · Mercury-evalBeyond: 42.40 -> 36.91Hurt
Apply DPO on Mercury-trainCodeQwen1.5-7B · Mercury-evalBeyond: 47.78 -> 48.52Helped
Apply DPO on Mercury-traindeepseek-coder-1.3b-base · Mercury-evalBeyond: 35.62 -> 35.21Hurt
Apply DPO on Mercury-traindeepseek-coder-6.7b-base · Mercury-evalBeyond: 48.29 -> 49.70Helped

Surprising findings

Limitations

Experimental setup

Datasets: Mercury-train Mercury-eval HumanEval MBPP

Benchmarks: Mercury-eval HumanEval MBPP

Metrics: Pass Beyond Gap runtime percentile

Baselines: SFT HumanEval MBPP

Builds on: DPO LoRA HumanEval MBPP LeetCode

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