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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ukarapol, Trapoom, Lee, Zhicheng, Xin, Amy
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910551787962368
author Ukarapol, Trapoom
Lee, Zhicheng
Xin, Amy
author_facet Ukarapol, Trapoom
Lee, Zhicheng
Xin, Amy
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2408_00690
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving Text Embeddings for Smaller Language Models Using Contrastive Fine-tuning
Ukarapol, Trapoom
Lee, Zhicheng
Xin, Amy
Computation and Language
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.
title Improving Text Embeddings for Smaller Language Models Using Contrastive Fine-tuning
topic Computation and Language
url https://arxiv.org/abs/2408.00690