McGill-NLP / sentence-similarity Open weights updated 11 months ago

LLM2Vec-Meta-Llama-3-8B-Instruct-mntp

> LLM2Vec is a simple recipe to convert decoder-only LLMs into text encoders. It consists of 3 simple steps: 1) enabling bidirectional attention, 2) masked next token prediction, and 3) unsupervised contrastive learning. The model can be further fine-tuned to achieve state-of-the-art performance. - Repository: https://github.com/McGill-NLP/llm2vec - Paper: https://arxiv.org/abs/2404.05961

Params
8.0 B
Context
8,192
Downloads 30d
396 K
Likes
23
Commercial use: allowed mit Not gated SAFETENSORS 1 languages View on Hugging Face ↗

Download history

tracking started — chart appears after 7 days of snapshots (3 recorded)
396 K downloads in the last 30 days

Can you run it?

Estimated VRAM at 8K context unless noted. Pick your hardware to see the verdict per quantization.

FileQuantSizeEst. VRAMVerdict on RTX 4090 · 24 GB
model.safetensors fp16 0.2 GB 1.9 GB ✅ Runs comfortably
Estimate: file size × 1.1 + KV cache at 8K + 0.5 GB overhead. Not a benchmark — how we calculate this.

Specifications

Architecture
LlamaEncoderModel
Parameters
8.0 B
Context length
8,192
Vocabulary
128,256
Layers / heads
32 / 32
Licence
mit
First seen on the Hub
2024-04-30
Training datasets
undisclosed
Added to our catalog
2026-11-08
Compare with any sentence-similarity model