This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs.
The base model is
DeBERTa-v3-base from Microsoft
. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see annex 11 of the original
DeBERTa paper
. For a more powerful model, check out
DeBERTa-v3-base-mnli-fever-anli
which was trained on even more data.
Intended uses & limitations
How to use the model
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "MoritzLaurer/DeBERTa-v3-base-mnli"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
premise = "I first thought that I liked the movie, but upon second thought it was actually disappointing."
hypothesis = "The movie was good."input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
prediction = torch.softmax(output["logits"][0], -1).tolist()
label_names = ["entailment", "neutral", "contradiction"]
prediction = {name: round(float(pred) * 100, 1) for pred, name inzip(prediction, label_names)}
print(prediction)
Training data
This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs.
Training procedure
DeBERTa-v3-base-mnli was trained using the Hugging Face trainer with the following hyperparameters.
training_args = TrainingArguments(
num_train_epochs=5, # total number of training epochs
learning_rate=2e-05,
per_device_train_batch_size=32, # batch size per device during training
per_device_eval_batch_size=32, # batch size for evaluation
warmup_ratio=0.1, # number of warmup steps for learning rate scheduler
weight_decay=0.06, # strength of weight decay
fp16=True # mixed precision training
)
Eval results
The model was evaluated using the matched test set and achieves 0.90 accuracy.
Limitations and bias
Please consult the original DeBERTa paper and literature on different NLI datasets for potential biases.
BibTeX entry and citation info
If you want to cite this model, please cite the original DeBERTa paper, the respective NLI datasets and include a link to this model on the Hugging Face hub.
Ideas for cooperation or questions?
If you have questions or ideas for cooperation, contact me at m{dot}laurer{at}vu{dot}nl or
LinkedIn
Debugging and issues
Note that DeBERTa-v3 was released recently and older versions of HF Transformers seem to have issues running the model (e.g. resulting in an issue with the tokenizer). Using Transformers==4.13 might solve some issues.
Model Recycling
Evaluation on 36 datasets
using MoritzLaurer/DeBERTa-v3-base-mnli as a base model yields average score of 80.01 in comparison to 79.04 by microsoft/deberta-v3-base.
The model is ranked 1st among all tested models for the microsoft/deberta-v3-base architecture as of 09/01/2023.
Runs of MoritzLaurer DeBERTa-v3-base-mnli on huggingface.co
3.4K
Total runs
80
24-hour runs
68
3-day runs
1.0K
7-day runs
584
30-day runs
More Information About DeBERTa-v3-base-mnli huggingface.co Model
DeBERTa-v3-base-mnli huggingface.co
DeBERTa-v3-base-mnli huggingface.co is an AI model on huggingface.co that provides DeBERTa-v3-base-mnli's model effect (), which can be used instantly with this MoritzLaurer DeBERTa-v3-base-mnli model. huggingface.co supports a free trial of the DeBERTa-v3-base-mnli model, and also provides paid use of the DeBERTa-v3-base-mnli. Support call DeBERTa-v3-base-mnli model through api, including Node.js, Python, http.
DeBERTa-v3-base-mnli huggingface.co is an online trial and call api platform, which integrates DeBERTa-v3-base-mnli's modeling effects, including api services, and provides a free online trial of DeBERTa-v3-base-mnli, you can try DeBERTa-v3-base-mnli online for free by clicking the link below.
MoritzLaurer DeBERTa-v3-base-mnli online free url in huggingface.co:
DeBERTa-v3-base-mnli is an open source model from GitHub that offers a free installation service, and any user can find DeBERTa-v3-base-mnli on GitHub to install. At the same time, huggingface.co provides the effect of DeBERTa-v3-base-mnli install, users can directly use DeBERTa-v3-base-mnli installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
DeBERTa-v3-base-mnli install url in huggingface.co: