S2V icon indicating copy to clipboard operation
S2V copied to clipboard

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

Open JohnGiorgi opened this issue 4 years ago • 0 comments

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?

JohnGiorgi avatar May 06 '20 15:05 JohnGiorgi