EveryDev.ai
Subscribe
Home
Tools

6,925+ AI tools

  • Featured
  • Gems
  • Trending
  • New
  • Rate tools
  • Compare
  • Arena
Categories
  • Agents3677
  • Coding2778
  • Infrastructure1161
  • MCP995
  • Projects964
  • Research791
  • Analytics616
  • Design566
  • Marketing566
  • Testing515
  • Security472
  • Data468
  • Communication349
  • Integration326
  • Prompts318
  • Extensions273
  • Voice240
  • DevOps212
  • Commerce199
  • Web148
  • Learning146
  • Finance44
AI Tools by Topic
  • AI Coding Assistants
  • AI Code Review Tools
  • Agent Frameworks
  • AI Workflow Automation
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • Newsletter
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
  • Newsletter Archive
Get Started
  • Submit a Tool
  • Rate Tools
  • Start a Discussion
  • Write a Blog
  • Share a Build
  • Users
  • About
  • Contact Us
  • Advertise
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Search & AI
  • llms.txt
  • Add to favorites on Google
Theme
Terms of ServicePrivacy Policy
With AI, Everyone is a Dev. EveryDev.ai ©
    1. Home
    2. Tools
    3. LLM2Vec
    LLM2Vec icon

    LLM2Vec

    Retrieval-Augmented Generation
    Featured

    Open-source Python library and recipe for converting decoder-only LLMs into text encoders that produce text embeddings.

    Visit Website

    At a Glance

    Pricing
    Open Source

    LLM2Vec library released under the MIT License; free to use, copy, modify, and distribute.

    Engagement

    Available On

    API
    SDK
    CLI

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    Retrieval-Augmented GenerationAI Development LibrariesModel Management

    Alternatives

    AugmentoolkitMarkstreamTOON
    Developer
    McGill NLPMontreal, Canada

    Listed Oct 2026

    About LLM2Vec

    LLM2Vec is an open-source project from McGill NLP that turns decoder-only large language models into text encoders. It ships as a Python package (llm2vec) with training scripts, evaluation tooling, and a collection of pretrained model checkpoints on Hugging Face. The latest listed release is version 0.2.3.

    What It Is

    LLM2Vec is a three-step recipe: enable bidirectional attention, train with masked next token prediction (MNTP), and apply unsupervised contrastive learning (SimCSE). The resulting models can be fine-tuned further with supervised contrastive training. The LLM2Vec class wraps Hugging Face models to handle bidirectionality, sequence encoding, and pooling.

    How the Workflow Runs

    Users load a base model plus an optional PEFT/LoRA adapter through from_pretrained, then call encode on text or on [instruction, text] pairs to get embeddings. Mean pooling is the default and can be changed, and the maximum sequence length defaults to 512. Embeddings can be compared with cosine similarity for retrieval, classification, clustering, and sentence similarity tasks, with examples in the repository.

    Training and Evaluation

    The repository includes scripts for MNTP training, SimCSE training on Wikipedia sentences, supervised contrastive training on public E5 data, and word-level tasks such as POS, NER, and chunking. Configuration files cover Meta-Llama-3-8B, Mistral-7B, Llama-2-7B, and Sheared-Llama-1.3B. MTEB evaluation is supported through an evaluation script and per-task instructions.

    Recent Updates

    The README notes support for newer transformers versions covering Llama 3.1 and 3.2, plus Gemma and Qwen-2 models. It also announces LLM2Vec-Gen, a separate recipe for generative embeddings that encode a potential answer to a query.

    LLM2Vec - 1

    Collections

    Popular collections

    • See What Your Agent Is Doing remix

      Collection by @joemseifi

      Remix
    • Local-First Databases

      Collection by @joemseifi

      Remix
    • Charts, Graphs, and Diagrams

      Collection by @joemseifi

      Remix
    • Pick Up Where Your Agent Left Off

      Collection by @caiovalverde

      Remix

    Add LLM2Vec to one of your collections.

    View all collections

    Community Discussions

    Be the first to start a conversation about LLM2Vec

    Share your experience with LLM2Vec, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source (MIT)

    LLM2Vec library released under the MIT License; free to use, copy, modify, and distribute.

    • MIT License
    • Install via pip install llm2vec
    • Python library wrapping HuggingFace decoder-only models for text encoding
    • Self-hosted; base model/compute costs are external

    Capabilities

    Key Features

    • Converts decoder-only LLMs into text encoders
    • Bidirectional attention enabling
    • Masked next token prediction (MNTP) training
    • Unsupervised contrastive learning with SimCSE
    • Supervised contrastive training
    • Instruction-aware text encoding
    • Configurable pooling mode and max sequence length
    • Word-level task training (POS, NER, chunking)
    • MTEB benchmark evaluation script
    • Pretrained checkpoints for Llama-3, Mistral, Llama-2, Sheared-Llama

    Integrations

    Hugging Face Transformers
    PEFT/LoRA
    Hugging Face Hub
    MTEB
    PyPI
    Flash Attention
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate LLM2Vec and help others make informed decisions.

    Rate other tools you’ve used

    Developer

    McGill NLP

    McGill NLP is a research group within McGill University and Mila focusing on various topics in natural language processing. It is made up of faculty members, researchers and students based in Montreal, Canada. The group publishes code for its models and datasets on GitHub so others can reproduce and build on its work.

    Montreal, Canada
    Read more about McGill NLP
    WebsiteGitHubX / Twitter
    1 tool in directory

    Similar Tools

    Augmentoolkit icon

    Augmentoolkit

    Open-source toolkit that turns your documents into datasets and trains custom domain-expert LLMs.

    Markstream icon

    Markstream

    Multi-framework streaming Markdown renderer for AI chat apps, supporting Vue, React, Svelte, Angular, Nuxt, and Next.js with Mermaid, KaTeX, and stream-diffs code blocks.

    TOON icon

    TOON

    TOON (Token-Oriented Object Notation) is a compact, human-readable encoding of the JSON data model for LLM prompts, with a TypeScript SDK and CLI.

    Browse all tools

    Related Topics

    Retrieval-Augmented Generation

    RAG Systems that enhance LLM outputs by retrieving relevant information from external knowledge bases, combining the power of generative AI with information retrieval for more accurate and contextual responses.

    227 tools

    AI Development Libraries

    Programming libraries and frameworks that provide machine learning capabilities, model integration, and AI functionality for developers.

    610 tools

    Model Management

    Tools for managing, versioning, and deploying AI models.

    155 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions
    21views