Skip to content
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

Easiest way to use the model as a "library"? #13

Open
JohnGiorgi opened this issue May 6, 2020 · 0 comments
Open

Easiest way to use the model as a "library"? #13

JohnGiorgi opened this issue May 6, 2020 · 0 comments

Comments

@JohnGiorgi
Copy link

JohnGiorgi commented May 6, 2020

Hi,

I am interested in comparing to your QuickThoughts method by evaluating it on the full SentEval benchmark. To do that I need to write something like the following:

def batcher(params, batch):
    batch = [sent if sent != [] else ["."] for sent in batch]
    embeddings = params.model.encode(batch)
    embeddings = np.vstack(embeddings)
    return embeddings

Is there a way for me to import your pre-trained model, and use it similar to the above code? E.g. is there a workflow for embedding lists of strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant