Sentence Similarity
sentence-transformers
ONNX
Safetensors
GGUF
Transformers.js
bert
feature-extraction
mteb
arctic
snowflake-arctic-embed
Eval Results (legacy)
text-embeddings-inference
Instructions to use Snowflake/snowflake-arctic-embed-m-v1.5 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-v1.5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Snowflake/snowflake-arctic-embed-m-v1.5") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers.js
How to use Snowflake/snowflake-arctic-embed-m-v1.5 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-v1.5'); - llama-cpp-python
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Snowflake/snowflake-arctic-embed-m-v1.5", filename="gguf/snowflake-arctic-embed-m-v1.5-bf16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16 # Run inference directly in the terminal: llama-cli -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16 # Run inference directly in the terminal: llama-cli -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16 # Run inference directly in the terminal: ./llama-cli -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Snowflake/snowflake-arctic-embed-m-v1.5:BF16
Use Docker
docker model run hf.co/Snowflake/snowflake-arctic-embed-m-v1.5:BF16
- LM Studio
- Jan
- Ollama
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with Ollama:
ollama run hf.co/Snowflake/snowflake-arctic-embed-m-v1.5:BF16
- Unsloth Studio new
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Snowflake/snowflake-arctic-embed-m-v1.5 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Snowflake/snowflake-arctic-embed-m-v1.5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Snowflake/snowflake-arctic-embed-m-v1.5 to start chatting
- Docker Model Runner
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with Docker Model Runner:
docker model run hf.co/Snowflake/snowflake-arctic-embed-m-v1.5:BF16
- Lemonade
How to use Snowflake/snowflake-arctic-embed-m-v1.5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Snowflake/snowflake-arctic-embed-m-v1.5:BF16
Run and chat with the model
lemonade run user.snowflake-arctic-embed-m-v1.5-BF16
List all available models
lemonade list
Specify add_pooling_layer=False via configuration instead
#5
by tomaarsen HF Staff - opened
- README.md +1 -3
- sentence_bert_config.json +4 -1
README.md
CHANGED
|
@@ -8722,9 +8722,7 @@ queries = ['what is snowflake?', 'Where can I get the best tacos?']
|
|
| 8722 |
documents = ['The Data Cloud!', 'Mexico City of Course!']
|
| 8723 |
|
| 8724 |
# Load the model.
|
| 8725 |
-
model = SentenceTransformer(
|
| 8726 |
-
MODEL_ID, model_kwargs=dict(add_pooling_layer=False),
|
| 8727 |
-
)
|
| 8728 |
|
| 8729 |
# Generate text embeddings.
|
| 8730 |
query_embeddings = model.encode(queries, prompt_name="query")
|
|
|
|
| 8722 |
documents = ['The Data Cloud!', 'Mexico City of Course!']
|
| 8723 |
|
| 8724 |
# Load the model.
|
| 8725 |
+
model = SentenceTransformer(MODEL_ID)
|
|
|
|
|
|
|
| 8726 |
|
| 8727 |
# Generate text embeddings.
|
| 8728 |
query_embeddings = model.encode(queries, prompt_name="query")
|
sentence_bert_config.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"max_seq_length": 512,
|
| 3 |
-
"do_lower_case": false
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"max_seq_length": 512,
|
| 3 |
+
"do_lower_case": false,
|
| 4 |
+
"model_args": {
|
| 5 |
+
"add_pooling_layer": false
|
| 6 |
+
}
|
| 7 |
}
|