/ Модель

Характеристики

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Опубликована
3 июл 2024

snowflake-arctic-embed-m-v1.5

ЭмбеддингиТекст → embedding9 профессий

snowflake-arctic-embed-m-v1.5 — модель для создания векторных представлений текста, разработанная Snowflake.

168 тыс.скачиваний за 30 дней73лайкавеса обновлены24 апр 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки33

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • MIRACLRetrievalHardNegatives

    main_score

    Результат

    0,0187

    MTEB

    Публичная таблицадругая ревизия

  • MassiveScenarioClassification

    main_score

    Результат

    0,2626

    Общий результат 0,4177Общий результат 0,3815Общий результат 0,0739
    MTEB

    Публичная таблицадругая ревизия

  • QuoraRetrieval

    main_score

    Результат

    0,8737

    MTEB

    Публичная таблицаревизия не подтверждена

  • NusaTranslationBitextMining

    main_score

    Результат

    0,5474

    MTEB

    Публичная таблицадругая ревизия

  • IndicCrosslingualSTS

    main_score

    Результат

    0,2591

    MTEB

    Публичная таблицадругая ревизия

  • IN22GenBitextMining

    Среднее по поднаборам

    Результат

    0,0284

    MTEB

    Расчёт каталогадругая ревизия

  • XNLI

    main_score

    Результат

    0,529

    MTEB

    Публичная таблицадругая ревизия

  • QASPER

    main_score

    Результат

    0,4965

    MTEB

    Публичная таблицадругая ревизия

  • MemBench

    main_score

    Результат

    0,8682

    Общий результат 0,3691
    MTEB

    Публичная таблицадругая ревизия

  • SIB200ClusteringS2S

    main_score

    Результат

    0,0242

    Общий результат 0,0869Общий результат 0,0259Общий результат 0,0239
    MTEB

    Публичная таблицадругая ревизия

  • IndicGenBenchFloresBitextMining

    main_score

    Результат

    0,0201

    Общий результат 0,0239
    MTEB

    Публичная таблицадругая ревизия

  • MLQARetrieval

    main_score

    Результат

    0,0257

    Общий результат 0,0922
    MTEB

    Публичная таблицадругая ревизия

  • Tatoeba

    main_score

    Результат

    0,0237

    Общий результат 0,0516
    MTEB

    Публичная таблицадругая ревизия

  • MasakhaNEWSClusteringP2P

    main_score

    Результат

    0,3233

    Общий результат 0,4881Общий результат 0,481Общий результат 0,3428
    MTEB

    Публичная таблицадругая ревизия

  • XQuADRetrieval

    main_score

    Результат

    0,3333

    Общий результат 0,0924
    MTEB

    Публичная таблицадругая ревизия

  • MemGovern

    main_score

    Результат

    0,8815

    MTEB

    Публичная таблицадругая ревизия

  • EPBench

    main_score

    Результат

    0,9372

    Общий результат 1Общий результат 0,9114
    MTEB

    Публичная таблицадругая ревизия

  • XMarket

    main_score

    Результат

    0,1949

    MTEB

    Публичная таблицадругая ревизия

  • CodeEditSearchRetrieval

    main_score

    Результат

    0,5941

    MTEB

    Публичная таблицадругая ревизия

  • MintakaRetrieval

    main_score

    Результат

    0,1933

    MTEB

    Публичная таблицадругая ревизия

  • LMEBMLDR

    main_score

    Результат

    0,8228

    MTEB

    Публичная таблицадругая ревизия

  • ArguAna-NL.v2

    main_score

    Результат

    0,2878

    MTEB

    Публичная таблицадругая ревизия

  • MIRACLReranking

    main_score

    Результат

    0,3082

    MTEB

    Публичная таблицадругая ревизия

  • CovidQA

    main_score

    Результат

    0,7675

    MTEB

    Публичная таблицадругая ревизия

  • RTE3

    main_score

    Результат

    0,8641

    MTEB

    Публичная таблицадругая ревизия

  • LEMBPasskeyRetrieval

    main_score

    Результат

    0,82

    MTEB

    Публичная таблицадругая ревизия

  • SummEval

    main_score

    Результат

    0,3036

    MTEB

    Публичная таблицаревизия не подтверждена

  • SpanishPassageRetrievalS2S

    main_score

    Результат

    0,4342

    MTEB

    Публичная таблицадругая ревизия

  • MasakhaNEWSClusteringS2S

    main_score

    Результат

    0,3277

    MTEB

    Публичная таблицадругая ревизия

  • ArguAna

    main_score

    Результат

    0,5953

    MTEB

    Публичная таблицадругая ревизия

  • HeadlineClassification

    main_score

    Результат

    0,3034

    MTEB

    Публичная таблицадругая ревизия

  • MassiveIntentClassification

    main_score

    Результат

    0,3647

    Общий результат 0,0156
    MTEB

    Публичная таблицадругая ревизия

  • NovelQA

    main_score

    Результат

    0,2511

    MTEB

    Публичная таблицадругая ревизия

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Она предназначена для задач семантического сходства, поиска и ранжирования текстов, а также других сценариев, где требуется сравнивать смысловое соответствие предложений или документов. Модель доступна для использования через экосистему sentence-transformers и Transformers.js.

