/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
co-condenser-marco
Библиотека
sentence-transformers
Опубликована
13 июн 2025

splade-cocondenser-msmarco-margin-mse-minilm-small-old

ЭмбеддингиТекст → embedding

Англоязычный разреженный SPLADE-кодировщик для представления текста в виде векторов и поиска релевантных документов.

101скачиваний за 30 дней0лайковвеса обновлены13 июн 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

В подключённых источниках результатов для этой модели пока нет.

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

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

Это англоязычный разреженный кодировщик SPLADE, разработанный tomaarsen и дообученный на базе Luyu/co-condenser-marco с помощью Sentence Transformers. Он кодирует предложения и абзацы в разреженные векторы размерности 30 522, пригодные для семантического поиска и разреженного поиска документов; сходство вычисляется скалярным произведением. Архитектура объединяет BERT с маскированным языковым моделированием и пулинг SPLADE с ReLU и максимумом по токенам.

Модель принимает текст длиной до 512 токенов, поддерживает английский язык и распространяется по лицензии Apache-2.0. В карточке приведены оценки на небольших наборах NanoMSMARCO, NanoNFCorpus, NanoNQ и NanoBEIR; они дают ориентир, но не заменяют проверку на данных конкретного приложения.

Сценарии применения

  • поиск документов по текстовому запросу
  • построение разреженного поискового индекса
  • поиск релевантных абзацев в коллекции текстов
  • извлечение кандидатов для последующего ранжирования

Ограничения

Модель рассчитана на английский язык и ограничена последовательностями до 512 токенов. Приведённые в карточке оценки относятся к небольшим тестовым наборам и могут не отражать качество на целевых данных.

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

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

Открыть на Hugging Face

CoCondenser trained on MS MARCO

This is a SPLADE Sparse Encoder model finetuned from Luyu/co-condenser-marco using the sentence-transformers library. It maps sentences & paragraphs to a 30522-dimensional sparse vector space and can be used for semantic search and sparse retrieval.

Model Details

Model Description

  • Model Type: SPLADE Sparse Encoder
  • Base model: Luyu/co-condenser-marco
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 30522 dimensions
  • Similarity Function: Dot Product
  • Language: en
  • License: apache-2.0

Model Sources

Full Model Architecture

