SeanLee97 / AnglE

Train and Infer Powerful Sentence Embeddings with AnglE | 🔥 SOTA on STS and MTEB Leaderboard
https://arxiv.org/abs/2309.12871
MIT License
398 stars 30 forks source link

Fix Retrieval example #16

Closed milistu closed 7 months ago

milistu commented 7 months ago

Change sending a list of one dictionary with save keys to a list of dictionaries.

From: angle.encode([{'text': 'hello world1', 'text': 'hello world2'}], to_numpy=True) Change to: angle.encode([{'text': 'hello world1'}, {'text': 'hello world2'}], to_numpy=True)

Now we are getting the output shape (2, 1024) rather than (1, 1024).

SeanLee97 commented 7 months ago

LGTM. Thanks for your contribution!