跳到正文
原文
通义千问 Qwen:Blog·· 2024-09-19AI 评分51

通义千问发布开源代码模型 Qwen2.5-Coder,提供 1.5B 和 7B 版本

Qwen2.5-Coder: Code More, Learn More!

文章要点
  • 1通义千问发布开源代码模型 Qwen2.5-Coder,含 1.5B 和 7B 版本,32B 版即将推出
  • 2官方称 7B 版在代码评测中超过更大的 DeepSeek-Coder-V2-Lite 和 CodeStral-22B(官方口径)
  • 3模型在 5.5 万亿 token 代码数据上继续训练,支持 128K 上下文、覆盖 92 种编程语言
  • 4指令微调版在 AIME24 得 10.0 分,超过对比模型的 6.7,官方称保留数学与通用能力
决策要点

7B 级开源代码模型在官方评测中超过更大规模的对比模型,企业获取代码能力的门槛和许可成本在下降。

  • 影响:Apache 2.0 许可允许企业把代码模型集成到自有研发流程并私有化部署;官方称 32B 版即将推出并瞄准闭源模型,现阶段基于 7B 的试点结论届时需要复测。
  • 参考:可考虑在代码补全、代码修复等场景用 7B 版做小范围试点,先算出与现有商业工具的效果和成本差;值得提前评估 32B 版发布后的部署资源需求。
  • 依据:性能对比为官方博客自报的评测结果,暂无独立验证;开源许可为 Apache 2.0,32B 版官方仅称即将推出。
正文

GITHUB HUGGING FACE MODELSCOPE DEMO DISCORD

Introduction

In early April, we introduced CodeQwen1.5, which garnered significant attention from the community. Since then, we have been working to enhance the coding model. Today, we are excited to announce the release of the next generation of open-source coding models, Qwen2.5-Coder, and officially rename CodeQwen to Qwen-Coder. We think “Coder” is more human-like and agile, reflecting our vision of it becoming a true coding partner in the future. Qwen2.5-Coder is part of the Qwen2.5 series, available in three model sizes: 1.5B, 7B, and a 32B version (coming soon).

This update focuses on two main improvements: scaling up the code training data and enhancing coding capabilities while maintaining strong performance in other core areas like math and general tasks.

💻 Code More: Qwen2.5-Coder builds on the strong Qwen2.5 and continues training on a larger scale of code data, including source code, text-code grounding data, and synthetic data, totaling 5.5 trillion tokens. This leads to significant improvements in code-related tasks.

📚 Learn More: While enhancing coding abilities, we aimed to retain strengths in math and general capabilities from base model. Therefore, Qwen2.5-Coder incorporates additional data on mathematics and general abilities, providing a comprehensive foundation for real-world applications like Code Agent.

Qwen2.5-Coder: Base Models

Qwen2.5-Coder supports up to 128K tokens of context, covers 92 programming languages, and has achieved remarkable improvements across various code-related evaluation tasks, including code generation, multi-programming code generation, code completion, and code repair. Notably, the open-source 7B version of Qwen2.5-Coder has even outperformed larger models like DeepSeek-Coder-V2-Lite and CodeStral-22B, making it one of the most powerful base code models available. Beyond code tasks, Qwen2.5-Coder also demonstrates competitive math capabilities in evaluations such as GSM8K and Math. For general tasks, evaluations on MMLU and ARC show that Qwen2.5-Coder has retained the general ability performance of Qwen2.5.

Qwen2.5-Coder-Instruct: Instruction-Tuned Models

Building on Qwen2.5-Coder, we fine-tuned it with instruction data, creating Qwen2.5-Coder-Instruct. This instruction-tuned model not only further improves task performance but also demonstrates exceptional generalization across various benchmarks.

Qwen2.5-Coder-Instruct excels in several key areas:

  1. Outstanding Multi-programming Expert: We expanded the multi-language evaluations using McEval, covering more than 40 programming languages. The results show that Qwen2.5-Coder-Instruct performs remarkably well across many languages, including niche ones.
  1. Code Reasoning: We believe code reasoning is closely tied to general reasoning skills. We used CRUXEval as a benchmark, and the results show Qwen2.5-Coder-Instruct excels in code reasoning tasks. Interestingly, as code reasoning improves, the model’s ability to follow complex instructions also gets better, encouraging us to further explore how code can enhance general skills.
  1. Math Reasoning: Math and code are often discussed together: math is the foundation of code, and code is a key tool for math. Qwen2.5-Coder-Instruct shines in both code and math tasks, proven to be a “science student”.
ModelMathGSM8KGaoKao2023enOlympiadBenchCollegeMathAIME24
DeepSeek-Coder-V2-Lite-Instruct61.087.656.126.439.86.7
Qwen2.5-Coder-7B-Instruct66.886.760.529.843.510.0
  1. Basic capabilities: We also assessed the general capabilities, and the results indicate that Qwen2.5-Coder-Instruct maintains the advantages of Qwen2.5 in terms of general abilities.
ModelAMC23MMLU-ProMMLUIFEvalCEvalGPQA
DeepSeek-Coder-V2-Lite-Instruct40.442.560.638.660.127.6
Qwen2.5-Coder-7B-Instruct42.545.668.758.661.435.6

License

Qwen2.5-Coder is released under the Apache 2.0 license. We hope this increased openness will accelerate its application in code intelligence.

What’s Next for Qwen2.5-Coder?

We are preparing the 32B version of Qwen2.5-Coder, aiming to challenge proprietary models. Stay tuned—it’s coming soon! Additionally, we’re exploring powerful code-centric reasoning models to push the boundaries of code intelligence.

Citation

@article{hui2024qwen2,
  title={Qwen2. 5-Coder Technical Report},
  author={Hui, Binyuan and Yang, Jian and Cui, Zeyu and Yang, Jiaxi and Liu, Dayiheng and Zhang, Lei and Liu, Tianyu and Zhang, Jiajun and Yu, Bowen and Dang, Kai and others},
  journal={arXiv preprint arXiv:2409.12186},
  year={2024}
}
@article{yang2024qwen2,
  title={Qwen2 technical report},
  author={Yang, An and Yang, Baosong and Hui, Binyuan and Zheng, Bo and Yu, Bowen and Zhou, Chang and Li, Chengpeng and Li, Chengyuan and Liu, Dayiheng and Huang, Fei and others},
  journal={arXiv preprint arXiv:2407.10671},
  year={2024}
}

来源:通义千问 Qwen:Blog · qwenlm.github.io