Ajuste de Instrução de Representação Generativa
Generative Representational Instruction Tuning
February 15, 2024
Autores: Niklas Muennighoff, Hongjin Su, Liang Wang, Nan Yang, Furu Wei, Tao Yu, Amanpreet Singh, Douwe Kiela
cs.AI
Resumo
Todos os problemas de linguagem baseados em texto podem ser reduzidos a geração ou incorporação (embedding). Os modelos atuais só se destacam em uma ou outra tarefa. Introduzimos o ajuste de instrução de representação generativa (Generative Representational Instruction Tuning, GRIT), no qual um modelo de linguagem de grande escala é treinado para lidar tanto com tarefas generativas quanto de incorporação, distinguindo-as por meio de instruções. Em comparação com outros modelos abertos, nosso GritLM 7B estabelece um novo estado da arte no Massive Text Embedding Benchmark (MTEB) e supera todos os modelos de tamanho semelhante em uma variedade de tarefas generativas. Ao escalar ainda mais, o GritLM 8x7B supera todos os modelos generativos de linguagem abertos que testamos, mantendo-se entre os melhores modelos de incorporação. Notavelmente, descobrimos que o GRIT iguala o treinamento apenas com dados generativos ou de incorporação, permitindo unificar ambos sem perda de desempenho. Entre outros benefícios, a unificação via GRIT acelera a Geração Aumentada por Recuperação (Retrieval-Augmented Generation, RAG) em mais de 60% para documentos longos, eliminando a necessidade de modelos separados para recuperação e geração. Modelos, código e outros recursos estão disponíveis gratuitamente em https://github.com/ContextualAI/gritlm.
English
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.