AgentPublic/piaf
Viewer • Updated • 3.84k • 649 • 14
How to use Faradaylab/aria-doc with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "question-answering" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# pip install "transformers<5.0.0"
from transformers import pipeline
pipe = pipeline("question-answering", model="Faradaylab/aria-doc") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("Faradaylab/aria-doc")
model = AutoModelForQuestionAnswering.from_pretrained("Faradaylab/aria-doc", device_map="auto")Aria Doc is a model we created for Documents Q/A. It has been trained on a high quality dataset with over 3000 rows of context,question and answers from Etalab. You can find the dataset used for training here https://huggingface.co/datasets/etalab-ia/piaf . Aria Doc has a great performance in French related Q/A and data extraction in french language.