roberthsu2003/for_Sentence_Similarity
Viewer • Updated • 10k • 251
How to use roberthsu2003/sentence_similarity with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="roberthsu2003/sentence_similarity") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("roberthsu2003/sentence_similarity")
model = AutoModelForSequenceClassification.from_pretrained("roberthsu2003/sentence_similarity")This model is a fine-tuned version of google-bert/bert-base-chinese on an unknown dataset. It achieves the following results on the evaluation set:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="roberthsu2003/sentence_similarity")
pipe({"text":"我喜歡台北", "text_pair":"台北是我喜歡的地方"})
#=======output=====
{'label': '相似', 'score': 0.8854433298110962}
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.2928 | 1.0 | 250 | 0.2737 | 0.887 | 0.8546 |
| 0.1815 | 2.0 | 500 | 0.2596 | 0.8985 | 0.8741 |
| 0.1203 | 3.0 | 750 | 0.3474 | 0.897 | 0.8652 |
Base model
google-bert/bert-base-chinese