This model is for Textual Entailment (aka NLI), i.e., predict whether
textA
is supported by
textB
. More specifically, it's a 2-way classification where the relationship between
textA
and
textB
can be
entail, neutral, contradict
.
Input: (
textA
,
textB
)
Output: prob(entail), prob(contradict)
Note that during training, all 3 labels (entail, neural, contradict) were used. But for this model, the neural output head has been removed.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("potsawee/deberta-v3-large-mnli")
model = AutoModelForSequenceClassification.from_pretrained("potsawee/deberta-v3-large-mnli")
textA = "Kyle Walker has a personal issue"
textB = "Kyle Walker will remain Manchester City captain following reports about his private life, says boss Pep Guardiola."
inputs = tokenizer.batch_encode_plus(
batch_text_or_text_pairs=[(textA, textB)],
add_special_tokens=True, return_tensors="pt",
)
logits = model(**inputs).logits # neutral is already removed
probs = torch.softmax(logits, dim=-1)[0]
# probs = [0.7080, 0.2920], meaning that prob(entail) = 0.708, prob(contradict) = 0.292
Citation
@article{manakul2023selfcheckgpt,
title={Selfcheckgpt: Zero-resource black-box hallucination detection for generative large language models},
author={Manakul, Potsawee and Liusie, Adian and Gales, Mark JF},
journal={arXiv preprint arXiv:2303.08896},
year={2023}
}
Runs of potsawee deberta-v3-large-mnli on huggingface.co
1.5K
Total runs
48
24-hour runs
65
3-day runs
95
7-day runs
-697
30-day runs
More Information About deberta-v3-large-mnli huggingface.co Model
deberta-v3-large-mnli huggingface.co is an AI model on huggingface.co that provides deberta-v3-large-mnli's model effect (), which can be used instantly with this potsawee deberta-v3-large-mnli model. huggingface.co supports a free trial of the deberta-v3-large-mnli model, and also provides paid use of the deberta-v3-large-mnli. Support call deberta-v3-large-mnli model through api, including Node.js, Python, http.
deberta-v3-large-mnli huggingface.co is an online trial and call api platform, which integrates deberta-v3-large-mnli's modeling effects, including api services, and provides a free online trial of deberta-v3-large-mnli, you can try deberta-v3-large-mnli online for free by clicking the link below.
potsawee deberta-v3-large-mnli online free url in huggingface.co:
deberta-v3-large-mnli is an open source model from GitHub that offers a free installation service, and any user can find deberta-v3-large-mnli on GitHub to install. At the same time, huggingface.co provides the effect of deberta-v3-large-mnli install, users can directly use deberta-v3-large-mnli installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
deberta-v3-large-mnli install url in huggingface.co: