ONNX Model Zoo

karrar-alwaili/UAE-Large-V1

By karrar-alwaili · ↓ 1 · ♥ 0 · Updated 2023-12-22

What's in this repo

This page lists the files in karrar-alwaili/UAE-Large-V1, including model.onnx, model_quantized.onnx.

  • 2 ONNX models (.onnx files)
  • 10 files, including 4 .json, 2 .onnx, 1 .md, 1 .safetensors, 1 .txt
  • Last updated 2023-12-22

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_quantized.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

(https://huggingface.co/WhereIsAI/UAE-Large-V1) with sentence-transformers tag to do Average Pooling

Usage

python -m pip install -U angle-emb
  1. Non-Retrieval Tasks
from angle_emb import AnglE

angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()
vec = angle.encode('hello world', to_numpy=True)
print(vec)
vecs = angle.encode(['hello world1', 'hello world2'], to_numpy=True)
print(vecs)
  1. Retrieval Tasks

For retrieval purposes, please use the prompt Prompts.C.

from angle_emb import AnglE, Prompts

angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()
angle.set_prompt(prompt=Prompts.C)
vec = angle.encode({'text': 'hello world'}, to_numpy=True)
print(vec)
vecs = angle.encode([{'text': 'hello world1'}, {'text': 'hello world2'}], to_numpy=True)
print(vecs)

Citation

If you use our pre-trained models, welcome to support us by citing our work:

@article{li2023angle,
  title={AnglE-optimized Text Embeddings},
  author={Li, Xianming and Li, Jing},
  journal={arXiv preprint arXiv:2309.12871},
  year={2023}
}

Model info

feature-extraction sentence-transformers
sentence-transformers onnx safetensors bert feature-extraction mteb sentence_embedding transformers transformers.js en arxiv:2309.12871 license:apache-2.0
↓ 1 ♥ 0

Created: 2023-12-22

Updated: 2023-12-22

View on Hugging Face

Files (10)

.gitattributes
README.md
config.json
model.safetensors
onnx/model.onnx ONNX
onnx/model_quantized.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models