Downloads · 30 days
9
2% of all-time downloads
sadhaklal/bert-base-uncased-finetuned-mrpc-v2
bert-base-uncased-finetuned-mrpc-v2 is a text classification model from sadhaklal. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
BERT ("bert-base-uncased") finetuned on MRPC (Microsoft Research Paraphrase Corpus).
Downloads · 30 days
9
2% of all-time downloads
All-time downloads
541
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
BERT ("bert-base-uncased") finetuned on MRPC (Microsoft Research Paraphrase Corpus).
The model predicts whether two sentences are semantically equivalent. It pertains to section 4 of chapter 3 of the Hugging Face "NLP Course" (https://huggingface.co/learn/nlp-course/chapter3/4).
It was trained using a custom PyTorch loop with Hugging Face Accelerate.
Code: https://github.com/sambitmukherjee/huggingface-notebooks/blob/main/course/en/chapter3/section4.ipynb
Experiment tracking: https://wandb.ai/sadhaklal/bert-base-uncased-finetuned-mrpc-v2
from transformers import pipeline
classifier = pipeline("text-classification", model="sadhaklal/bert-base-uncased-finetuned-mrpc-v2")
sentence1 = "A tropical storm rapidly developed in the Gulf of Mexico Sunday and was expected to hit somewhere along the Texas or Louisiana coasts by Monday night ."
sentence2 = "A tropical storm rapidly developed in the Gulf of Mexico on Sunday and could have hurricane-force winds when it hits land somewhere along the Louisiana coast Monday night ."
sentence_pair = sentence1 + " [SEP] " + sentence2
print(classifier(sentence_pair))
sentence1 = "The settling companies would also assign their possible claims against the underwriters to the investor plaintiffs , he added ."
sentence2 = "Under the agreement , the settling companies will also assign their potential claims against the underwriters to the investors , he added ."
sentence_pair = sentence1 + " [SEP] " + sentence2
print(classifier(sentence_pair))
From the dataset page:
The Microsoft Research Paraphrase Corpus (Dolan & Brockett, 2005) is a corpus of sentence pairs automatically extracted from online news sources, with human annotations for whether the sentences in the pair are semantically equivalent.
Examples: https://huggingface.co/datasets/glue/viewer/mrpc
Accuracy on the 'validation' split of MRPC: 0.875
F1 on the 'validation' split of MRPC: 0.9128