UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
14.98k stars 2.44k forks source link

Sentences into Sentence Vectors #1041

Open hailiang-bai opened 3 years ago

hailiang-bai commented 3 years ago

Hello, if I just want to convert sentences into sentence vectors, can I just use the "'paraphrase-MiniLM-L12-v2" model to encode them directly?

nreimers commented 3 years ago

Yes

hailiang-bai commented 3 years ago

To convert logs into sentence vectors, use the average_word_embeddings_glove.6B.300d model or the paraphrase-MiniLM-L12-v2 model?

nreimers commented 3 years ago

the paraphrase model is better but slower

hailiang-bai commented 3 years ago

The model of sentence transformation semantic vectors can generate semantic vectors of sentences in a flow manner, for example, one sentence is used to generate one sentence vector. If so, is there a difference between the semantic vectors generated by it and the semantic vectors generated by putting in many sentences at once?

hailiang-bai commented 3 years ago

Also, I want to change the dimension of the output sentence vector, which parameter needs to be changed?

nreimers commented 3 years ago

No, same vectors.

https://www.sbert.net/examples/training/distillation/README.html#dimensionality-reduction

hailiang-bai commented 3 years ago

Thank you very much for your reply