question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding RAG to text-generation pipeline

See original GitHub issue

🚀 Feature request

Thank you for the awesome work. I am working on https://github.com/deepset-ai/haystack/issues/443 and just wanted to check whether any plan to add RAG into text-generation pipeline.

Motivation

text-generation already have other models, hence it I would be great to have it in there. And this will help keeping our code clean by not adding classes for each type of generators.

model = pipeline('text-generation', model="facebook/rag-token-nq", tokenizer=None, device=-1)
# ValueError: Unrecognized configuration class <class 'transformers.configuration_rag.RagConfig'> for this kind of AutoModel: AutoModelForCausalLM.
Model type should be one of CamembertConfig, XLMRobertaConfig, RobertaConfig, BertConfig, OpenAIGPTConfig, GPT2Config, TransfoXLConfig, XLNetConfig, XLMConfig, CTRLConfig, ReformerConfig, BertGenerationConfig.

Your contribution

If you guide me I am happy to help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
patrickvonplatencommented, Oct 14, 2020

Leave it open - I’ll put it under projects so that I don’t forget it 😃

0reactions
lhoestqcommented, Feb 23, 2021

transformers does include RAG. You can even find the documentation here: https://huggingface.co/transformers/model_doc/rag.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

RAG
We explore a general-purpose fine-tuning recipe for retrieval-augmented generation (RAG) — models which combine pre-trained parametric and non-parametric memory ...
Read more >
Retrieval-Augmented Generation for Knowledge-Intensive ...
RAG models can go beyond simple extractive QA and answer questions with free-form, abstractive text generation. To test RAG's natural language ...
Read more >
Improving the Domain Adaptation of Retrieval Augmented ...
We propose RAG-end2end, an extension to RAG, that can adapt to a domain-specific knowledge base by updating all components of the external ...
Read more >
Retrieval-Augmented Generation for Knowledge ... - YouTube
Patrick Lewis with Facebook AI Research and University College London presented on "Retrieval-Augmented Generation for Knowledge-Intensive ...
Read more >
huggingface/transformers: RAG
It was added to the library in PyTorch with the following checkpoints: facebook/rag-token-nq facebook/rag-sequence-nq ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found