arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2512.21332cs.CLcs.AI
收藏

C2LLM技术报告:通过自适应跨注意力池化实现代码检索的新前沿

C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Pooling

Ant Group(蚂蚁集团);Shanghai Jiao Tong University(上海交通大学)

Jin Qin, Zihan Liao, Ziyin Zhang, Hang Yu, Peng Di, Rui Wang

AI总结:

C2LLM通过自适应跨注意力池化技术,实现更高效的代码检索,其模型在代码嵌入任务中取得新突破。

摘要:

我们提出了C2LLM——对比代码大语言模型,一种在0.5B和7B规模下的代码嵌入模型。基于Qwen-2.5-Coder架构,C2LLM采用多头注意力池化(PMA)模块生成序列嵌入,有效实现了1)利用预训练过程中获得的LLM因果表示,2)从序列中所有标记聚合信息,突破基于EOS的序列嵌入的信息瓶颈,3)支持灵活的嵌入维度调整,作为MRL的替代方案。在三百万公开可用数据上训练,C2LLM模型在MTEB-Code中设立了新纪录,其中C2LLM-7B在总体排行榜上排名第一。

英文摘要:

We present C2LLM - Contrastive Code Large Language Models, a family of code embedding models in both 0.5B and 7B sizes. Building upon Qwen-2.5-Coder backbones, C2LLM adopts a Pooling by Multihead Attention (PMA) module for generating sequence embedding from token embeddings, effectively 1) utilizing the LLM's causal representations acquired during pretraining, while also 2) being able to aggregate information from all tokens in the sequence, breaking the information bottleneck in EOS-based sequence embeddings, and 3) supporting flexible adaptation of embedding dimension, serving as an alternative to MRL. Trained on three million publicly available data, C2LLM models set new records on MTEB-Code among models of similar sizes, with C2LLM-7B ranking 1st on the overall leaderboard.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