CodeCSE:面向代码与注释句子嵌入的简单多语言模型
软件工程
2024-07-10 v1
摘要
当前文献中缺乏针对函数嵌入的即插即用模型。本文提出 CodeCSE,一种基于对比学习的模型,能在同一空间中学习函数及其描述的嵌入表示。我们采用代码搜索任务对 CodeCSE 进行评估。实验表明,CodeCSE 的多语言零样本方法在效率上与从 GraphCodeBERT 微调至特定语言的模型相当。CodeCSE 开源于 https://github.com/emu-se/codecse,预训练模型已发布在 HuggingFace 公共仓库:https://huggingface.co/sjiang1/codecse。
引用
@article{arxiv.2407.06360,
title = {CodeCSE: A Simple Multilingual Model for Code and Comment Sentence Embeddings},
author = {Anthony Varkey and Siyuan Jiang and Weijing Huang},
journal= {arXiv preprint arXiv:2407.06360},
year = {2024}
}