/ Модель

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

Контекст
8 192 токена
Параметры
149 млн
Архитектура
modernbert · dense
Базовая модель
ModernBERT-base
Библиотека
sentence-transformers
Опубликована
28 окт 2026

mve-ModernBERT-base-token-pooling

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

Многовекторный текстовый энкодер на базе ModernBERT для семантического поиска документов с оценкой релевантности методом MaxSim.

76скачиваний за 30 дней0лайковвеса обновлены28 окт 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

mve-ModernBERT-base-token-pooling — англоязычный многовекторный энкодер для семантического поиска с поздним взаимодействием токенов. Модель разработана на базе answerdotai/ModernBERT-base и дообучена с новой проекцией размерности 128 на 120 000 триплетах MS MARCO. Она кодирует текст в последовательности нормализованных токенных векторов; релевантность пары запрос–документ оценивается методом MaxSim.

Модель предназначена для поиска документов по коротким запросам, когда важно точное сопоставление отдельных смысловых фрагментов. При кодировании документов можно явно включать и настраивать иерархическое объединение токенных векторов, чтобы уменьшить их количество и хранение векторов в поисковом индексе; запросы остаются без такого объединения. Максимальная длина последовательности — 8192 токена. В описании приведены результаты NanoBEIR и MS MARCO, однако они получены в исследовательских экспериментах с одним seed; сокращение числа векторов само по себе не определяет размер всего индекса или задержку поиска. Лицензия в предоставленных данных не указана.

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

  • семантический поиск документов по короткому запросу
  • ранжирование документов по релевантности запросу
  • построение многовекторного поискового индекса
  • сокращение числа векторов документов при поиске с поздним взаимодействием

Ограничения

Экспериментальные показатели приведены для одного seed и не гарантируют качество на других корпусах. Уменьшение числа векторов не измеряет полный размер поискового индекса или сквозную задержку; объединение токенов для документов нужно настраивать явно.

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

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

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

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

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

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

Открыть на Hugging Face

mve-ModernBERT-base-token-pooling

This multi-vector retrieval model was trained from answerdotai/ModernBERT-base with a fresh 128-dimensional token projection. Its objective averages ordinary contrastive retrieval and retrieval after HierarchicalTokenPooling(pool_factor=4), teaching the encoder to work with approximately one quarter of the original document vectors. Queries remain unpooled.

Training used 120,000 MS MARCO triplets, seed 42, one epoch, batch size 256, encoder mini-batches of 64, a learning rate of 3e-5, and a training length limit of 300. Short queries are expanded to at least 32 token positions. The checkpoint supports other pooling settings at inference, and pooling must be selected explicitly when encoding documents.

This is a Multi-Vector Encoder model trained on the msmarco-bm25 dataset using the sentence-transformers library. It maps inputs to sequences of 128-dimensional token-level vectors and scores them with late interaction (MaxSim), useful for semantic search with late interaction.

Model Details

Model Description

  • Model Type: Multi-Vector Encoder
  • Maximum Sequence Length: 8192 tokens
  • Output Dimensionality: 128 dimensions
  • Similarity Function: MaxSim
  • Supported Modality: Text
  • Training Dataset:
    • msmarco-bm25

Model Sources

Full Model Architecture

MultiVectorEncoder(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'query_expansion': {'strategy': 'min', 'attend': False, 'token': None, 'length': 32}, 'architecture': 'ModernBertModel'})
  (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'token_embeddings', 'module_output_name': 'token_embeddings'})
  (2): MultiVectorMask({'skiplist_words': [], 'skiplist_tasks': ['document'], 'keep_only_token_ids': None})
  (3): Normalize({'module_input_name': 'token_embeddings', 'module_output_name': 'token_embeddings'})
)

Usage

Direct Usage (Sentence Transformers)

from sentence_transformers import MultiVectorEncoder
from sentence_transformers.multi_vector_encoder.modules import HierarchicalTokenPooling

