Run this model with HF Jobs
Run facebook/rag-token-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/facebook/rag-token-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/facebook/rag-token-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use facebook/rag-token-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/rag-token-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, RagTokenForGeneration tokenizer = AutoTokenizer.from_pretrained("facebook/rag-token-base") model = RagTokenForGeneration.from_pretrained("facebook/rag-token-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files1 unmodified line234567891011121314151617181984 unmodified lines10410510610710810911011111211311411511611711811912058 unmodified lines1791801811821831841851861871 unmodified line"architectures": ["RagTokenForGeneration"],"bad_words_ids": [[0,0]],"dataset": "wiki_dpr","dataset_split": "train","decoder_start_token_id": 2,"doc_sep": " // ","early_stopping": false,"eos_token_id": 2,"generator": {"_num_labels": 3,"activation_dropout": 0.0,84 unmodified lines"vocab_size": 50265,"xla_device": null},"index_name": "compressed","index_path": null,"is_encoder_decoder": true,"max_combined_length": 300,"max_length": 50,"min_length": 1,"model_type": "rag","n_docs": 5,"num_beams": 4,"num_return_sequences": 1,"pad_token_id": 1,"passages_path": null,"question_encoder": {"add_cross_attention": false,58 unmodified lines"vocab_size": 30522,"xla_device": null},"retrieval_batch_size": 8,"retrieval_vector_size": 768,"title_sep": " / ","use_dummy_dataset": false,"vocab_size": null}1 unmodified line234567891011121384 unmodified lines989910010110210310410510610710810911011158 unmodified lines1701711721731741751761771781791 unmodified line"architectures": ["RagTokenForGeneration"],"dataset": "wiki_dpr","dataset_split": "train","do_deduplication": true,"do_marginalize": false,"doc_sep": " // ","exclude_bos_score": false,"generator": {"_num_labels": 3,"activation_dropout": 0.0,84 unmodified lines"vocab_size": 50265,"xla_device": null},"index_name": "exact","index_path": null,"is_encoder_decoder": true,"label_smoothing": 0.0,"max_combined_length": 300,"model_type": "rag","n_docs": 5,"output_retrieved": false,"passages_path": null,"question_encoder": {"add_cross_attention": false,58 unmodified lines"vocab_size": 30522,"xla_device": null},"reduce_loss": false,"retrieval_batch_size": 8,"retrieval_vector_size": 768,"title_sep": " / ","use_dummy_dataset": true,"vocab_size": null}
config.json+9-17