rag-token-base

Maintained By
facebook

RAG-Token Base Model

PropertyValue
LicenseApache 2.0
PaperResearch Paper
FrameworkPyTorch, Transformers
Datasetwiki_dpr

What is rag-token-base?

RAG-Token Base is a non-finetuned implementation of the Retrieval-Augmented Generation (RAG) architecture, designed for knowledge-intensive NLP tasks. It combines three key components: a question encoder, a retriever, and a generator, built upon the DPR and BART architectures.

Implementation Details

The model architecture consists of a DPR question encoder (facebook/dpr-question_encoder-single-nq-base) combined with a BART-large generator. It uses an uncased tokenization approach and includes a configurable retriever that can operate in both dummy and full modes.

  • Modular architecture with separate question encoder and generator components
  • Configurable retriever with support for both dummy and legacy indices
  • Built on established transformer architectures (DPR and BART)
  • Uncased tokenization for improved consistency

Core Capabilities

  • Knowledge-intensive natural language processing
  • Question encoding and answer generation
  • Retrieval-augmented text generation
  • Support for fine-tuning on custom datasets

Frequently Asked Questions

Q: What makes this model unique?

The model's unique strength lies in its combination of retrieval and generation capabilities, allowing it to access and utilize external knowledge for improved text generation. It's particularly valuable for tasks requiring factual accuracy and knowledge integration.

Q: What are the recommended use cases?

The model is well-suited for knowledge-intensive tasks such as question answering, fact-based generation, and document summarization. For optimal performance, it's recommended to use the full retriever by setting config.index_name="legacy" and config.use_dummy_dataset=False.

🍰 Interesting in building your own agents?
PromptLayer provides Huggingface integration tools to manage and monitor prompts with your whole team. Get started here.