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:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Leave it open - I’ll put it under projects so that I don’t forget it 😃
transformers does include RAG. You can even find the documentation here: https://huggingface.co/transformers/model_doc/rag.html