В README не указаны архитектура, число параметров, поддерживаемые языки, максимальная длина контекста и перечень модальностей, поэтому эти характеристики нельзя надёжно описать. Модель относится к классу текстовых embedding-моделей и не предназначена для генерации текста. В качестве ориентира приведён результат на тесте MTEB ArguAna: основной показатель составляет 59,53. Модель распространяется по лицензии Apache-2.0.

Для каких профессий подходит9

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

News

12/11/2024: Release of Technical Report for 2.0 model

12/04/2024: Release of L-2.0 and M-2.0

07/26/2024: Release preprint [2407.18887] Embedding And Clustering Your Data Can Improve Contrastive Pretraining on arXiv.

07/18/2024: Release of snowflake-arctic-embed-m-v1.5, capable of producing highly compressible embedding vectors that preserve quality even when squished as small as 128 bytes per vector. Details about the development of this model are available in the launch post on the Snowflake engineering blog.

05/10/2024: Release of the technical report on Arctic Embed

04/16/2024: Original release the snowflake-arctic-embed family of text embedding models.

This Model

This model is an updated version of snowflake-arctic-embed-m designed to improve embedding vector compressibility. This model achieves a slightly higher performance overall without compression, and it is additionally capable of retaining most of its retrieval quality even down to 128 byte embedding vectors through a combination of Matryoshka Representation Learning (MRL) and uniform scalar quanitization.

Model NameMTEB Retrieval Score (NDCG @ 10)
snowflake-arctic-embed-m-v1.555.14
snowflake-arctic-embed-m54.91

Compared to several other models trained with MRL to produce 256-dimensional embedding vectors, snowflake-arctic-embed-m-v1.5 retains a higher degree of original model quality and delivers better retrieval quality on the MTEB Retrieval benchmark.

ModelModel ParametersMTEB Retrieval Score at 256 Dimensions (fraction of arctic-embed-m-v1.5)
Snowflake arctic-embed-m-v1.5109M54.2 (100%)
Google gecko1200M52.4 (97%)
OpenAI text-embedding-3-largeNot Published51.7 (95%)
Nomic nomic-embed-text-v1.5138M50.8 (94%)

Additionally, this model was designed to pair well with a corpus-independent scalar quantization scheme to achieve great performance even in as little as 128 bytes per vector (24x compression compared to 768 dimensional vectors stored in float32).

Model VersionDimensionalityScalar QuantizationBytes Per Vector (fraction of baseline)MTEB Retrieval Score (fraction of baseline)Vectors Per GB (improvement over baseline)
v1768None (float32)3072 (100%)54.9 (100%)0.33M (1.0x)
v1768int8768 (25%)54.9 (100%)1.3M (4x)
v1.5768int8768 (25%)55.1 (100%)1.3M (4x)
v1.5256int8256 (8.3%)54.2 (99%)3.9M (12x)
v1.5256int4128 (4.2%)53.7 (98%)7.8M (24x)

