cleanUrl: "/e5-mistral"
floatFirstTOC: right
title: "LLM 기반 최고성능 Text Embedding | AI Lab"
description: "GPT-4로 학습데이터를 생성하고 Mistral-7B를 튜닝하여 MTEB 최고 성능을 달성한 Text Embedding 연구를 소개합니다."
(이미지출처) Microsoft Designer - Stunning designs in a flash 를 사용하여 자동 생성 후 편집
Data Generation
모델
Backbone : Mistral-7b
LoRA with rank=16, DeepSpeed ZeRO-3
seq_length=512, batch_size=2048, LR=10^-4, linear decay, weight decay=0.1
Query에 task instruction 을 합친 형태를 입력으로 사용함
Query와 document 입력 맨 뒤에 [EOS] token을 삽입한 후 이 토큰에 대한 embedding을 각각의 embedding vector($\mathbf{e}_q, \mathbf{e}_d$)로 사용.
입력 query와 positive document가 유사한 embedding이 되도록 InfoNCE loss로 학습. 여기서 $\mathbb{N}$은 in-batch negative 및 hard negative 모두 포함한 집합
$$ \min \mathbb{L}=-\log\frac{\phi(q_{inst}^{+},d^+)}{\phi(q_{inst}^{+},d^+)+\sum_{n_i\in\mathbb{N}}\phi(q_{inst}^{+},n_i)}\\ \phi(q,d)=\exp(\frac{1}{\tau}\cos(\mathbf{e}_q,\mathbf{e}_d)) $$
생성 데이터 유형 및 언어 종류