Results on the MP-DocVQA dataset are reported in Table 2.
Training hyperparameters can be found in Table 8 of Appendix D.
How to use
Inference
How to use this model to perform inference on a sample question and context in PyTorch:
from transformers import LongformerTokenizerFast, LongformerForQuestionAnswering
tokenizer = LongformerTokenizerFast.from_pretrained("rubentito/longformer-base-mpdocvqa")
model = LongformerForQuestionAnswering.from_pretrained("rubentito/longformer-base-mpdocvqa")
text = "Huggingface has democratized NLP. Huge thanks to Huggingface for this."
question = "What has Huggingface done?"
encoding = tokenizer(question, text, return_tensors="pt")
output = model(encoding["input_ids"], attention_mask=encoding["attention_mask"])
start_pos = torch.argmax(output.start_logits, dim=-1).item()
end_pos = torch.argmax(output.end_logits, dim=-1).item()
context_tokens = tokenizer.convert_ids_to_tokens(encoding["input_ids"][0].tolist())
answer_tokens = context_tokens[start_pos: end_pos + 1]
pred_answer = tokenizer.decode(tokenizer.convert_tokens_to_ids(answer_tokens))
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.
longformer-base-mpdocvqa huggingface.co is an AI model on huggingface.co that provides longformer-base-mpdocvqa's model effect (), which can be used instantly with this rubentito longformer-base-mpdocvqa model. huggingface.co supports a free trial of the longformer-base-mpdocvqa model, and also provides paid use of the longformer-base-mpdocvqa. Support call longformer-base-mpdocvqa model through api, including Node.js, Python, http.
longformer-base-mpdocvqa huggingface.co is an online trial and call api platform, which integrates longformer-base-mpdocvqa's modeling effects, including api services, and provides a free online trial of longformer-base-mpdocvqa, you can try longformer-base-mpdocvqa online for free by clicking the link below.
rubentito longformer-base-mpdocvqa online free url in huggingface.co:
longformer-base-mpdocvqa is an open source model from GitHub that offers a free installation service, and any user can find longformer-base-mpdocvqa on GitHub to install. At the same time, huggingface.co provides the effect of longformer-base-mpdocvqa install, users can directly use longformer-base-mpdocvqa installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
longformer-base-mpdocvqa install url in huggingface.co: