Sentence Similarity
sentence-transformers
Safetensors
Transformers.js
MLX
xlm-roberta
feature-extraction
mteb
arctic
snowflake-arctic-embed
Eval Results (legacy)
text-embeddings-inference
Instructions to use mlx-community/snowflake-arctic-embed-l-v2.0-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mlx-community/snowflake-arctic-embed-l-v2.0-4bit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/snowflake-arctic-embed-l-v2.0-4bit") 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 mlx-community/snowflake-arctic-embed-l-v2.0-4bit with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'mlx-community/snowflake-arctic-embed-l-v2.0-4bit'); - MLX
How to use mlx-community/snowflake-arctic-embed-l-v2.0-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir snowflake-arctic-embed-l-v2.0-4bit mlx-community/snowflake-arctic-embed-l-v2.0-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
mlx-community/snowflake-arctic-embed-l-v2.0-4bit
The Model mlx-community/snowflake-arctic-embed-l-v2.0-4bit was converted to MLX format from Snowflake/snowflake-arctic-embed-l-v2.0 using mlx-lm version 0.0.3.
Use with mlx
pip install mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("mlx-community/snowflake-arctic-embed-l-v2.0-4bit")
# For text embeddings
output = generate(model, processor, texts=["I like grapes", "I like fruits"])
embeddings = output.text_embeds # Normalized embeddings
# Compute dot product between normalized embeddings
similarity_matrix = mx.matmul(embeddings, embeddings.T)
print("Similarity matrix between texts:")
print(similarity_matrix)
- Downloads last month
- 65
Hardware compatibility
Log In to add your hardware
Quantized
Evaluation results
- accuracy on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported67.039
- f1 on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported55.181
- f1_weighted on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported73.411
- ap on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported17.991
- ap_weighted on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported17.991
- main_score on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported67.039
- accuracy on MTEB AmazonCounterfactualClassification (en)test set self-reported65.597
- f1 on MTEB AmazonCounterfactualClassification (en)test set self-reported60.244