MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Li, Jingyao, Chen, Pengguang, Xia, Bin, Xu, Hong, Jia, Jiaya
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915218037145600
author Li, Jingyao
Chen, Pengguang
Xia, Bin
Xu, Hong
Jia, Jiaya
author_facet Li, Jingyao
Chen, Pengguang
Xia, Bin
Xu, Hong
Jia, Jiaya
contents Large Language Models (LLMs) have showcased impressive capabilities in handling straightforward programming tasks. However, their performance tends to falter when confronted with more challenging programming problems. We observe that conventional models often generate solutions as monolithic code blocks, restricting their effectiveness in tackling intricate questions. To overcome this limitation, we present Module-of-Thought Coder (MoTCoder). We introduce a framework for MoT instruction tuning, designed to promote the decomposition of tasks into logical sub-tasks and sub-modules. Our investigations reveal that, through the cultivation and utilization of sub-modules, MoTCoder significantly improves both the modularity and correctness of the generated solutions, leading to substantial pass@1 improvements of 5.9% on APPS and 5.8% on CodeContests. MoTCoder also achieved significant improvements in self-correction capabilities, surpassing the current SOTA by 3.3%. Additionally, we provide an analysis of between problem complexity and optimal module decomposition and evaluate the maintainability index, confirming that the code generated by MoTCoder is easier to understand and modify, which can be beneficial for long-term code maintenance and evolution. Our codes are available at https://github.com/dvlab-research/MoTCoder.
format Preprint
id arxiv_https___arxiv_org_abs_2312_15960
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks
Li, Jingyao
Chen, Pengguang
Xia, Bin
Xu, Hong
Jia, Jiaya
Machine Learning
Programming Languages
Software Engineering
Large Language Models (LLMs) have showcased impressive capabilities in handling straightforward programming tasks. However, their performance tends to falter when confronted with more challenging programming problems. We observe that conventional models often generate solutions as monolithic code blocks, restricting their effectiveness in tackling intricate questions. To overcome this limitation, we present Module-of-Thought Coder (MoTCoder). We introduce a framework for MoT instruction tuning, designed to promote the decomposition of tasks into logical sub-tasks and sub-modules. Our investigations reveal that, through the cultivation and utilization of sub-modules, MoTCoder significantly improves both the modularity and correctness of the generated solutions, leading to substantial pass@1 improvements of 5.9% on APPS and 5.8% on CodeContests. MoTCoder also achieved significant improvements in self-correction capabilities, surpassing the current SOTA by 3.3%. Additionally, we provide an analysis of between problem complexity and optimal module decomposition and evaluate the maintainability index, confirming that the code generated by MoTCoder is easier to understand and modify, which can be beneficial for long-term code maintenance and evolution. Our codes are available at https://github.com/dvlab-research/MoTCoder.
title MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks
topic Machine Learning
Programming Languages
Software Engineering
url https://arxiv.org/abs/2312.15960