model = MultiVectorEncoder("tomaarsen/mve-ModernBERT-base-token-pooling")
pooling = HierarchicalTokenPooling(pool_factor=4)
query_embeddings = model.encode_query(["How can I make a retrieval index smaller?"])
document_embeddings = model.encode_document(
    [
        "Token pooling merges similar token embeddings into fewer document vectors.",
        "Paris is the capital of France.",
    ],
    token_pooling=pooling,
)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)

Change pool_factor, use max_tokens for a per-document cap, or calibrate a distance_threshold for an average vector budget. Configure one of these controls at a time. The first token is protected by default and all output vectors are normalized.

Evaluation

NanoBEIR across pooling settings

Mean nDCG@10 (%) across all 13 NanoBEIR datasets with FP32 inference. Retention is the pooled mean divided by this model's unpooled mean. Vector savings use unchanged dimensionality and precision.

Pooling at inferenceMean document vectorsnDCG@10 (%)Score retainedVectors saved
Unpooled193.2252.39100.0%0.0%
max_tokens=6454.7650.8997.1%71.7%
max_tokens=3229.5850.1295.7%84.7%
max_tokens=1615.6049.2694.0%91.9%
max_tokens=87.9946.6189.0%95.9%
max_tokens=44.0043.0082.1%97.9%
pool_factor=296.8651.7498.8%49.9%
pool_factor=364.7451.4598.2%66.5%
pool_factor=448.6851.2397.8%74.8%
pool_factor=539.0450.2896.0%79.8%
pool_factor=632.6249.8595.2%83.1%
Adaptive threshold (54.76 mean vectors)54.7651.2497.8%71.7%
Adaptive threshold (29.58 mean vectors)29.5850.9697.3%84.7%
Adaptive threshold (15.60 mean vectors)15.6049.6394.7%91.9%

Proportional token pooling versus the matched ordinary-loss baseline

Adaptive thresholds were calibrated separately for each corpus using unpooled document embeddings to match the average storage of fixed caps of 64, 32, and 16. These are exploratory results from one training seed, and the benchmark informed experiment development. Vector savings do not measure total search index size or end-to-end latency.

The metrics below were recorded by the training-time MS MARCO evaluators.

Metrics

Multi Vector Information Retrieval

MetricValue
maxsim_accuracy@10.3
maxsim_accuracy@30.54
maxsim_accuracy@50.62
maxsim_accuracy@100.76
maxsim_precision@10.3
maxsim_precision@30.18
maxsim_precision@50.124
maxsim_precision@100.076
maxsim_recall@10.3
maxsim_recall@30.54
maxsim_recall@50.62
maxsim_recall@100.76
maxsim_ndcg@100.5204
maxsim_mrr@100.4456
maxsim_map@1000.4573

Multi Vector Information Retrieval

  • Dataset: NanoMSMARCO_pool_factor_4
  • Evaluated with MultiVectorInformationRetrievalEvaluator with these parameters:
    {
        "token_pooling": {
            "type": "sentence_transformers.multi_vector_encoder.modules.token_pooling.HierarchicalTokenPooling",
            "config": {
                "pool_factor": 4,
                "max_tokens": null,
                "distance_threshold": null,
                "num_protected_tokens": 1,
                "normalize_embeddings": true,
                "tasks": [
                    "document"
                ]
            }
        }
    }
    
MetricValue
maxsim_accuracy@10.32
maxsim_accuracy@30.52
maxsim_accuracy@50.58
maxsim_accuracy@100.74
maxsim_precision@10.32
maxsim_precision@30.1733
maxsim_precision@50.116
maxsim_precision@100.074
maxsim_recall@10.32
maxsim_recall@30.52
maxsim_recall@50.58
maxsim_recall@100.74
maxsim_ndcg@100.5097
maxsim_mrr@100.4392
maxsim_map@1000.4522

Training Details

Training Dataset

