Downloads · 30 days
14
20% of all-time downloads
hancheolp/ambiguity-aware-roberta-snli
ambiguity-aware-roberta-snli is a machine learning model from hancheolp. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model is trained on a subset of the SNLI dataset and is capable of representing the ambiguity occurring in natural language inference tasks as an accurate distribution (i.e., softmax output). It was introduced in…
Downloads · 30 days
14
20% of all-time downloads
All-time downloads
71
Public
Repo size
827 MB
Likes
1
Public
Click a slice to open those files.
.bin414 MB · 100%
From the Hugging Face model README
This model is trained on a subset of the SNLI dataset and is capable of representing the ambiguity occurring in natural language inference tasks as an accurate distribution (i.e., softmax output). It was introduced in the following paper: "Deep Model Compression Also Helps Models Capture Ambiguity" (ACL 2023).
from transformers import RobertaTokenizer, RobertaForSequenceClassification
tokenizer = RobertaTokenizer.from_pretrained('hancheolp/ambiguity-aware-roberta-snli')
model = RobertaForSequenceClassification.from_pretrained('hancheolp/ambiguity-aware-roberta-snli')
premise = "To the sociologists' speculations, add mine."
hypothesis = "I don't agree with sociologists."
encoded_input = tokenizer(premise, hypothesis, return_tensors='pt')
output = model(**encoded_input)
distribution = output.logits.softmax(dim=-1)
Each index of the output vector represents the following: