We present new benchmarks on evaluation code generation models: MBXP and Multilingual HumanEval, and MathQA-X. These datasets cover over 10 programming languages and are generated using a scalable conversion framework that transpiles prompts and test cases from the original Python datasets into the corresponding data in the target language. Using these benchmarks, we are able to assess the performance of code generation models in a multi-lingual fashion, and discovered generalization ability of language models on out-of-domain languages, advantages of multi-lingual models over mono-lingual, the ability of few-shot prompting to teach the model new languages, and zero-shot translation abilities even on mono-lingual settings. Furthermore, we use our code generation model to perform large-scale bootstrapping to obtain synthetic canonical solutions in several languages, which can be used for other code-related evaluations such as code insertion, robustness, or summarization tasks. Overall, our benchmarks represents a significant step towards a deeper understanding of language models' code generation abilities. We publicly release our code and datasets at https://github.com/amazon-research/mxeval.
翻译:我们提出了新的编码生成模型评估基准:MBXP、Multilingual HumanEval 和 MathQA-X。这些数据集覆盖了 10 多种编程语言,并使用可扩展的转换框架从原始 Python 数据集中将提示和测试用例转译为目标语言中的相应数据。使用这些基准,我们能够在多语言环境中评估编码生成模型的性能,并发现语言模型在超出领域语言上的泛化能力,多语言模型相对于单语言模型的优势,少量提示教授模型新语言的能力,以及连在单语言情况下的零-shot 翻译能力。此外,我们使用编码生成模型进行大规模引导,以在多种语言中获得合成的规范解,这些解可用于其他与代码相关的评估,如代码插入、鲁棒性或摘要任务。总体而言,我们的基准是更深入了解语言模型编码生成能力的一个重要步骤。我们在 https://github.com/amazon-research/mxeval 公开发布了我们的代码和数据集。