msmarco-bm25

  • Dataset: msmarco-bm25
  • Size: 120,000 training samples
  • Columns: query, positive, and negative
  • Approximate statistics based on the first 100 samples:
    querypositivenegative
    typestringstringstring
    modalitytexttexttext
    detailsmin: 5 tokensmean: 9.2 tokensmax: 17 tokensmin: 31 tokensmean: 82.7 tokensmax: 187 tokensmin: 19 tokensmean: 83.45 tokensmax: 184 tokens
  • Samples:
    querypositivenegative
    cost to install hardwood floor per roomHow Much Does Hardwood Floors Cost? Installing a standard solid-strip hardwood floor averages about $8 a square foot for materials, insulation and site finishing, and up to $12 a square foot for wide pine planks, or $1,150-$1,750 for a 12x12-foot room. Factory-finished wood starts at $8 a square foot installed, but generally runs $10-$14, or $1,140-$2,000 for a 12x12 space.Cost to Install a Hardwood Floor. 1 Share. 2 Hiring Local Professionals. 3 Sponsored Services. 4 Cost to Install a Hardwood Floor - Notes and General Information. 5 Cost to Install a Hardwood Floor - Unit Price References. 6 Hardwood Floor Installation - Average Cost Per Square Foot. 7 Help the homewyse Community.
    football colleges in georgiaFour-Year Georgia Universities or Colleges With Football Teams. There are 735 four-year colleges and universities that field football teams in the United States as of 2011. Six hundred thirty-nine belong to the National Collegiate Athletic Association's various divisions and 96 to the National Association of Intercollegiate Athletics.NCAA Division II (with football) Colleges in Georgia. If you're looking for Georgia NCAA Division II (with football) literacy rates, CALiteracy.org can help you find the schools with the most to offer. The information found here provides state literacy rates and information for NCAA Division II (with football) colleges across Georgia.
    what does glucosamine sulphate doGlucosamine sulfate is a chemical found in the human body. It is used by the body to produce a variety of other chemicals that are involved in building tendons, ligaments, cartilage, and the thick fluid that surrounds joints. Joints are cushioned by the fluid and cartilage that surround them.or example, the glucosamine sulfate that is put into dietary supplements is often harvested from the shells of shellfish. Glucosamine sulfate used in dietary supplements does not always come from natural sources. It can also be made in a laboratory.“Glucosamine sulphate, which is stabilized with sodium chloride or table salt, can contain as much as 30% sodium,” Keith says. “This is a massive consideration for people who want to reduce their dietary intake of sodium (salt).” Glucosamine HCL and glucosamine sulphate 2KCL do not contain sodium chloride.
  • Loss: MultiVectorTokenPoolingLoss with these parameters:
    {
        "loss": "CachedMultiVectorMultipleNegativesRankingLoss",
        "token_poolings": [
            null,
            "HierarchicalTokenPooling(pool_factor=4, max_tokens=None, distance_threshold=None, num_protected_tokens=1, normalize_embeddings=True, tasks=['document'])"
        ],
        "weights": [
            0.5,
            0.5
        ],
        "n_poolings_per_step": -1
    }
    

Evaluation Dataset

