模型:

Chakshu/conversation_terminator_classifier

英文

Chakshu/conversation_terminator_classifier

这个模型是在未知数据集上对 google/mobilebert-uncased 进行微调的版本。在评估集上取得了以下结果:

  • 训练损失:0.0364
  • 训练二元准确率:0.9915
  • Epoch: 8

使用示例

from transformers import AutoTokenizer, TFBertForSequenceClassification, BertTokenizer
import tensorflow as tf

model_name = 'Chakshu/conversation_terminator_classifier' 

tokenizer = BertTokenizer.from_pretrained(model_name)
model = TFBertForSequenceClassification.from_pretrained(model_name)
inputs = tokenizer("I will talk to you later", return_tensors="np", padding=True)
outputs = model(inputs.input_ids, inputs.attention_mask)
probabilities = tf.nn.sigmoid(outputs.logits)

# Round the probabilities to the nearest integer to get the class prediction
predicted_class = tf.round(probabilities)
print("The last message by the user indicates that the conversation has", "'ENDED'" if int(predicted_class.numpy()) == 1 else "'NOT ENDED'")

模型描述

用于判断用户是结束对话还是继续对话。

用途和限制

需要更多信息。

训练和评估数据

需要更多信息。

训练过程

训练超参数

训练过程中使用了以下超参数:

  • 优化器:{'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': False, 'is_legacy_optimizer': False, 'learning_rate': 2e-05, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
  • 训练精度:float32

训练结果

Train Loss Train Binary Accuracy Epoch
0.2552 0.9444 0
0.1295 0.9872 1
0.0707 0.9872 2
0.0859 0.9829 3
0.0484 0.9872 4
0.0363 0.9957 5
0.0209 1.0 6
0.0268 0.9957 7
0.0364 0.9915 8

框架版本

  • Transformers 4.28.0
  • TensorFlow 2.12.0
  • Datasets 2.12.0
  • Tokenizers 0.13.3