SAVRN
Search Contact SAVRN

Open-weight model · Question answering

roberta-base-on-cuad

by Mohammed Rakib Rakib/roberta-base-on-cuad

This model can be used for the task of Question Answering on Legal Documents. Read: An Open Source Contractual Language Understanding Application Using Machine Learning for detailed information on training procedure, dataset preprocessing and evaluation.

Parameters
Context514
Weights496.3 MB
Licensemit
AccessOpen weights
Monthly Downloads6.3k

Model Card

By Mohammed Rakib, published under mit, revision c0171973e286.

This model can be used for the task of Question Answering on Legal Documents. Read: An Open Source Contractual Language Understanding Application Using Machine Learning for detailed information on training procedure, dataset preprocessing and evaluation. See CUAD dataset card for more information. See CUAD dataset card for more information. Used V100/P100 from Google Colab Pro Python, Transformers Mohammed Rakib in collaboration with Ezi Ozoani and the Hugging Face team Use the code below to get started with the model.

Read Mohammed Rakib's full model card

Model Card for roberta-base-on-cuad

Model Details

Model Description

Uses

Direct Use

This model can be used for the task of Question Answering on Legal Documents.

Training Details

Read: An Open Source Contractual Language Understanding Application Using Machine Learning for detailed information on training procedure, dataset preprocessing and evaluation.

Training Data

See CUAD dataset card for more information.

Training Procedure

Preprocessing

More information needed

Speeds, Sizes, Times

More information needed

Evaluation

Testing Data, Factors & Metrics

Testing Data

See CUAD dataset card for more information.

Factors

Metrics

More information needed

Results

More information needed

Model Examination

More information needed

  • Hardware Type: More information needed
  • Hours used: More information needed
  • Cloud Provider: More information needed
  • Compute Region: More information needed
  • Carbon Emitted: More information needed

Technical Specifications [optional]

Model Architecture and Objective

More information needed

Compute Infrastructure

More information needed

Hardware

Used V100/P100 from Google Colab Pro

Software

Python, Transformers

Citation

BibTeX: ``` @inproceedings{nawar-etal-2022-open, title = "An Open Source Contractual Language Understanding Application Using Machine Learning", author = "Nawar, Afra and Rakib, Mohammed and Hai, Salma Abdul and Haq, Sanaulla", booktitle = "Proceedings of the First Workshop on Language Technology and Resources for a Fair, Inclusive, and Safe Society within the 13th Language Resources and Evaluation Conference", month = jun, year = "2022", address = "Marseille, France", publisher = "European Language Resources Association", url = "https://aclanthology.org/2022.lateraisse-1.6", pages = "42--50", abstract = "Legal field is characterized by its exclusivity and non-transparency. Despite the frequency and relevance of legal dealings, legal documents like contracts remains elusive to non-legal professionals for the copious usage of legal jargon. There has been little advancement in making legal contracts more comprehensible. This paper presents how Machine Learning and NLP can be applied to solve this problem, further considering the challenges of applying ML to the high length of contract documents and training in a low resource environment. The largest open-source contract dataset so far, the Contract Understanding Atticus Dataset (CUAD) is utilized. Various pre-processing experiments and hyperparameter tuning have been carried out and we successfully managed to eclipse SOTA results presented for models in the CUAD dataset trained on RoBERTa-base. Our model, A-type-RoBERTa-base achieved an AUPR score of 46.6{\%} compared to 42.6{\%} on the original RoBERT-base. This model is utilized in our end to end contract understanding application which is able to take a contract and highlight the clauses a user is looking to find along with it{'}s descriptions to aid due diligence before signing. Alongside digital, i.e. searchable, contracts the system is capable of processing scanned, i.e. non-searchable, contracts using tesseract OCR. This application is aimed to not only make contract review a comprehensible process to non-legal professionals, but also to help lawyers and attorneys more efficiently review contracts.", }



# Glossary [optional]
More information needed

# More Information [optional]

More information needed

# Model Card Authors [optional]

Mohammed Rakib in collaboration with Ezi Ozoani and the Hugging Face team

# Model Card Contact

More information needed

# How to Get Started with the Model

Use the code below to get started with the model.

<details>
<summary> Click to expand </summary>

```python
from transformers import AutoTokenizer, AutoModelForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("Rakib/roberta-base-on-cuad")

model = AutoModelForQuestionAnswering.from_pretrained("Rakib/roberta-base-on-cuad")

Configuration

Architecture
RobertaForQuestionAnswering
Context length (tokens)
514
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
50,265
Model type
roberta

Identity and Version

Repository
Rakib/roberta-base-on-cuad
Publisher
Mohammed Rakib
Task
Question answering
Modality
Text
Library
transformers
Parameters
Not stated by the source
Languages
en
Revision
c0171973e286d120865dbeb4311af5af1b47d765
First published
2022-03-02
Last updated
2023-01-18

Files and Weights

11 files, 536.9 MB in total. The weights are 2 files totalling 496.3 MB in bin.

Weights2 files · 496.3 MB
Configuration3 files · 38.0 MB
Tokenizer4 files · 2.6 MB
Documentation1 file · 5.0 KB
Repository1 file · 749 B
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights496.3 MB a6b12a358516
training_args.binWeights2.5 KB 174c5a7c29ab
config.jsonConfiguration657 B
nbest_predictions.jsonConfiguration38.0 MB a48643074013
special_tokens_map.jsonConfiguration239 B
README.mdDocumentation5.0 KB
.gitattributesRepository749 B
merges.txtTokenizer456.4 KB
tokenizer.jsonTokenizer1.4 MB
tokenizer_config.jsonTokenizer288 B
vocab.jsonTokenizer798.3 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
496.3 MB
Download from Mohammed Rakib

Released by Mohammed Rakib through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) cuad

Memory Requirements

PrecisionWeights in memory
As published496.3 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About roberta-base-on-cuad

Can I use roberta-base-on-cuad commercially?

Yes. roberta-base-on-cuad is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is roberta-base-on-cuad's context length?

514 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Question answering

splinter-base

Tel Aviv University

Splinter-base is the pretrained model discussed in the paper Few-Shot Question Answering by Pretraining Span Selection (at ACL 2021). Its original repository can be found here. The model is case-sensitive. Note: This model doesn't contain the pretrained weights for the QASS layer (see paper for details), and therefore the QASS layer is randomly initialized upon loading it. For the model with those weights, see tau/splinter-base-qass. Splinter is a model that is pretrained in a self-supervised fashion for few-shot question answering. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an…

Open weights apache-2.0 512 tokens transformers

This model can be used for the task of question answering. The model should not be used to intentionally create hostile or alienating environments for people. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. The model creators note in the associated paper: The model creators note in the associated paper: The model…

Open weights 512 tokens transformers

Model · Question answering

distilbert-onnx

Philipp Schmid

This model is a fine-tune checkpoint of DistilBERT-base-cased, fine-tuned using (a second step of) knowledge distillation on SQuAD v1.1. This model reaches a F1 score of 87.1 on the dev set (for comparison, BERT bert-base-cased version reaches a F1 score of 88.7).

Open weights apache-2.0 512 tokens transformers

Model · Question answering

vit5-base

VietAI

State-of-the-art pretrained Transformer-based encoder-decoder model for Vietnamese. For more details, do check out our Github repo.

Open weights mit transformers