Run this model with HF Jobs
Run AgentPublic/chatrag-deberta 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/AgentPublic/chatrag-deberta. 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/AgentPublic/chatrag-deberta 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 AgentPublic/chatrag-deberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AgentPublic/chatrag-deberta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AgentPublic/chatrag-deberta")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("AgentPublic/chatrag-deberta") model = AutoModelForSequenceClassification.from_pretrained("AgentPublic/chatrag-deberta", device_map="auto") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Chatrag-Deberta is a small lightweight LLM to predict whether a question should retrieve additional information with RAG or not.
Chatrag-Deberta is based on Deberta-v3-large, a 304M encoder-decoder. Its initial version was fine-tuned on 20,000 examples of questions annotated by Mistral 7B.
Use
A typical example of inference with Chatrag-Deberta is provided in the Google Colab demo or with inference_chatrag.py
For every submitted text, Chatrag-Deberta will output a range of probabilities to require RAG or not.
This makes it possible to adjust a threshold of activation depending on whether more or less RAG is desirable in the system.
| Query | Prob | Result |
|---|---|---|
| Comment puis-je renouveler un passeport ? | 0.988455 | RAG |
| Combien font deux et deux ? | 0.041475 | No-RAG |
| Écris un début de lettre de recommandation pour la Dinum | 0.103086 | No-RAG |
- Downloads last month
- 6