Description
A BERT-base-uncased checkpoint fine-tuned for natural language inference on the MultiNLI (MNLI) corpus. Given a premise and a hypothesis, it predicts whether the hypothesis is entailed by the premise, neutral toward it, or contradicts it.
In Spark NLP, load it with SampleEntailmentMatrix to compute bidirectional entailment between pairs of texts - two texts are treated as equivalent when each entails the other. This is the textbook approach to deciding whether two pieces of text “mean the same thing,” independent of exact wording, and is useful anywhere you need to cluster or deduplicate text by meaning rather than surface form.
How to use
entailment = SampleEntailmentMatrix.pretrained("bert_base_uncased_mnli_entailment", "en").setInputCols("completions").setOutputCol("completions_with_entailment")
val entailment = SampleEntailmentMatrix.pretrained("bert_base_uncased_mnli_entailment", "en").setInputCols("completions").setOutputCol("completions_with_entailment")
Model Information
| Model Name: | bert_base_uncased_mnli_entailment |
| Compatibility: | Spark NLP 7.0.0+ |
| License: | Open Source |
| Edition: | Official |
| Input Labels: | [completions] |
| Output Labels: | [completions_with_entailment] |
| Language: | en |
| Size: | 409.4 MB |