McGill-NLP/llm2vec
Code for 'LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders' observed · 2026-08-28
Health v2 · maintenance only
49/100
- Activity 75
- Release rhythm 8
- Longevity 63
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 882
- days_rel: 586
- days_push: 151
- n_releases_24m: 1
Adoption not part of the score
1712 stars · 139 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
LLM2Vec is a Python library that converts decoder-only large language models into powerful text encoders via bidirectional attention, masked next token prediction, and unsupervised contrastive learning. It wraps HuggingFace models for sequence encoding and pooling, and ships pretrained checkpoints on HuggingFace.
Use cases
- convert an LLM into a text embedding model
- generate sentence embeddings for semantic search
- build embeddings for RAG retrieval
- fine-tune a decoder-only LLM as a text encoder
- evaluate embeddings on MTEB benchmarks
When to choose
- you want state-of-the-art text embeddings derived from open LLMs
- you need custom embedding models fine-tuned on your domain
- you want bidirectional encoders without training from scratch
When to avoid
- you need a lightweight embedding model for CPU-only deployment
- you only need off-the-shelf embeddings without GPU training
- your stack does not support HuggingFace transformers and flash-attention
Facets
library · maturity active
machine-learning llm-training rag nlp large-language-models machine-learning python text-embeddings sentence-embeddings contrastive-learning huggingface research natural-language-processing retrieval-augmented-generation gpu
3 sources
- readme: https://github.com/McGill-NLP/llm2vec · fetched 2026-08-28 · 4f71585a5e90
- homepage: https://mcgill-nlp.github.io/llm2vec/ · fetched 2026-08-29 · ad183eef78dd
- registry_pypi: https://pypi.org/pypi/llm2vec/json · fetched 2026-08-29 · 1f2071ca9cf9
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| McGill-NLP/llm2vec | main | 49 |
For agents
markdown · JSON · MCP: product_card(name="McGill-NLP/llm2vec")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem