C2LLM 기술 보고서: 적응형 크로스-어텐션 풀링을 통한 코드 검색의 새로운 지평
C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Pooling
December 24, 2025
저자: Jin Qin, Zihan Liao, Ziyin Zhang, Hang Yu, Peng Di, Rui Wang
cs.AI
초록
C2LLM(Contrastive Code Large Language Models)은 0.5B와 7B 규모의 코드 임베딩 모델 패밀리입니다. Qwen-2.5-Coder 백본을 기반으로 하는 C2LLM은 토큰 임베딩에서 시퀀스 임베딩을 생성하기 위해 Pooling by Multihead Attention(PMA) 모듈을 채택했습니다. 이는 1) 사전 학습 동안 획득한 LLM의 인과적 표현을 효과적으로 활용하면서, 2) 시퀀스 내 모든 토큰의 정보를 집계할 수 있어 EOS 기반 시퀀스 임베딩의 정보 병목 현상을 극복하고, 3) MRL의 대안으로서 임베딩 차원의 유연한 조정을 지원합니다. 공개된 3백만 개의 데이터로 학습된 C2LLM 모델들은 유사한 규모의 모델들 중 MTEB-Code에서 새로운 기록을 세웠으며, C2LLM-7B는 전체 리더보드에서 1위를 차지했습니다.
English
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.