텍스트 임베더를 위한 퓨-샷 학습자들
Making Text Embedders Few-Shot Learners
September 24, 2024
저자: Chaofan Li, MingHao Qin, Shitao Xiao, Jianlyu Chen, Kun Luo, Yingxia Shao, Defu Lian, Zheng Liu
cs.AI
초록
디코더 전용 아키텍처를 가진 대형 언어 모델(Large language models, LLMs)은 맥락 내 학습(in-context learning, ICL) 능력을 높은 수준으로 보여줍니다. 이 기능은 입력 맥락 내 제공된 예시를 활용하여 익숙한 작업과 새로운 작업을 효과적으로 처리할 수 있게 합니다. 이 능력의 잠재력을 인식하여, 우리는 LLMs의 ICL 기능을 활용하여 텍스트 임베딩 생성 과정을 개선하기를 제안합니다. 이를 위해, 우리는 고품질 텍스트 임베딩을 생성하기 위해 소수의 예시를 활용하는 새로운 모델 bge-en-icl을 소개합니다. 우리의 접근 방식은 작업 관련 예시를 쿼리 측면에 직접 통합하여 다양한 작업에서 상당한 개선을 이끌어 냅니다. 게다가, 우리는 LLMs를 임베딩 모델로 효과적으로 활용하는 방법에 대해 연구했습니다. 이 과정에는 다양한 어텐션 메커니즘, 풀링 방법 등이 포함됩니다. 우리의 연구 결과는 원본 프레임워크를 유지하는 것이 종종 최상의 결과를 가져오며, 간단함이 최고임을 강조합니다. MTEB 및 AIR-Bench 벤치마크에서의 실험 결과는 우리의 접근 방식이 최신 기술(SOTA) 성능을 세우는 것을 보여줍니다. 우리의 모델, 코드 및 데이터셋은 https://github.com/FlagOpen/FlagEmbedding 에서 무료로 제공됩니다.
English
Large language models (LLMs) with decoder-only architectures demonstrate
remarkable in-context learning (ICL) capabilities. This feature enables them to
effectively handle both familiar and novel tasks by utilizing examples provided
within their input context. Recognizing the potential of this capability, we
propose leveraging the ICL feature in LLMs to enhance the process of text
embedding generation. To this end, we introduce a novel model bge-en-icl, which
employs few-shot examples to produce high-quality text embeddings. Our approach
integrates task-related examples directly into the query side, resulting in
significant improvements across various tasks. Additionally, we have
investigated how to effectively utilize LLMs as embedding models, including
various attention mechanisms, pooling methods, etc. Our findings suggest that
retaining the original framework often yields the best results, underscoring
that simplicity is best. Experimental results on the MTEB and AIR-Bench
benchmarks demonstrate that our approach sets new state-of-the-art (SOTA)
performance. Our model, code and dataset are freely available at
https://github.com/FlagOpen/FlagEmbedding .Summary
AI-Generated Summary