Instructions to use nikotang/span-nli-bert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nikotang/span-nli-bert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nikotang/span-nli-bert-base")# Load model directly from transformers import AutoTokenizer, BertForIdentificationClassification tokenizer = AutoTokenizer.from_pretrained("nikotang/span-nli-bert-base") model = BertForIdentificationClassification.from_pretrained("nikotang/span-nli-bert-base") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, BertForIdentificationClassification
tokenizer = AutoTokenizer.from_pretrained("nikotang/span-nli-bert-base")
model = BertForIdentificationClassification.from_pretrained("nikotang/span-nli-bert-base")Span NLI BERT (base)
This is a BERT-base model (bert-base-uncased) fine-tuned on the ContractNLI dataset (non-disclosure agreements) with the Span NLI BERT model architecture,
from ContractNLI: A Dataset for Document-level Natural Language Inference for Contracts (Koreeda and Manning, 2021).
For a hypothesis, the Span NLI BERT model predicts NLI labels and identifies evidence for documents as premises. Spans of documents should be pre-annotated; evidence is always full sentences or items in an enumerated list in the document.
For details of the architecture and usage of the relevant training/testing scripts, check out the paper and their Github repo.
This model is fine-tuned according to the hyperparameters in data/conf_base.yml in their repo,
which differs from their hyperparameters that produced the best dev scores as noted in the Appendix of the paper.
- Downloads last month
- 28
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nikotang/span-nli-bert-base")