Git Product home page Git Product logo

Comments (8)

ehsk avatar ehsk commented on May 20, 2024 1

Hi @dxlong2000,

Unfortunately, we don't have our fine-tuned models anymore. You need to fine-tune BERT yourself first.

Hope this helps!

from dialogentailment.

ehsk avatar ehsk commented on May 20, 2024 1

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)

conversation_history is a list of strings and actual_response and generated_response are both strings.

from dialogentailment.

ehsk avatar ehsk commented on May 20, 2024 1

Semantic Similarity measures cosine similarity between embedding vectors. An updated version of it would be BERTScore.
actual_response is not really necessary. You can pass the same string as generated_response.

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.

from dialogentailment.

dxlong2000 avatar dxlong2000 commented on May 20, 2024

Thanks for your reply. I see. Could you mind uploading the inference codes? Like how to load and evaluate a new dialog? Thanks

from dialogentailment.

ehsk avatar ehsk commented on May 20, 2024

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.

from dialogentailment.

dxlong2000 avatar dxlong2000 commented on May 20, 2024

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!

from dialogentailment.

dxlong2000 avatar dxlong2000 commented on May 20, 2024

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 actual_response, am I correct?

I still see in the computation of ss includes actual_response. In the paper I saw: It measures the distance between the generated response and the utterances in the conversation history but there is no mention of theactual_response. Could you mind clarifying for me?

Thanks a lot!

from dialogentailment.

dxlong2000 avatar dxlong2000 commented on May 20, 2024

I saw you already provided sim_generated_resp. That answered my right above question. Is there any way I can load my above pretrained BERT instead of Elmo?

from dialogentailment.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.