TensorX
返回文献探索

Paper · arXiv 2408.00690

Improving Text Embeddings for Smaller Language Models Using Contrastive Fine-tuning

Trapoom Ukarapol, Zhicheng Lee, Amy Xin

24 upvotesAugust 1, 2024arXiv 预印本
AI 摘要

Contrastive fine-tuning improves text embeddings and performance in smaller language models across various benchmarks.

Large Language ModelsMiniCPMPhi-2Gemmacontrastive fine-tuningNLI dataset

Abstract

While Large Language Models show remarkable performance in natural language understanding, their resource-intensive nature makes them less accessible. In contrast, smaller language models such as MiniCPM offer more sustainable scalability, but often underperform without specialized optimization. In this paper, we explore the enhancement of smaller language models through the improvement of their text embeddings. We select three language models, MiniCPM, Phi-2, and Gemma, to conduct contrastive fine-tuning on the NLI dataset. Our results demonstrate that this fine-tuning method enhances the quality of text embeddings for all three models across various benchmarks, with MiniCPM showing the most significant improvements of an average 56.33\% performance gain. The contrastive fine-tuning code is publicly available at https://github.com/trapoom555/Language-Model-STS-CFT.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Improving Text Embeddings for Smaller Language Models Using Contrastive Fine-tuning | TensorX