ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation
Houxing Ren, Mingjie Zhan, Zhongyuan Wu, Aojun Zhou, Junting Pan, Hongsheng Li

TL;DR
ReflectionCoder introduces a novel method leveraging reflection sequences with compiler feedback to significantly improve one-off code generation, achieving state-of-the-art results across multiple benchmarks.
Contribution
The paper proposes ReflectionCoder, a new approach that uses reflection sequences and specialized distillation techniques to enhance code generation performance.
Findings
Achieves state-of-the-art performance on HumanEval+, MBPP+, and MultiPL-E benchmarks.
Effectively utilizes reflection sequences through reflection self-distillation.
Demonstrates potential benefits for other domains requiring complex reasoning.
Abstract
Code generation plays a crucial role in various tasks, such as code auto-completion and mathematical reasoning. Previous work has proposed numerous methods to enhance code generation performance, including integrating feedback from the compiler. Inspired by this, we present ReflectionCoder, a novel approach that effectively leverages reflection sequences constructed by integrating compiler feedback to improve one-off code generation performance. Furthermore, we propose reflection self-distillation and dynamically masked distillation to effectively utilize these reflection sequences. Extensive experiments on three benchmarks, i.e., HumanEval (+), MBPP (+), and MultiPL-E, demonstrate that models fine-tuned with our method achieve state-of-the-art performance. Beyond the code domain, we believe this approach can benefit other domains that focus on final results and require long reasoning…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗SenseLLM/ReflectionCoder-CL-7Bmodel· 21 dl· ♡ 121 dl♡ 1
- 🤗SenseLLM/ReflectionCoder-DS-6.7Bmodel· 14 dl· ♡ 314 dl♡ 3
- 🤗SenseLLM/ReflectionCoder-CL-34Bmodel· 8.2k dl8.2k dl
- 🤗SenseLLM/ReflectionCoder-DS-33Bmodel· 8.2k dl· ♡ 48.2k dl♡ 4
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-2_2bpw_exl2model· 9 dl9 dl
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-2_5bpw_exl2model· 1 dl1 dl
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-3_0bpw_exl2model
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-3_75bpw_exl2model
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-3_5bpw_exl2model
- 🤗Zoyd/SenseLLM_ReflectionCoder-DS-6.7B-4_0bpw_exl2model
Videos
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Software Testing and Debugging Techniques
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · 15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · Label Smoothing · Adam · Position-Wise Feed-Forward Layer · Dropout · Dense Connections · Absolute Position Encodings · Softmax
