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
feat(transformers): Add native Transformers config
What does this PR do?
โ Adds rope_parameters, so the checkpoint loads directly with AutoModel / AutoConfig in Transformers ๐ค without trust_remote_code.
โ Transformers support is being added in https://github.com/huggingface/transformers/pull/48416
โ โ ๏ธ Please hold this until the Transformers PR above has landed ๐ค
Compatibility
โ rope_scaling, rope_theta and auto_map are left untouched, so nothing changes for anyone on an older version.
Produced by?
โ rope_parameters is the standardised form of the existing rope_theta. This checkpoint leaves rope_scaling at null, so the standardised form is a plain default rope with the same base.
โ Outputs are reproduced against the original implementation on this checkpoint (max relative difference 1.2e-06), and the checkpoint is covered by the parity harness in the Transformers PR.