Magicoder: Empowering Code Generation with OSS-Instruct

Yuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding, Lingming Zhang
2/12/2026

No official code found. Best implementation: ise-uiuc/magicoder (2,096 stars, MIT, last commit 2024-11-01).

Abstract

We introduce Magicoder, a series of fully open-source (code, weights, and data) Large Language Models (LLMs) for code that significantly closes the gap with top code models while having no more than 7B parameters. Magicoder models are trained on 75K synthetic instruction data using OSS-Instruct, a novel approach to enlightening LLMs with open-source code snippets to generate diverse instruction data for code. Our main motivation is to mitigate the inherent bias of the synthetic data generated by LLMs through the wealth of open-source references for the production of more realistic and controllable data. The orthogonality of OSS-Instruct and other data generation methods like Evol-Instruct further enables us to build an enhanced MagicoderS. Both Magicoder and MagicoderS substantially outperform state-of-the-art code models with similar or even larger sizes on a wide range of coding benchmarks. Notably, MagicoderS-CL-7B based on CodeLlama even surpasses the prominent ChatGPT on HumanEval+ (66.5 vs. 65.9 in pass@1 ). Overall, OSS-Instruct opens a new direction for crafting diverse synthetic instruction data for code using abundant open-source references.

View on arXivView PDF

Code Implementations(1)

ise-uiuc/magicoderCommunity100%
MIT

[ICML'24] Magicoder: Empowering Code Generation with OSS-Instruct

2,096171PythonNov 10, 20231 years agoMIT
ai4codelarge-language-modelsllmllm4code

Similar Papers

Cite this paper

@article{wei2026magicoder,
  title  = {Magicoder: Empowering Code Generation with OSS-Instruct},
  author = {Yuxiang Wei and Zhe Wang and Jiawei Liu and Yifeng Ding and Lingming Zhang},
  year   = {2026},
  eprint = {2312.02120},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2312.02120},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.02120.svg)](https://codeofpaper.com/paper/2312.02120)

Discussion