EmbeddedLLM / bge-reranker-large-onnx-o4-gpu

huggingface.co
Total runs: 6
24-hour runs: 0
7-day runs: -3
30-day runs: -2
Model's Last Updated: February 19 2024
sentence-similarity

Introduction of bge-reranker-large-onnx-o4-gpu

Model Details of bge-reranker-large-onnx-o4-gpu

ONNX Conversion of BAAI/bge-reranker-large

  • ONNX model for GPU with O4 optimisation
Usage
from itertools import product

import torch.nn.functional as F
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer

sentences = [
    "The llama (/ˈlɑːmə/) (Lama glama) is a domesticated South American camelid.",
    "The alpaca (Lama pacos) is a species of South American camelid mammal.",
    "The vicuña (Lama vicugna) (/vɪˈkuːnjə/) is one of the two wild South American camelids.",
]
queries = ["What is a llama?", "What is a harimau?", "How to fly a kite?"]
pairs = list(product(queries, sentences))

model_name = "EmbeddedLLM/bge-reranker-large-onnx-o4-gpu"
device = "cuda"
provider = "CUDAExecutionProvider"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = ORTModelForSequenceClassification.from_pretrained(
    model_name, use_io_binding=True, provider=provider, device_map=device
)
inputs = tokenizer(
    pairs,
    padding=True,
    truncation=True,
    return_tensors="pt",
    max_length=model.config.max_position_embeddings,
)
inputs = inputs.to(device)
scores = model(**inputs).logits.view(-1).cpu().numpy()
# Sort most similar to least
pairs = sorted(zip(pairs, scores), key=lambda x: x[1], reverse=True)
for ps in pairs:
    print(ps)

Runs of EmbeddedLLM bge-reranker-large-onnx-o4-gpu on huggingface.co

6
Total runs
0
24-hour runs
-1
3-day runs
-3
7-day runs
-2
30-day runs

More Information About bge-reranker-large-onnx-o4-gpu huggingface.co Model

More bge-reranker-large-onnx-o4-gpu license Visit here:

https://choosealicense.com/licenses/mit

bge-reranker-large-onnx-o4-gpu huggingface.co

bge-reranker-large-onnx-o4-gpu huggingface.co is an AI model on huggingface.co that provides bge-reranker-large-onnx-o4-gpu's model effect (), which can be used instantly with this EmbeddedLLM bge-reranker-large-onnx-o4-gpu model. huggingface.co supports a free trial of the bge-reranker-large-onnx-o4-gpu model, and also provides paid use of the bge-reranker-large-onnx-o4-gpu. Support call bge-reranker-large-onnx-o4-gpu model through api, including Node.js, Python, http.

bge-reranker-large-onnx-o4-gpu huggingface.co Url

https://huggingface.co/EmbeddedLLM/bge-reranker-large-onnx-o4-gpu

EmbeddedLLM bge-reranker-large-onnx-o4-gpu online free

bge-reranker-large-onnx-o4-gpu huggingface.co is an online trial and call api platform, which integrates bge-reranker-large-onnx-o4-gpu's modeling effects, including api services, and provides a free online trial of bge-reranker-large-onnx-o4-gpu, you can try bge-reranker-large-onnx-o4-gpu online for free by clicking the link below.

EmbeddedLLM bge-reranker-large-onnx-o4-gpu online free url in huggingface.co:

https://huggingface.co/EmbeddedLLM/bge-reranker-large-onnx-o4-gpu

bge-reranker-large-onnx-o4-gpu install

bge-reranker-large-onnx-o4-gpu is an open source model from GitHub that offers a free installation service, and any user can find bge-reranker-large-onnx-o4-gpu on GitHub to install. At the same time, huggingface.co provides the effect of bge-reranker-large-onnx-o4-gpu install, users can directly use bge-reranker-large-onnx-o4-gpu installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bge-reranker-large-onnx-o4-gpu install url in huggingface.co:

https://huggingface.co/EmbeddedLLM/bge-reranker-large-onnx-o4-gpu

Url of bge-reranker-large-onnx-o4-gpu

bge-reranker-large-onnx-o4-gpu huggingface.co Url

Provider of bge-reranker-large-onnx-o4-gpu huggingface.co

EmbeddedLLM
ORGANIZATIONS

Other API from EmbeddedLLM