tomaarsen HF staff commited on
Commit
dd54102
1 Parent(s): 58d6e1c

Add exported ONNX model 'model_O1.onnx'

Browse files

Hello!

*This pull request has been automatically generated from the [`export_optimized_onnx_model`](https://sbert.net/docs/package_reference/util.html#sentence_transformers.backend.export_optimized_onnx_model) function from the Sentence Transformers library.*

## Config
```python
OptimizationConfig(
optimization_level=1,
optimize_for_gpu=False,
fp16=False,
optimize_with_onnxruntime_only=None,
enable_transformers_specific_optimizations=False,
disable_gelu=None,
disable_gelu_fusion=False,
disable_layer_norm=None,
disable_layer_norm_fusion=False,
disable_attention=None,
disable_attention_fusion=False,
disable_skip_layer_norm=None,
disable_skip_layer_norm_fusion=False,
disable_bias_skip_layer_norm=None,
disable_bias_skip_layer_norm_fusion=False,
disable_bias_gelu=None,
disable_bias_gelu_fusion=False,
disable_embed_layer_norm=True,
disable_embed_layer_norm_fusion=True,
enable_gelu_approximation=False,
use_mask_index=False,
no_attention_mask=False,
disable_shape_inference=False,
use_multi_head_attention=False,
enable_gemm_fast_gelu_fusion=False,
use_raw_attention_mask=False,
disable_group_norm_fusion=True,
disable_packed_kv=True,
disable_rotary_embeddings=False
)
```

## Tip:
Consider testing this pull request before merging by loading the model from this PR with the `revision` argument:
```python
from sentence_transformers import SentenceTransformer

# TODO: Fill in the PR number
pr_number = 2
model = SentenceTransformer(
"tomaarsen/all-mpnet-base-v2",
revision=f"refs/pr/{pr_number}",
backend="onnx",
model_kwargs={"file_name": "onnx/model_O1.onnx"},
)

# Verify that everything works as expected
embeddings = model.encode(["The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium."])
print(embeddings.shape)

similarities = model.similarity(embeddings, embeddings)
print(similarities)
```

Files changed (1) hide show
  1. onnx/model_O1.onnx +3 -0
onnx/model_O1.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c0b47004076ab40bf15a2c52b98a53e985ebb84faaeeb6d2551768f96e384b0
3
+ size 435730180