Instructions to use Prompsit/paraphrase-bert-pt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Prompsit/paraphrase-bert-pt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Prompsit/paraphrase-bert-pt")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Prompsit/paraphrase-bert-pt") model = AutoModelForSequenceClassification.from_pretrained("Prompsit/paraphrase-bert-pt") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,3 +54,22 @@ Code output is:
|
|
| 54 |
|
| 55 |
As the probability of 1 (=It's a paraphrase) is 0.7863 and the probability of 0 (=It is not a paraphrase) is 0.2137, we can conclude, for our previous example, that "pouco depois do assassinato" is a paraphrase of "logo ap贸s o homicidio".
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
As the probability of 1 (=It's a paraphrase) is 0.7863 and the probability of 0 (=It is not a paraphrase) is 0.2137, we can conclude, for our previous example, that "pouco depois do assassinato" is a paraphrase of "logo ap贸s o homicidio".
|
| 56 |
|
| 57 |
+
# Evaluation results
|
| 58 |
+
|
| 59 |
+
We have used as test dataset 16500 pairs of phrases human tagged.
|
| 60 |
+
|
| 61 |
+
Metrics obtained are:
|
| 62 |
+
|
| 63 |
+
```
|
| 64 |
+
metrics={
|
| 65 |
+
'test_loss': 0.6074697375297546,
|
| 66 |
+
'test_accuracy': 0.7809,
|
| 67 |
+
'test_precision': 0.7157638466220329,
|
| 68 |
+
'test_recall': 0.40551724137931033,
|
| 69 |
+
'test_f1': 0.5177195685670262,
|
| 70 |
+
'test_matthews_correlation': 0.41603913834665324,
|
| 71 |
+
'test_runtime': 16.4585,
|
| 72 |
+
'test_samples_per_second': 607.587,
|
| 73 |
+
'test_steps_per_second': 19.017
|
| 74 |
+
}
|
| 75 |
+
```
|