Sentence Similarity
sentence-transformers
ONNX
Safetensors
Transformers.js
gte
feature-extraction
mteb
arctic
snowflake-arctic-embed
custom_code
Eval Results (legacy)
Eval Results
Instructions to use Snowflake/snowflake-arctic-embed-m-v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Snowflake/snowflake-arctic-embed-m-v2.0 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Snowflake/snowflake-arctic-embed-m-v2.0", trust_remote_code=True) 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] - Transformers.js
How to use Snowflake/snowflake-arctic-embed-m-v2.0 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'Snowflake/snowflake-arctic-embed-m-v2.0'); - Notebooks
- Google Colab
- Kaggle
Onnx models are built using an older opset.
#11
by mistborn - opened
The onnx models shared are on older opset, i.e 14.
$ polygraphy inspect model model_fp16.onnx --mode=onnx
[W] 'colored' module is not installed, will not use colors when logging. To enable colors, please install the 'colored' module: python3 -m pip install colored
[I] Loading model: /home/cohesity/workspace/eagle/src/gaia-triton/arctic_m/model_fp16.onnx
[I] ==== ONNX Model ====
Name: main_graph | ONNX Opset: 14
---- 2 Graph Input(s) ----
{input_ids [dtype=int64, shape=('batch_size', 'sequence_length')],
attention_mask [dtype=int64, shape=('batch_size', 'sequence_length')]}
---- 2 Graph Output(s) ----
{token_embeddings [dtype=float32, shape=('batch_size', 'sequence_length', 768)],
sentence_embedding [dtype=float32, shape=('batch_size', 768)]}
---- 166 Initializer(s) ----
---- 1085 Node(s) ----
Can you share the script used to create the onnx model so as to tweak to build the model with latest opset ?