NOTE: Good uniform scalar quantization ranges to use with this model (and which were used in the eval above), are -0.18 to +0.18 for 4bit and -0.3 to +0.3 for 8bit. For a detailed walkthrough of using integer quantization with snowflake-arctic-embed-m-v1.5, check out our example notebook on GitHub.

Usage

Using Sentence Transformers

You can use the sentence-transformers package to use any of the snowflake-arctic-embed models. Here's an example for snowflake-arctic-embed-m-v1.5.

import torch
from sentence_transformers import SentenceTransformer
from torch.nn.functional import normalize

# Model constant.
MODEL_ID = "Snowflake/snowflake-arctic-embed-m-v1.5"

# Your queries and docs.
queries = ['what is snowflake?', 'Where can I get the best tacos?']
documents = ['The Data Cloud!', 'Mexico City of Course!']

# Load the model.
model = SentenceTransformer(MODEL_ID)

# Generate text embeddings.
query_embeddings = model.encode(queries, prompt_name="query")
document_embeddings = model.encode(documents)

# Scores via dotproduct.
scores = query_embeddings @ document_embeddings.T

# Pretty-print the results.
for query, query_scores in zip(queries, scores):
    doc_score_pairs = list(zip(documents, query_scores))
    doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)
    print(f'Query: "{query}"')
    for document, score in doc_score_pairs:
        print(f'Score: {score:.4f} | Document: "{document}"')
    print()

#### OUTPUT ####
# Query: "what is snowflake?"
# Score: 0.3521 | Document: "The Data Cloud!"
# Score: 0.2358 | Document: "Mexico City of Course!"

# Query: "Where can I get the best tacos?"
# Score: 0.3884 | Document: "Mexico City of Course!"
# Score: 0.2389 | Document: "The Data Cloud!"
#

#### Variation: Truncated Embeddings ####
query_embeddings_256 = normalize(torch.from_numpy(query_embeddings)[:, :256])
document_embeddings_256 = normalize(torch.from_numpy(document_embeddings)[:, :256])
scores_256 = query_embeddings_256 @ document_embeddings_256.T

# Pretty-print the results.
for query, query_scores in zip(queries, scores_256):
    doc_score_pairs = sorted(zip(documents, query_scores), key=lambda x: x[1], reverse=True)
    print(f'Query: "{query}"')
    for document, score in doc_score_pairs:
        print(f'Score: {score:.4f} | Document: "{document}"')
    print()

#### OUTPUT ####
# Query: "what is snowflake?"
# Score: 0.3852 | Document: "The Data Cloud!"
# Score: 0.2721 | Document: "Mexico City of Course!"

# Query: "Where can I get the best tacos?"
# Score: 0.4337 | Document: "Mexico City of Course!"
# Score: 0.2886 | Document: "The Data Cloud!"
#

Using Huggingface transformers

You can use the transformers package to use an snowflake-arctic-embed model, too. For optimal retrieval quality, remember to use the CLS token for embeddings and to use the query prefix below (just on the query).

import torch
from torch.nn.functional import normalize
from transformers import AutoModel, AutoTokenizer

# Model constants.
MODEL_ID = "Snowflake/snowflake-arctic-embed-m-v1.5"
QUERY_PREFIX = 'Represent this sentence for searching relevant passages: '

# Your queries and docs.
queries  = ['what is snowflake?', 'Where can I get the best tacos?']
documents = ['The Data Cloud!', 'Mexico City of Course!']

# Load the model and tokenizer.
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModel.from_pretrained(MODEL_ID, add_pooling_layer=False)
model.eval()

# Add query prefix and tokenize queries and docs.
queries_with_prefix = [f"{QUERY_PREFIX}{q}" for q in queries]
query_tokens = tokenizer(queries_with_prefix, padding=True, truncation=True, return_tensors='pt', max_length=512)
document_tokens =  tokenizer(documents, padding=True, truncation=True, return_tensors='pt', max_length=512)

# Use the model to generate text embeddings.
with torch.inference_mode():
    query_embeddings = model(**query_tokens)[0][:, 0]
    document_embeddings = model(**document_tokens)[0][:, 0]

# Remember to normalize embeddings.
query_embeddings = normalize(query_embeddings)
document_embeddings = normalize(document_embeddings)

