How to use from the
Use from the
sentence-transformers library
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("raphaelsty/model-test-onnx")

sentences = [
    "The weather is lovely today.",
    "It's so sunny outside!",
    "He drove to the stadium."
]
embeddings = model.encode(sentences)

similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

model-test-onnx

ONNX export of unknown for fast CPU inference.

Model Details

  • Source Model: unknown
  • Embedding Dimension: unknown
  • Format: ONNX (FP32 + INT8)

Files

File Description
model.onnx FP32 ONNX model
model_int8.onnx INT8 quantized model (faster)
tokenizer.json Tokenizer configuration
config_sentence_transformers.json Model configuration

Usage with colbert-onnx (Rust)

use colbert_onnx::Colbert;

let mut model = Colbert::from_pretrained("path/to/model")?;
let embeddings = model.encode_documents(&["Hello world"])?;

Export Tool

This model was exported using pylate-onnx-export:

pip install "pylate-onnx-export @ git+https://github.com/lightonai/next-plaid.git#subdirectory=onnx/python"
pylate-onnx-export unknown --push-to-hub raphaelsty/model-test-onnx
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support