Skip to content

How can I get similarity between nl and code of unixcoder and codebert? #326

Description

@nevermet

Dear all,

What I like to do is to compare the similarities between nl and code from codebert and unixcoder.

I could see quick tour code on unixcoder explaining how to get the similarity between nl and code but I don't see how to get the similarity between nl and code on the codebert page. My questions are as follows.

  1. Can I change the model on the unixcoder quick tour page from 'microsoft/unixcoder-base' to 'microsoft/codebert-base' to get the similarity result?

  2. I also tried to get the nl embedding and code embedding separately from the code on codebert page. I found that nl embedding shape and code embedding shape is different. Could you tell me how I can get the cosine similarity in this case?

Thank you in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions