cs.CLMar 11, 2026

LLM2Vec-Gen: Generative Embeddings from Large Language Models

Authors: Parishad BehnamGhader, Vaibhav Adlakha, Fabian David Schmidt, Nicolas Chapados, Marius Mosbach, Siva Reddy

Organizations: McGill University · Mila–Quebec AI Institute · ServiceNow Research · Cohere · 

Abstract

Fine-tuning LLM-based text embedders via contrastive learning maps inputs and outputs into a new representational space, discarding the LLM's output semantics. We propose LLM2Vec-Gen, a self-supervised alternative that instead produces embeddings directly in the LLM's output space by learning to represent the model's potential response. Specifically, trainable special tokens are appended to the input and optimized to compress the LLM's own response into a fixed-length embedding, guided by an unsupervised embedding teacher and a reconstruction objective. Crucially, the LLM backbone remains frozen and training requires only unlabeled queries. LLM2Vec-Gen achieves state-of-the-art self-supervised performance on the Massive Text Embedding Benchmark (MTEB), improving by 8.8% over the unsupervised embedding teacher. Since the embeddings preserve the LLM's response-space semantics, they inherit capabilities such as safety alignment (up to 22.6% reduction in harmful content retrieval) and reasoning (up to 35.6% improvement on reasoning-intensive retrieval). Finally, the learned embeddings are also interpretable: they can be decoded back into text to reveal their semantic content. Our code, data, and pretrained models are publicly available at https://github.com/McGill-NLP/llm2vec-gen.

Figures & tables

Appendix figures & tables14 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Your UnEmbedding Matrix is Secretly a Feature Lens for Text Embeddings

    Jun 5, 2026Songhao Wu, Zhongxin Chen, Yuxuan Liu +3Text EmbeddingsText Embedding Models

  2. BitNet Text Embeddings

    Jun 24, 2026Zhen Li, Xin Huang, Liang Wang +8LLM QuantizationEmbedding Compression

  3. Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoders

    May 2, 2026Ailiang Lin, Zhuoyun Li, Keyu Mao +2Text EmbeddingsIn-Context Learning