GPU deploy isn't supported for this model type.
WhereIsAI/UAE-Large-V1 is licensed under MIT. Feel free to use it in any scenario.
If you use it for academic papers, you could cite us via 👉 citation info.WhereIsAI/UAE-Large-V1 achieves SOTA on the MTEB Leaderboard with an average score of 64.64!python -m pip install -U angle-emb1from angle_emb import AnglE
2from angle_emb.utils import cosine_similarity
3
4angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()
5doc_vecs = angle.encode([
6 'The weather is great!',
7 'The weather is very good!',
8 'i am going to bed'
9], normalize_embedding=True)
10
11for i, dv1 in enumerate(doc_vecs):
12 for dv2 in doc_vecs[i+1:]:
13 print(cosine_similarity(dv1, dv2))Prompts.C for query (not for document).1from angle_emb import AnglE, Prompts
2from angle_emb.utils import cosine_similarity
3
4angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()
5qv = angle.encode(Prompts.C.format(text='what is the weather?'))
6doc_vecs = angle.encode([
7 'The weather is great!',
8 'it is rainy today.',
9 'i am going to bed'
10])
11
12for dv in doc_vecs:
13 print(cosine_similarity(qv[0], dv))1from angle_emb import Prompts
2from sentence_transformers import SentenceTransformer
3
4model = SentenceTransformer("WhereIsAI/UAE-Large-V1").cuda()
5
6qv = model.encode(Prompts.C.format(text='what is the weather?'))
7doc_vecs = model.encode([
8 'The weather is great!',
9 'it is rainy today.',
10 'i am going to bed'
11])
12
13for dv in doc_vecs:
14 print(1 - spatial.distance.cosine(qv, dv))docker run --gpus all -v $PWD/data:/app/.cache -p "7997":"7997" \
michaelf34/infinity:latest \
v2 --model-id WhereIsAI/UAE-Large-V1 --revision "369c368f70f16a613f19f5598d4f12d9f44235d4" --dtype float16 --batch-size 32 --device cuda --engine torch --port 7997@article{li2023angle,
title={AnglE-optimized Text Embeddings},
author={Li, Xianming and Li, Jing},
journal={arXiv preprint arXiv:2309.12871},
year={2023}
}