|
--- |
|
license: bigscience-openrail-m |
|
metrics: |
|
- code_eval |
|
library_name: transformers |
|
tags: |
|
- code |
|
--- |
|
|
|
<p style="font-size:28px;" align="center"> |
|
π MoTCoder |
|
</p> |
|
|
|
<p align="center"> |
|
β’ π€ <a href="https://huggingface.co/datasets/JingyaoLi/MoTCode-Data" target="_blank">Data </a> |
|
β’ π€ <a href="https://huggingface.co/JingyaoLi/MoTCoder-32B-V1.5" target="_blank">MoTCoder-32B </a> |
|
β’ π€ <a href="https://huggingface.co/JingyaoLi/MoTCoder-7B-v1.5" target="_blank">MoTCoder-7B </a> |
|
β’ π± <a href="https://github.com/dvlab-research/MoTCoder" target="_blank">Code</a> |
|
β’ π <a href="https://arxiv.org/abs/2312.15960" target="_blank">Paper</a> <br> |
|
</p> |
|
|
|
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.8% on APPS and 5.9% 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. |
|
|
|
<div style="text-align: center;"> |
|
<img src="impression.png" alt="impression" /> |
|
</div> |
|
|
|
## Performance |
|
|
|
### APPS |
|
<div style="text-align: center;"> |
|
<img src="apps.png" alt="Performance on APPS" /> |
|
</div> |
|
|
|
### CodeContests |
|
<div style="text-align: center;"> |
|
<img src="codecontests.png" alt="Performance on CodeContests" width="500px" /> |
|
</div> |
|
|
|
### Reflection |
|
<div style="text-align: center;"> |
|
<img src="reflection.png" alt="Performance on Reflection" /> |
|
</div> |
|
|
|
## Citation |
|
If you find our work useful, please consider citing it. |
|
``` |
|
@misc{li2025motcoderelevatinglargelanguage, |
|
title={MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Tasks}, |
|
author={Jingyao Li and Pengguang Chen and Bin Xia and Hong Xu and Jiaya Jia}, |
|
year={2025}, |
|
eprint={2312.15960}, |
|
archivePrefix={arXiv}, |
|
primaryClass={cs.LG}, |
|
url={https://arxiv.org/abs/2312.15960}, |
|
} |
|
``` |
|
|
|
|