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:

  • Loss: 0.3474
  • Accuracy: 0.897
  • F1: 0.8652

模型使用

# 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

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 32
  • eval_batch_size: 32
  • seed: 42
  • optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 3.0

Training results

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

Framework versions

  • Transformers 4.50.3
  • Pytorch 2.6.0+cu124
  • Tokenizers 0.21.1
Downloads last month
1
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for roberthsu2003/sentence_similarity

Finetuned
(242)
this model

Dataset used to train roberthsu2003/sentence_similarity