LongT5 base with transient-global attention fine-tuned on MP-DocVQA
This is LongT5 trained on SQuADv2, CoQA and TryoCoQA datasets from
Tryolabs hub
, and fine-tuned on Multipage DocVQA (MP-DocVQA) dataset.
How to use
Here is how to use this model to get the features of a given text in PyTorch:
import torch
from transformers import AutoTokenizer, LongT5ForConditionalGeneration
tokenizer = AutoTokenizer.from_pretrained("rubentito/longt5-tglobal-base-mpdocvqa")
model = LongT5ForConditionalGeneration.from_pretrained("rubentito/longt5-tglobal-base-mpdocvqa")
context = "Huggingface has democratized NLP. Huge thanks to Huggingface for this."
question = "What has Huggingface done?"
input_text = "question: {:s} context: {:s}".format(question, context)
encoding = tokenizer(input_text, return_tensors="pt")
output = self.model.generate(**encoding)
answer = tokenizer.decode(output['sequences'], skip_special_tokens=True)
Metrics
Average Normalized Levenshtein Similarity (ANLS)
The standard metric for text-based VQA tasks (ST-VQA and DocVQA). It evaluates the method's reasoning capabilities while smoothly penalizes OCR recognition errors.
Check
Scene Text Visual Question Answering
for detailed information.
Answer Page Prediction Accuracy (APPA)
In the MP-DocVQA task, the models can provide the index of the page where the information required to answer the question is located. For this subtask accuracy is used to evaluate the predictions: i.e. if the predicted page is correct or not.
Check
Hierarchical multimodal transformers for Multi-Page DocVQA
for detailed information.
longt5-tglobal-base-mpdocvqa huggingface.co is an AI model on huggingface.co that provides longt5-tglobal-base-mpdocvqa's model effect (), which can be used instantly with this rubentito longt5-tglobal-base-mpdocvqa model. huggingface.co supports a free trial of the longt5-tglobal-base-mpdocvqa model, and also provides paid use of the longt5-tglobal-base-mpdocvqa. Support call longt5-tglobal-base-mpdocvqa model through api, including Node.js, Python, http.
longt5-tglobal-base-mpdocvqa huggingface.co is an online trial and call api platform, which integrates longt5-tglobal-base-mpdocvqa's modeling effects, including api services, and provides a free online trial of longt5-tglobal-base-mpdocvqa, you can try longt5-tglobal-base-mpdocvqa online for free by clicking the link below.
rubentito longt5-tglobal-base-mpdocvqa online free url in huggingface.co:
longt5-tglobal-base-mpdocvqa is an open source model from GitHub that offers a free installation service, and any user can find longt5-tglobal-base-mpdocvqa on GitHub to install. At the same time, huggingface.co provides the effect of longt5-tglobal-base-mpdocvqa install, users can directly use longt5-tglobal-base-mpdocvqa installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
longt5-tglobal-base-mpdocvqa install url in huggingface.co: