Abstract
All text-based language problems can be reduced to either generation or embedding. Current models only perform well at one or the other. We introduce generative representational instruction tuning (GRIT) whereby a large language model is trained to handle both generative and embedding tasks by distinguishing between them through instructions. Compared to other open models, our resulting GritLM 7B sets a new state of the art on the Massive Text Embedding Benchmark (MTEB) and outperforms all models up to its size on a range of generative tasks. By scaling up further, GritLM 8x7B outperforms all open generative language models that we tried while still being among the best embedding models. Notably, we find that GRIT matches training on only generative or embedding data, thus we can unify both at no performance loss. Among other benefits, the unification via GRIT speeds up Retrieval-Augmented Generation (RAG) by > 60% for long documents, by no longer requiring separate retrieval and generation models. Models, code, etc. are freely available at https://github.com/ContextualAI/gritlm.
Community
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Aya Model: An Instruction Finetuned Open-Access Multilingual Language Model (2024)
- Scaling Sparse Fine-Tuning to Large Language Models (2024)
- Towards a Unified Language Model for Knowledge-Intensive Tasks Utilizing External Corpus (2024)
- TinyGPT-V: Efficient Multimodal Large Language Model via Small Backbones (2023)
- Pretrained Generative Language Models as General Learning Frameworks for Sequence-Based Tasks (2024)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Awesome work!! Really cool idea, I love the paper, really well done.
Solid Work !
Revolutionizing NLP: Meet GRIT - The Unified Model for Text Generation and Embedding
Links 🔗:
👉 Subscribe: https://www.youtube.com/@Arxflix
👉 Twitter: https://x.com/arxflix
👉 LMNT (Partner): https://lmnt.com/