SparseEncoder(
  (0): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False}) with MLMTransformer model: BertForMaskedLM 
  (1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SparseEncoder

# Download from the 🤗 Hub
model = SparseEncoder("tomaarsen/splade-cocondenser-msmarco-margin-mse-minilm")
# Run inference
queries = [
    "what causes aging fast",
]
documents = [
    'UV-A light, specifically, is what mainly causes tanning, skin aging, and cataracts, UV-B causes sunburn, skin aging and skin cancer, and UV-C is the strongest, and therefore most effective at killing microorganisms. Again â\x80\x93 single words and multiple bullets.',
    "Answers from Ronald Petersen, M.D. Yes, Alzheimer's disease usually worsens slowly. But its speed of progression varies, depending on a person's genetic makeup, environmental factors, age at diagnosis and other medical conditions. Still, anyone diagnosed with Alzheimer's whose symptoms seem to be progressing quickly â\x80\x94 or who experiences a sudden decline â\x80\x94 should see his or her doctor.",
    "Bell's palsy and Extreme tiredness and Extreme fatigue (2 causes) Bell's palsy and Extreme tiredness and Hepatitis (2 causes) Bell's palsy and Extreme tiredness and Liver pain (2 causes) Bell's palsy and Extreme tiredness and Lymph node swelling in children (2 causes)",
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]

# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[11.2444, 10.6804,  4.3465]])

Evaluation

Metrics

Sparse Information Retrieval

MetricNanoMSMARCONanoNFCorpusNanoNQ
dot_accuracy@10.420.440.48
dot_accuracy@30.660.640.74
dot_accuracy@50.760.640.8
dot_accuracy@100.840.680.88
dot_precision@10.420.440.48
dot_precision@30.220.39330.2533
dot_precision@50.1520.3360.168
dot_precision@100.0840.270.094
dot_recall@10.420.04390.46
dot_recall@30.660.09870.7
dot_recall@50.760.11410.76
dot_recall@100.840.14010.84
dot_ndcg@100.63120.34450.664
dot_mrr@100.56370.53220.6205
dot_map@1000.57210.15660.6042
query_active_dims21.117.9225.1
query_sparsity_ratio0.99930.99940.9992
corpus_active_dims157.6907311.426194.1861
corpus_sparsity_ratio0.99480.98980.9936

Sparse Nano BEIR

  • Dataset: NanoBEIR_mean
  • Evaluated with SparseNanoBEIREvaluator with these parameters:
    {
        "dataset_names": [
            "msmarco",
            "nfcorpus",
            "nq"
        ]
    }
    
MetricValue
dot_accuracy@10.4467
dot_accuracy@30.68
dot_accuracy@50.7333
dot_accuracy@100.8
dot_precision@10.4467
dot_precision@30.2889
dot_precision@50.2187
dot_precision@100.1493
dot_recall@10.308
dot_recall@30.4862
dot_recall@50.5447
dot_recall@100.6067
dot_ndcg@100.5466
dot_mrr@100.5721
dot_map@1000.4443
query_active_dims21.3733
query_sparsity_ratio0.9993
corpus_active_dims206.6305
corpus_sparsity_ratio0.9932

Training Details

Training Dataset

Unnamed Dataset

  • Size: 90,000 training samples
  • Columns: query, positive, negative, and score
  • Approximate statistics based on the first 1000 samples:
    querypositivenegativescore
    typestringstringstringfloat
    detailsmin: 4 tokensmean: 9.22 tokensmax: 36 tokensmin: 15 tokensmean: 79.27 tokensmax: 247 tokensmin: 16 tokensmean: 81.15 tokensmax: 201 tokensmin: -14.32mean: 4.62max: 21.72
  • Samples:
    querypositivenegativescore
    most powerful army in the worldU.S. Army Reserve Command You may be asking yourself, “What is the Army Reserve?” The Army is the most powerful and sophisticated military force in the world.The British Royal Navy was the most powerful sea-going force by the time of World War 1 (1914-1918) and this was well-underst...2.919867515563965
    define vasomotorDefine peripheral neuropathy: a disease or degenerative state of the peripheral nerves in which motor, sensory, or vasomotor nerve fibers may be… a disease or degenerative state of the peripheral nerves in which motor, sensory, or vasomotor nerve fibers may be affected and which is marked…Vairāgya (Devanagari: वैराग्य, also spelt Vairagya) is a Sanskrit term used in Hindu philosophy that roughly translates as dispassion, detachment, or renunciation, in particular renunciation from the pains and pleasures in the material world (Maya).3.0037026405334473
    nitrates definition biologyIn Botany or Plant Biology. By Photosynthesis, the palisade cells make glucose which has many uses including: storage as starch, to make fat, to make cellulose and to make protein. Glucose is converted w…ith mineral slat nitrates to make the protein. Nitrates provide the essential nitrogen to make protein. The Ribosome, an organelle of the plant cell, manufactures most of the cell's protein.Almost all inorganic nitrate salts are soluble in water at standard temperature and pressure. A common example of an inorganic nitrate salt is potassium nitrate (saltpeter). A rich source of inorganic nitrate in the human body comes from diets rich in leafy green foods, such as spinach and arugula.It is now believed that dietary nitrate in the form of plant-based foods is converted in the body to nitrite.itrate is a polyatomic ion with the molecular formula NO 3 − and a molecular mass of 62.0049 g/mol.-1.6804794073104858
  • Loss: SpladeLoss with these parameters:
    {
        "loss": "SparseMarginMSELoss",
        "lambda_corpus": 0.08,
        "lambda_query": 0.1
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 10,000 evaluation samples
  • Columns: query, positive, negative, and score
  • Approximate statistics based on the first 1000 samples:
    querypositivenegativescore
    typestringstringstringfloat
    detailsmin: 4 tokensmean: 9.01 tokensmax: 35 tokensmin: 17 tokensmean: 79.8 tokensmax: 336 tokensmin: 18 tokensmean: 81.3 tokensmax: 273 tokensmin: -15.9mean: 4.91max: 21.67
  • Samples:
    querypositivenegativescore
    femoral artery definitionmedical Definition of circumflex artery : any of several paired curving arteries: as a: either of two arteries that branch from the deep femoral artery or from the femoral artery itself:Femoral vein. The femoral vein is located in the upper thigh and pelvic region of the human body. It travels in close proximity to the femoral artery. This vein is one of the larger vessels in the venous system. Instead of draining deoxygenated blood from specific parts of the body, it receives blood from several significant branches. These include popliteal, the profunda femoris, and the great sapheneous veins.-0.1968388557434082
    what causes mastitis and how do you treat itMastitis is an infection of the tissue of the breast that occurs most frequently during the time of breastfeeding. This infection causes pain, swelling, redness, and increased temperature of the breast. It can occur when bacteria, often from the infant's mouth, enter a milk duct through a crack in the nipple. This causes an infection and painful inflammation of the breast.Common causes of mastitis include bacteria from the baby’s mouth, bacteria entering via breast injuries (bruising, fissures, cracks in the nipple), milk stasis (milk pooling in the breast), and bacteria from the hands of the mother or health care provider.-0.8143405914306641
    what is a buck mothBuck moth caterpillars that have a light background color can be confused with both the Nevada buck moth, Hemileuca nevadensis Stretch, and the New England buck moth, Hemileuca lucina Henry Edwards. The larvae of these three species can best be distinguished based on the preferred host plants (Wagner 2005).hey rely on resources that are acquired by the caterpillars (larvae). The caterpillars are robust and can exceed four inches (10 cm) in North America. Figure 4. Adult cecropia moth, Hyalophora cecropia (Linnaeus). Photograph by Pennsylvania Department of Conservation and Natural Resources-Forestry Archive, Bugwood.org.bucktail that gets talked about quietly in the . privacy of remote cabins. The “Musky-Teer” is a big fish bait that anglers treasure in their collection. You won’t find these at your local bait shop but we’ve been stocking these highly prized baits in all colors for years.11.004357814788818
  • Loss: SpladeLoss with these parameters:
    {
        "loss": "SparseMarginMSELoss",
        "lambda_corpus": 0.08,
        "lambda_query": 0.1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • learning_rate: 2e-05
  • num_train_epochs: 1
  • warmup_ratio: 0.1
  • fp16: True
  • batch_sampler: no_duplicates

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 2e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 1
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.1
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • use_ipex: False
  • bf16: False
  • fp16: True
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

EpochStepTraining LossValidation LossNanoMSMARCO_dot_ndcg@10NanoNFCorpus_dot_ndcg@10NanoNQ_dot_ndcg@10NanoBEIR_mean_dot_ndcg@10
0.0178100501776.8-----
0.03562009740.8356-----
0.053330061.9771-----
0.071140037.6145-----
0.088950028.888724.49530.48780.30470.54250.4450
0.106760024.7991-----
0.124470022.1517-----
0.142280022.0889-----
0.1690020.7825-----
0.1778100020.085618.63830.57510.33030.61000.5051
0.1956110018.6968-----
0.2133120020.5069-----
0.2311130019.8162-----
0.2489140019.1892-----
0.2667150017.502418.06980.57500.32810.62220.5084
0.2844160017.7801-----
0.3022170017.9045-----
0.32180016.3731-----
0.3378190016.293-----
0.3556200016.116714.54280.56960.34220.62320.5116
0.3733210016.561-----
0.3911220016.5533-----
0.4089230014.9371-----
0.4267240015.565-----
0.4444250014.214315.20270.60710.33760.66000.5349
0.4622260013.7188-----
0.48270014.8554-----
0.4978280015.1021-----
0.5156290013.3032-----
0.5333300013.899912.96090.58740.34230.65620.5286
0.5511310012.7418-----
0.5689320012.9422-----
0.5867330013.6937-----
0.6044340013.1183-----
0.6222350012.799812.20240.62620.34240.67710.5486
0.64360012.7799-----
0.6578370012.2294-----
0.6756380013.6836-----
0.6933390013.579-----
0.7111400012.633713.98780.61560.34350.65260.5372
0.7289410012.682-----
0.7467420012.2157-----
0.7644430012.3127-----
0.7822440011.7435-----
0.8450012.08612.36850.62620.33860.67820.5477
0.8178460012.5455-----
0.8356470011.7477-----
0.8533480011.9948-----
0.8711490011.8997-----
0.8889500012.162412.82770.62410.35150.67400.5499
0.9067510011.4352-----
0.9244520010.9171-----
0.9422530011.3242-----
0.96540011.437-----
0.9778550011.314111.64100.63660.34410.66050.5471
0.9956560011.8683-----
-1-1--0.63120.34450.66400.5466

Environmental Impact

Carbon emissions were measured using CodeCarbon.

  • Energy Consumed: 0.225 kWh
  • Carbon Emitted: 0.088 kg of CO2
  • Hours Used: 0.653 hours

Training Hardware

  • On Cloud: No
  • GPU Model: 1 x NVIDIA GeForce RTX 3090
  • CPU Model: 13th Gen Intel(R) Core(TM) i7-13700K
  • RAM Size: 31.78 GB

Framework Versions

  • Python: 3.11.6
  • Sentence Transformers: 4.2.0.dev0
  • Transformers: 4.52.4
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.5.1
  • Datasets: 2.21.0
  • Tokenizers: 0.21.1

Citation

BibTeX

Sentence Transformers

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

SpladeLoss

@misc{formal2022distillationhardnegativesampling,
      title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
      author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
      year={2022},
      eprint={2205.04733},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2205.04733},
}

SparseMarginMSELoss

@misc{hofstätter2021improving,
    title={Improving Efficient Neural Ranking Models with Cross-Architecture Knowledge Distillation},
    author={Sebastian Hofstätter and Sophia Althammer and Michael Schröder and Mete Sertkan and Allan Hanbury},
    year={2021},
    eprint={2010.02666},
    archivePrefix={arXiv},
    primaryClass={cs.IR}
}

FlopsLoss

@article{paria2020minimizing,
    title={Minimizing flops to learn efficient sparse representations},
    author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
    journal={arXiv preprint arXiv:2004.05665},
    year={2020}
    }

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

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

GPU в ailist

Универсальный рантайм · sentence-transformers

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

Подбираем GPU…

Класс архитектуры
BertForMaskedLM
Ревизия весов
45edbe8

0 моделей