Instructions to use rbw/ColBERT-Zero-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use rbw/ColBERT-Zero-onnx with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("rbw/ColBERT-Zero-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] - Notebooks
- Google Colab
- Kaggle
File size: 1,221 Bytes
4f73690 8b92d30 bb24f17 8b92d30 135b881 8b92d30 135b881 8b92d30 135b881 8b92d30 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ---
library_name: colbert-zero-onnx
tags:
- colbert
- onnx
- sentence-transformers
- feature-extraction
- quantisation
license: mit
base_model:
- lightonai/ColBERT-Zero
---
# ColBERT-Zero-onnx
ONNX export of [lightonai/ColBERT-Zero](https://huggingface.co/lightonai/ColBERT-Zero) for fast CPU inference.
## Model Details
- **Source Model**: [unknown](https://huggingface.co/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)
```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](https://github.com/lightonai/next-plaid/tree/main/onnx/python):
```bash
pip install "pylate-onnx-export @ git+https://github.com/lightonai/next-plaid.git#subdirectory=onnx/python"
pylate-onnx-export unknown --push-to-hub rbw/ColBERT-Zero-onnx
``` |