mlsanityData to 7 Oct 2026

Training Language Models on Synthetic Edit Sequences Improves Code Synthesis

arXiv 2410.02749 ↗First posted 3 Oct 2024cs.LG cs.CLcited by 7

Not on the map. Why?

Abstract (arXiv)

Software engineers mainly write code by editing existing programs. In contrast, language models (LMs) autoregressively synthesize programs in a single pass. One explanation for this is the scarcity of sequential edit data. While high-quality instruction data for code synthesis is scarce, edit data for synthesis is even scarcer. To fill this gap, we develop a synthetic data generation algorithm called LintSeq. This algorithm refactors programs into sequences of synthetic edits by using a linter to procedurally sample across interdependent lines of source code. Synthetic edits sampled with LintSeq reflect the syntax and semantics of their programming language. To test the algorithm, we use it to refactor a dataset of instruction + program pairs into instruction + program-diff-sequence tuples. Then, we fine-tune a series of smaller LMs ranging from 2.6B to 14B parameters on both the re-factored and original versions of this dataset. We perform comprehensive evaluations comparing edit sequence code LMs against baselines on HumanEval, MBPP(+), CodeContests, DS-1000, and BigCodeBench. We show that models fine-tuned to iteratively synthesize code match or outperform baselines on pass@1, and exhibit better scaling across higher pass@k as a function of total test-time FLOPs. Finally, we also pretrain our own tiny LMs for code understanding. We show that fine-tuning these models to synthesize code edit-by-edit results in strong performance on HumanEval and MBPP(+) compared to existing code language models of similar scale such as CodeT5+, AlphaCode, and Codex.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 40 of its 54 references that are in the map. First posted on arXiv 3 Oct 2024.

Builds on

40 of 54 references.

References · 40

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2020Scaling Laws for Neural Language Modelscited by 6,411
  6. 2016Layer Normalizationcited by 5,579
  7. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  8. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  9. 2021Program Synthesis with Large Language Modelscited by 3,509
  10. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  11. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  12. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
28 more
  1. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  2. 2020GLU Variants Improve Transformercited by 1,724
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  4. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  5. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
  6. 2022Diffusion-LM Improves Controllable Text Generationcited by 1,006
  7. 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
  8. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  9. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
  10. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  11. 2023StarCoder: may the source be with you!cited by 790
  12. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
  13. 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 641
  14. 2024OLMo: Accelerating the Science of Language Modelscited by 599
  15. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  16. 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 475
  17. 2023Scaling Data-Constrained Language Modelscited by 391
  18. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  19. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  20. 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 339
  21. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  22. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
  23. 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
  24. 2024Nemotron-4 340B Technical Reportcited by 143
  25. 2024OpenELM: An Efficient Language Model Family with Open Training and Inference Frameworkcited by 74
  26. 2023ZeRO++: Extremely Efficient Collective Communication for Giant Model Trainingcited by 50
  27. 2023InstructCoder: Instruction Tuning Large Language Models for Code Editingcited by 28
  28. 2023diff History for Neural Language Agentscited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 4; 2026: 2.

7 papers.