Papers
Topics
Authors
Recent
2000 character limit reached

Code Comparison Tuning for Code Large Language Models (2403.19121v2)

Published 28 Mar 2024 in cs.CL

Abstract: We present Code Comparison Tuning (CCT), a simple and effective tuning method for code LLMs (Code LLMs) to better handle subtle code errors. Specifically, we integrate the concept of comparison into instruction tuning, both at the token and sequence levels, enabling the model to discern even the slightest deviations in code. To compare the original code with an erroneous version containing manually added code errors, we use token-level preference loss for detailed token-level comparisons. Additionally, we combine code segments to create a new instruction tuning sample for sequence-level comparisons, enhancing the model's bug-fixing capability. Experimental results on the HumanEvalFix benchmark show that CCT surpasses instruction tuning in pass@1 scores by up to 4 points across diverse code LLMs, and extensive analysis demonstrates the effectiveness of our method.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (26)
  1. Self-supervised bug detection and repair. Advances in Neural Information Processing Systems, 34:27865–27876.
  2. Qwen technical report. arXiv preprint arXiv:2309.16609.
  3. Detect-localize-repair: A unified framework for learning to debug with codet5. arXiv preprint arXiv:2211.14875.
  4. Evaluating large language models trained on code.(2021). arXiv preprint arXiv:2107.03374.
  5. Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128.
  6. Codefuse-13b: A pretrained multi-lingual code large language model. arXiv preprint arXiv:2310.06266.
  7. Incoder: A generative model for code infilling and synthesis. arXiv preprint arXiv:2204.05999.
  8. Critic: Large language models can self-correct with tool-interactive critiquing. arXiv preprint arXiv:2305.11738.
  9. Starcoder: may the source be with you! arXiv preprint arXiv:2305.06161.
  10. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568.
  11. Coconut: combining context-aware neural translation models using ensemble for program repair. In Proceedings of the 29th ACM SIGSOFT international symposium on software testing and analysis, pages 101–114.
  12. Ehsan Mashhadi and Hadi Hemmati. 2021. Applying codebert for automated program repair of java simple bugs. In 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR), pages 505–509. IEEE.
  13. Octopack: Instruction tuning code large language models. arXiv preprint arXiv:2308.07124.
  14. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786.
  15. Codegen: An open large language model for code with multi-turn program synthesis. arXiv preprint arXiv:2203.13474.
  16. OpenAI. 2023. Gpt-4 technical report.
  17. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744.
  18. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950.
  19. Pangu-coder2: Boosting large language models for code with ranking feedback. arXiv preprint arXiv:2307.14936.
  20. Leti: Learning to generate from textual interactions. arXiv preprint arXiv:2305.10314.
  21. Codet5+: Open code large language models for code understanding and generation. arXiv preprint arXiv:2305.07922.
  22. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652.
  23. Michihiro Yasunaga and Percy Liang. 2021. Break-it-fix-it: Unsupervised learning for program repair. In International Conference on Machine Learning, pages 11941–11952. PMLR.
  24. Tim: Teaching large language models to translate with comparison. arXiv preprint arXiv:2307.04408.
  25. Self-edit: Fault-aware code editor for code generation. arXiv preprint arXiv:2305.04087.
  26. Codegeex: A pre-trained model for code generation with multilingual evaluations on humaneval-x. arXiv preprint arXiv:2303.17568.

Summary

We haven't generated a summary for this paper yet.

Whiteboard

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.