[论文解读] Nomic Embed: Training a Reproducible Long Context Text Embedder
这份技术报告提出 nomic-embed-text-v1,是一个开源的、支持 8192 令牌上下文的文本嵌入模型,拥有137M参数,在短上下文和长上下文基准测试中超过 OpenAI ada-002 和 text-embedding-3-small,并且提供可完整审计的训练数据、代码和权重。
This technical report describes the training of nomic-embed-text-v1, the first fully reproducible, open-source, open-weights, open-data, 8192 context length English text embedding model that outperforms both OpenAI Ada-002 and OpenAI text-embedding-3-small on the short-context MTEB benchmark and the long context LoCo benchmark. We release the training code and model weights under an Apache 2.0 license. In contrast with other open-source models, we release the full curated training data and code that allows for full replication of nomic-embed-text-v1. You can find code and data to replicate the model at https://github.com/nomic-ai/contrastors.
研究动机与目标
- 展示一个具有可审计数据、权重和代码的完全可重复的长上下文文本嵌入模型。
- 证明 nomic-embed-text-v1 在短上下文和长上下文基准上超过 OpenAI ada-002 和 text-embedding-3-small。
- 提供透明的训练流水线和数据集,以实现端到端的复制和审计。
提出的方法
- 将 BERT-base 架构通过结构性改动(旋转位置嵌入、SwiGLU、Flash Attention)扩展为支持 8192 令牌。
- 使用 BooksCorpus 和 2023 Wikipedia 转储进行掩码语言建模来训练 nomic-bert-2048。
- 在 235M 精选文本对上进行无监督对比预训练,使用 InfoNCE 损失和同批次负样本。
- 在 BEIR 兼容的数据集上使用带困难负样本的监督对比学习进行微调,以用于检索任务。
- 进行带任务前缀和有限数量负样本的最终监督对比微调。
实验结果
研究问题
- RQ1一个完全可审计、开放数据的长上下文嵌入模型是否能在短、长上下文任务上达到甚至超过闭源基线的表现?
- RQ2哪些训练方案和架构选择能够在保持可训练性和可重复性的同时实现有效的长上下文(8192 令牌)嵌入?
- RQ3增加长上下文数据和多阶段对比学习对 MTEB、LoCo、和 Jina 的长上下文基准有何影响?
- RQ4发布数据加载器和整理是否能够实现嵌入模型的端到端复制和审计?
主要发现
- Nomic-embed-text-v1 (137M 参数) 在 8192 上下文长度下,在短上下文和长上下文基准测试(MTEB、LoCo、Jina LC)超越 ada-002 和 text-embedding-3-small。
- ablated 变体 nomic-embed-text-v1-ablated 表现下降,当移除 FEVER/HotpotQA/MEDI 数据时,表明这些数据集的影响。
- 长上下文基准(Jina LC 和 LoCo)显示 nomic-embed-text-v1 在不同序列长度上均胜过 jina-embeddings-v2-base-en,在若干数据集上也优于 ada-002。
- Nomic-bert-2048 在 GLUE 上取得有竞争力的结果,且可与 MosaicBERT 相提并论,展示了具有长上下文适应的强大基础预训练。
- 完整训练栈(权重、代码、数据)以 Apache 2.0 发布,支持端到端复制与审计。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。