#166 · Primary category: Knowledge Base & RAG

gritlm

embedding embedding-models embeddings grit information-retrieval instruction-tuning llm llms mteb retrieval sbert sgpt text-embedding

Generative Representational Instruction Tuning

Project last updated:06/25/25

GitHub Stars

699

Forks

49

Contributors

7

License

MIT

Why we included this project

GRIT is the reference implementation of a method that trains one LLM to do two jobs at once: produce text embeddings and generate responses from the same weights. The repo installs as a pip package, `gritlm`, whose `GritLM` class loads the 7B or 8x7B models for embedding, generation, or both, and it includes the training data, alignment recipes, and evaluation scripts from the paper. Because the same model handles both tasks, you can cache computations and roughly halve the forward passes in a RAG loop, which pays off when you serve long documents. Teams running separate embedding and generation models get a simpler serving setup, and anyone who wants to reproduce or extend the MTEB results has the full training pipeline rather than a bare checkpoint.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category