# Scores via dotproduct.
scores = query_embeddings @ document_embeddings.T

# Pretty-print the results.
for query, query_scores in zip(queries, scores):
    doc_score_pairs = list(zip(documents, query_scores))
    doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)
    print(f'Query: "{query}"')
    for document, score in doc_score_pairs:
        print(f'Score: {score:.4f} | Document: "{document}"')
    print()

#### OUTPUT ####
# Query: "what is snowflake?"
# Score: 0.3521 | Document: "The Data Cloud!"
# Score: 0.2358 | Document: "Mexico City of Course!"

# Query: "Where can I get the best tacos?"
# Score: 0.3884 | Document: "Mexico City of Course!"
# Score: 0.2389 | Document: "The Data Cloud!"
#

#### Variation: Truncated Embeddings ####
query_embeddings_256 = normalize(query_embeddings[:, :256])
document_embeddings_256 = normalize(document_embeddings[:, :256])
scores_256 = query_embeddings_256 @ document_embeddings_256.T

# Pretty-print the results.
for query, query_scores in zip(queries, scores_256):
    doc_score_pairs = sorted(zip(documents, query_scores), key=lambda x: x[1], reverse=True)
    print(f'Query: "{query}"')
    for document, score in doc_score_pairs:
        print(f'Score: {score:.4f} | Document: "{document}"')
    print()

#### OUTPUT ####
# Query: "what is snowflake?"
# Score: 0.3852 | Document: "The Data Cloud!"
# Score: 0.2721 | Document: "Mexico City of Course!"

# Query: "Where can I get the best tacos?"
# Score: 0.4337 | Document: "Mexico City of Course!"
# Score: 0.2886 | Document: "The Data Cloud!"
#

Using Transformers.js

If you haven't already, you can install the Transformers.js JavaScript library from NPM by running:

npm i @xenova/transformers

You can then use the model to compute embeddings as follows:

import { pipeline, dot } from '@xenova/transformers';

// Create feature extraction pipeline
const extractor = await pipeline('feature-extraction', 'Snowflake/snowflake-arctic-embed-m-v1.5', {
    quantized: false, // Comment out this line to use the quantized version
});

// Generate sentence embeddings
const sentences = [
    'Represent this sentence for searching relevant passages: Where can I get the best tacos?',
    'The Data Cloud!',
    'Mexico City of Course!',
]
const output = await extractor(sentences, { normalize: true, pooling: 'cls' });

// Compute similarity scores
const [source_embeddings, ...document_embeddings ] = output.tolist();
const similarities = document_embeddings.map(x => dot(source_embeddings, x));
console.log(similarities); // [0.15664823859882132, 0.24481869975470627]

Compressing to 128 bytes

This model is designed to generate embeddings which compress well down to 128 bytes via a two-part compression scheme:

  1. Truncation and renormalization to 256 dimensions (a la Matryoskha Representation Learning, see the original paper for reference).
  2. 4-bit uniform scalar quantization of all 256 values to the same range (-0.18 to +0.18).
    • For 8-bit uniform scalar quantization, the slightly wider range -0.3 to +0.3 tends to work slightly better given how much more granular 8-bit quantization is.

For an in-depth examples, check out our arctic-embed GitHub repositiory.

FAQ

TBD

Contact

Feel free to open an issue or pull request if you have any questions or suggestions about this project. You also can email Daniel Campos(daniel.campos@snowflake.com).

License

Arctic is licensed under the Apache-2. The released models can be used for commercial purposes free of charge.

Acknowledgement

We want to thank the open-source community, which has provided the great building blocks upon which we could make our models. We thank our modeling engineers, Danmei Xu, Luke Merrick, Gaurav Nuti, and Daniel Campos, for making these great models possible. We thank our leadership, Himabindu Pucha, Kelvin So, Vivek Raghunathan, and Sridhar Ramaswamy, for supporting this work. We also thank the open-source community for producing the great models we could build on top of and making these releases possible. Finally, we thank the researchers who created BEIR and MTEB benchmarks. It is largely thanks to their tireless work to define what better looks like that we could improve model performance.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
BertModel
Ревизия весов
e58a8f7

0 моделей