-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use BERT to evaluate directly to my conversation? #6
Comments
Hi @dxlong2000, Unfortunately, we don't have our fine-tuned models anymore. You need to fine-tune BERT yourself first. Hope this helps! |
Thanks for your reply. I see. Could you mind uploading the inference codes? Like how to load and evaluate a new dialog? Thanks |
Our code supports evaluation. You can find it here. We didn't implement inference where we save the predicted labels for an input data, but it would be quite similar to the evaluation code. |
Hi @ehsk , Your evaluation code only reports the eval_accuracy, eval_loss, global_step, and loss. May I ask how can I get the SS scores? Look forward hearing from you soon. Thanks! |
Hi @dxlong2000, For Semantic Similarity, take a look at here. You need to write a code like the following: from dialogentail.semantic_similarity import SemanticSimilarity
ss = SemanticSimilarity()
ss.compute(conversation_history, actual_response, generated_response)
|
Hi @ehsk , Thanks for your quick response. From my understanding is that let's say the entailment model is trained on the ground-truth response and then we can take that pre-trained model to evaluate on a new conversation without knowing the I still see in the computation of Thanks a lot! |
I saw you already provided |
Semantic Similarity measures cosine similarity between embedding vectors. An updated version of it would be BERTScore. If you want to use an entailment model, the coherence metric, here, is what you need: from dialogentail.coherence import BertCoherence
c = BertCoherence("/path/to/model")
c.compute(conversation_history, actual_response, generated_response) The constructor argument is the path to a fine-tuned BERT model. |
Hi @ehsk , @korymath ,
Thanks for your great work. May I ask if there is any inference scripts so that I can run them to evaluate my generated dialog? Look forward hearing from you soon.
Thanks!
The text was updated successfully, but these errors were encountered: