Skip to content

Commit b8bc2f2

Browse files
Refactor model initialization in onnx_models.py for clarity
- Updated the model initialization in examples/onnx_models.py to include the model name parameter explicitly. - This change improves code readability and aligns with recent refactoring efforts in other example scripts.
1 parent 8a5876c commit b8bc2f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/onnx_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
import numpy as np
1313

1414
model = EmbeddingModel.from_pretrained_onnx(
15-
model_id=ONNXModel.ModernBERTBase, dtype = Dtype.Q4F16
15+
model = WhichModel.Bert, model_name=ONNXModel.ModernBERTBase, dtype = Dtype.Q4F16
1616
)
1717

1818
# model = EmbeddingModel.from_pretrained_hf(
19-
# WhichModel.Bert, "BAAI/bge-small-en-v1.5"
19+
# model = WhichModel.Bert, model_name="BAAI/bge-small-en-v1.5"
2020
# )
2121

2222
sentences = [

0 commit comments

Comments
 (0)