Instructions to use vespa-engine/colbert-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vespa-engine/colbert-medium with Transformers:
# Load model directly from transformers import AutoTokenizer, ColBERT tokenizer = AutoTokenizer.from_pretrained("vespa-engine/colbert-medium") model = ColBERT.from_pretrained("vespa-engine/colbert-medium") - Notebooks
- Google Colab
- Kaggle
Jo Kristian Bergum commited on
Commit ·
63ecbef
1
Parent(s): 44cb111
Update with dynamic axes
Browse files
README.md
CHANGED
|
@@ -58,8 +58,12 @@ torch.onnx.export(colbert_query_encoder,
|
|
| 58 |
f="query_encoder_colbert.onnx",
|
| 59 |
input_names = input_names,
|
| 60 |
output_names = output_names,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
opset_version=11)
|
| 62 |
-
|
| 63 |
```
|
| 64 |
|
| 65 |
# Representing the model on Vespa.ai
|
|
|
|
| 58 |
f="query_encoder_colbert.onnx",
|
| 59 |
input_names = input_names,
|
| 60 |
output_names = output_names,
|
| 61 |
+
dynamic_axes = {
|
| 62 |
+
"input_ids": {0: "batch"},
|
| 63 |
+
"attention_mask": {0: "batch"},
|
| 64 |
+
"contextual": {0: "batch"},
|
| 65 |
+
},
|
| 66 |
opset_version=11)
|
|
|
|
| 67 |
```
|
| 68 |
|
| 69 |
# Representing the model on Vespa.ai
|