msmarco-bm25

  • Dataset: msmarco-bm25
  • Size: 1,000 evaluation samples
  • Columns: query, positive, and negative
  • Approximate statistics based on the first 100 samples:
    querypositivenegative
    typestringstringstring
    modalitytexttexttext
    detailsmin: 4 tokensmean: 9.0 tokensmax: 15 tokensmin: 35 tokensmean: 79.33 tokensmax: 187 tokensmin: 23 tokensmean: 79.28 tokensmax: 187 tokens
  • Samples:
    querypositivenegative
    how much is a divorce in texasA divorce in Texas takes 61 days from the date of filing. You pay for only the first set of documents ($69.97) that you need to file with the court to start the divorce process. After 30 days you will pay for ($69.97) and receive the second half of the forms.o watch video. The average cost of divorce in the Texas courts is normally between $150 and $300, depending on the county you live in and the services you require.How to budget for a cost friendly divorce in Texas; Cost Cutting Tips for your Texas Divorce; Why do divorces cost so much in Texas? How Can I Get My Spouse to Pay My Attorney's Fees in a Texas Divorce? How am I going to Pay for My Texas Divorce? 8 Tips for Reducing the Cost of a Divorce in Texas; $300 Divorce Cost a Man $100,000 in Texas
    how much does the extended warranty for a volvo costI just bought one I purchased an Easy Care extended warranty from my local Volvo dealer about a week ago. I have a 2004 with 17,500 miles on it. I bought 4 yrs from the date I bought the warranty and a total of 100,000 total miles on the odometer with a zero deductible for $1832. The $100 deductible was between $1300 and $1400.Your car’s in the shop. You anxiously wait for the mechanic to call. How much is it going to cost this time? If this scenario sounds all too familiar, you might consider covering your vehicle with an extended car warranty. But how much does a car warranty cost?
    what type of procedure is used to determine hpvA colposcopy is a procedure that uses a colposcope (a lighted magnifying instrument) to examine the vulva, the vagina and cervix. A colposcopy is done after an abnormal Pap test or a positive HPV test suggests a precancerous condition of the cervix or cervical cancer.Periungual Warts. There are over 100 different strains of HPV identified. The specific strain of HPV that is present will determine what kind of warts will appear. Periungual warts are just one type of the wart family.1.here are over 100 different strains of HPV identified. The specific strain of HPV that is present will determine what kind of warts will appear. Periungual warts are just one type of the wart family.
  • Loss: MultiVectorTokenPoolingLoss with these parameters:
    {
        "loss": "CachedMultiVectorMultipleNegativesRankingLoss",
        "token_poolings": [
            null,
            "HierarchicalTokenPooling(pool_factor=4, max_tokens=None, distance_threshold=None, num_protected_tokens=1, normalize_embeddings=True, tasks=['document'])"
        ],
        "weights": [
            0.5,
            0.5
        ],
        "n_poolings_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 256
  • num_train_epochs: 1
  • learning_rate: 3e-05
  • warmup_steps: 0.05
  • bf16: True
  • per_device_eval_batch_size: 256
  • data_seed: 42
  • batch_sampler: no_duplicates
  • max_length: 300

All Hyperparameters

  • per_device_train_batch_size: 256
  • num_train_epochs: 1
  • max_steps: -1
  • learning_rate: 3e-05
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.05
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 1
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: True
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: trackio
  • per_device_eval_batch_size: 256
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: 42
  • use_cpu: False
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • warmup_ratio: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}
  • max_length: 300

Training Logs

EpochStepTraining LossValidation LossNanoMSMARCO_maxsim_ndcg@10NanoMSMARCO_pool_factor_4_maxsim_ndcg@10
0.0512245.1169---
0.1023481.5040---
0.1535720.8463---
0.200494-0.49340.46400.4658
0.2047960.7092---
0.25591200.6407---
0.30701440.6077---
0.35821680.5839---
0.4009188-0.39140.50070.5104
0.40941920.5508---
0.46062160.5369---
0.51172400.5393---
0.56292640.4945---
0.6013282-0.37200.49740.5141
0.61412880.4989---
0.66523120.4688---
0.71643360.4795---
0.76763600.4878---
0.8017376-0.36260.53740.5160
0.81883840.4654---
0.86994080.4819---
0.92114320.4880---
0.97234560.4486---
1.0469-0.35260.52040.5097

Training Time

  • Training: 33.7 minutes
  • Evaluation: 2.1 minutes
  • Total: 35.8 minutes

Framework Versions

  • Python: 3.12.3
  • Sentence Transformers: 6.3.0.dev0
  • Transformers: 5.4.0
  • PyTorch: 2.11.0+cu128
  • Accelerate: 1.13.0
  • Datasets: 4.8.5
  • Tokenizers: 0.22.2

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",
}

MultiVectorTokenPoolingLoss

@inproceedings{josef2026learntopool,
    title={Learn to Pool: Lightweight Fine-Tuning for Flexible Multi-Vector Compression},
    author={Stefan Josef},
    booktitle={1st Late Interaction Workshop (LIR) at ECIR 2026},
    year={2026},
}

CachedMultiVectorMultipleNegativesRankingLoss

@misc{gao2021scaling,
    title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
    author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
    year={2021},
    eprint={2101.06983},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertModel
Ревизия весов
8e57bd2

0 моделей