theatticusproject/cuad-qa
Updated • 4.06k • 69
How to use akdeniz27/deberta-v2-xlarge-cuad 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="akdeniz27/deberta-v2-xlarge-cuad") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/deberta-v2-xlarge-cuad")
model = AutoModelForQuestionAnswering.from_pretrained("akdeniz27/deberta-v2-xlarge-cuad", device_map="auto")This model is the fine-tuned version of "DeBERTa v2 XLarge" using CUAD dataset https://huggingface.co/datasets/cuad
Link for model checkpoint: https://github.com/TheAtticusProject/cuad
For the use of the model with CUAD: https://github.com/marshmellow77/cuad-demo and https://huggingface.co/spaces/akdeniz27/contract-understanding-atticus-dataset-demo