Downloads · 30 days
21
0% of all-time downloads
rubentito/t5-base-mpdocvqa
t5-base-mpdocvqa is a machine learning model from rubentito. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as gpl-3.0.
This is pretrained T5 base fine-tuned on Multipage DocVQA (MP-DocVQA) dataset.
Downloads · 30 days
21
0% of all-time downloads
All-time downloads
4.6K
Public
Repo size
3.6 GB
Likes
1
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
This is pretrained T5 base fine-tuned on Multipage DocVQA (MP-DocVQA) dataset.
This model was used as a baseline in Hierarchical multimodal transformers for Multi-Page DocVQA.
Here is how to use this model to get the features of a given text in PyTorch:
import torch
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = LongformerTokenizerFast.from_pretrained("rubentito/t5-base-mpdocvqa")
model = LongformerForQuestionAnswering.from_pretrained("rubentito/t5-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)
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.
Extended experimentation can be found in Table 2 of Hierarchical multimodal transformers for Multi-Page DocVQA. You can also check the live leaderboard at the RRC Portal.
| Model | HF name | Parameters | ANLS | APPA |
|---|---|---|---|---|
| Bert large | rubentito/bert-large-mpdocvqa | 334M | 0.4183 | 51.6177 |
| Longformer base | rubentito/longformer-base-mpdocvqa | 148M | 0.5287 | 71.1696 |
| BigBird ITC base | rubentito/bigbird-base-itc-mpdocvqa | 131M | 0.4929 | 67.5433 |
| LayoutLMv3 base | rubentito/layoutlmv3-base-mpdocvqa | 125M | 0.4538 | 51.9426 |
| T5 base | rubentito/t5-base-mpdocvqa | 223M | 0.5050 | 0.0000 |
| Hi-VT5 | rubentito/hivt5-base-mpdocvqa | 316M | 0.6201 | 79.23 |
@article{tito2022hierarchical,
title={Hierarchical multimodal transformers for Multi-Page DocVQA},
author={Tito, Rub{\`e}n and Karatzas, Dimosthenis and Valveny, Ernest},
journal={arXiv preprint arXiv:2212.05935},
year={2022}
}