大型语言模型(LLMs)近期在文本嵌入任务中展现出卓越性能。以往工作通常使用LoRA微调现有LLM,这受限于LLM与嵌入模型之间的数据和训练差异。在本研究中,我们提出Conan-embedding-v2,一个从零训练并微调为文本嵌入器的全新1.4B参数LLM。首先,我们在LLM预训练中加入新闻数据和多语言对以弥合数据差异。基于此,我们提出跨语言检索数据集,使LLM能更好整合不同语言的嵌入。其次,LLM使用因果掩码与token级损失,而嵌入模型使用双向掩码与句子级损失。该训练差异使全量微调效果不如LoRA。我们引入软掩码机制以在两种掩码间平滑过渡,使模型学习更全面的表示。基于此,我们提出动态困难负样本挖掘方法,在训练全程让模型接触更困难的负样本。直观且有效的是,仅凭约1.4B参数,Conan-embedding-v2在Massive Text Embedding Benchmark (MTEB)和Chinese MTEB(2025年5月19日)上均达到SOTA性能。
英文摘要:
Large language models (LLMs) have recently demonstrated excellent performance in text embedding tasks. Previous work usually use LoRA to fine-tune existing LLMs, which are limited by the data and training gap between LLMs and embedding models. In this work, we introduce Conan-embedding-v2, a new 1.4B-parameter LLM trained from scratch and fine-tuned as a text embedder. First, we add news data and multilingual pairs for LLM pretraining to bridge the data gap. Based on this, we propose a cross-lingual retrieval dataset that enables the LLM to better integrate embeddings across different languages. Second, whereas LLMs use a causal mask with token-level loss, embedding models use a bidirectional mask with sentence-level loss. This training gap makes full fine-tuning less effective than LoRA. We introduce a soft-masking mechanism to gradually transition between these two types of masks, enabling the model to learn more comprehensive representations. Based on this, we propose a dynamic hard negative mining method that exposes the model to more difficult negative examples throughout the training process. Being intuitive and effective, with only approximately 1.4B parameters, Conan-embedding-v2 achieves SOTA performance on both the Massive Text Embedding Benchmark (MTEB) and Chinese MTEB (May 19, 2025).
PromptEmbedder: Efficient and Transferable Text Embedding via Dual-LLM Soft Prompting
Department of Computer Science and Information Engineering, National Taiwan University(国立台湾大学计算机科学与资讯工程系);National Taiwan University AI Center of Research Excellence(国立台湾大学人工智能研究中心)
Learning structures of the French clinical language:development and validation of word embedding models using 21 million clinical reports from electronic health records
Assistance Publique – Hôpitaux de Paris(巴黎公共援助医院);Sorbonne Université(索邦大学);Inserm(法国国家健康与医学研究院);Université Sorbonne Paris Nord(索邦巴黎北大学);Centre de Recherche des Cordeliers(科德利埃研究中心);INRIA(法国国家信息与自动化研究所)
NYU Center for Data Science(纽约大学数据科学中心);School of Computer Science, Tel Aviv University(特拉维夫大学计算机科学学院);Google Research(谷歌研究);Bar-Ilan University(巴伊兰大学);Google DeepMind(谷歌DeepMind)
Chronicle: A Multimodal Foundation Model for Joint Language and Time Series Understanding
InertialAI;Department of Electrical and Computer Engineering, Queen’s University(皇后大学电气与计算机工程系);Department of Mechanical and Materials Engineering, Queen’s University(皇后大学机械与材料工程系)
Chemical Language Model Linker: blending text and molecules with modular adapters
Department of Computer Sciences, University of Wisconsin-Madison(威斯康星大学麦迪逊分校计算机科学系);Drug Development Core, Small Molecule Screening Facility, University of Wisconsin Carbone Cancer Center, University of Wisconsin-Madison(威斯康星大学卡本纳癌症中心药物开发核心、小分子筛选设施);Department of Biostatistics and Medical Informatics, University of Wisconsin-Madison(威斯康星大学麦迪逊分校生物统计学与医学信息学系)
NLP Ghana(加纳自然语言处理组织);Algorine;Leuphana University Luneburg(吕讷堡洛伊法纳大学);University of Cape Coast(海岸角大学);Edinburgh Napier University(爱丁堡龙比亚大学);Accra Institute of Technology(阿克拉理工学院);Tulane University(杜兰大学);University of Tromso(特罗姆瑟大学);AiMlCamp;University of Strathclyde(斯特拉斯克莱德大学);Azubi Africa;Ulster University(阿尔斯特大学);Centre for Research, Data Science and IT Solutions(研究、数据科学与IT解决方案中心);University of Energy and Natural Resources(能源与自然资源大学);Integrated Geospatial Intelligence Application Centre(综合地理空间情报应用中心);SRH Berlin University of Applied Science(SRH柏林应用科学大学)
German Research Center for Artificial Intelligence(德国人工智能研究中心);Technical University of Darmstadt(达姆施塔特工业大学);TU Dortmund University(多特蒙德工业大学);Center for Trustworthy Data Science and Security, University Alliance Ruhr(鲁尔大学联盟可信数据科学与安全中心);Hessian Center for AI (hessian.AI)(黑森州人工智能中心);Centre for Cognitive Science TU Darmstadt(达姆施塔特工业大学认知科学中心)