Instructions to use shadowdemonosprey/mrpc-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shadowdemonosprey/mrpc-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="shadowdemonosprey/mrpc-distilbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("shadowdemonosprey/mrpc-distilbert") model = AutoModelForSequenceClassification.from_pretrained("shadowdemonosprey/mrpc-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DistilBERT MRPC Paraphrase Classifier
Fine-tuned distilbert-base-uncased model for paraphrase identification using the GLUE MRPC dataset.
Model Description
This model predicts whether two sentences have the same meaning.
Labels
0โ NOT_PARAPHRASE1โ PARAPHRASE
Dataset
- Dataset: GLUE MRPC
- Task: Sentence pair classification
Training Details
- Base model: distilbert-base-uncased
- Epochs: 1
- Batch size: 8
- Maximum sequence length: 128
Evaluation
Accuracy: 85.05%
Usage
Use the model with Hugging Face Transformers:
from transformers import pipeline
classifier = pipeline( "text-classification", model="shadowdemonosprey/mrpc-distilbert" )
result = classifier( { "text": "The company released a new phone.", "text_pair": "A new phone was released by the company." } )
print(result)
Example Output
PARAPHRASE
Confidence: 0.9643
Limitations
This model was trained on the MRPC dataset and may not generalize perfectly to all sentence similarity tasks.
- Downloads last month
- 62