Sentence Similarity
sentence-transformers
ONNX
Safetensors
Transformers.js
bert
feature-extraction
mteb
arctic
snowflake-arctic-embed
Eval Results (legacy)
text-embeddings-inference
Instructions to use Snowflake/snowflake-arctic-embed-s with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Snowflake/snowflake-arctic-embed-s with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Snowflake/snowflake-arctic-embed-s") 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-s with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'Snowflake/snowflake-arctic-embed-s'); - Inference
- Notebooks
- Google Colab
- Kaggle
ONNX Conversion script
#10
by ha1772007 - opened
Can you provide the script by which this model is converted to q4
I believe he uses quantize.py, I think in particular these lines are in charge of the q4 quantization: https://github.com/xenova/transformers.js/blob/v3/scripts/quantize.py#L188-L208
P.s. are you getting good results with that quantization?
Yes Quantization is increasing good speed especially on CPU
comparison between float32 and float16 -> 99% similarity
comparison between float32 and int8 -> 97% similarity
I calculated Similarity on over 80+ 2000 characters long text pieces by cosine similarity
ha1772007 changed discussion status to closed
ha1772007 changed discussion status to open
spacemanidol changed discussion status to closed