Instructions to use facebook/rag-token-nq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/rag-token-nq with Transformers:
# Load model directly from transformers import AutoTokenizer, RagTokenForGeneration tokenizer = AutoTokenizer.from_pretrained("facebook/rag-token-nq") model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq") - Notebooks
- Google Colab
- Kaggle
environment error in "requires_backends(self, ["datasets", "faiss"])"
#1
by zhaoyuhitsz - opened
I have installed faiss and datasets package, and it can be successfully used in other projects.
But it still informed me to install datasets and faiss.
When I removed this line in the "from_pretrained" function in "transformers.models.rag.rag_retriever", it works !
my env:
transformers 4.14.1
faiss-gpu 1.7.1.post3
datasets 1.18.4
You need to install faiss-cpu
How did u installed dataset and faiss package locally? can you refer any blogs or videos?
Tq in Adv!
code??????