/ Модель

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

Контекст
512 токенов
Параметры
25,9 млн
Архитектура
bert · dense
Базовая модель
all-MiniLM-L6-v2
Библиотека
sentence-transformers
Опубликована
25 фев 2025

embedding-model-midterm-submission-updated

ЭмбеддингиТекст → embedding9 профессий
8скачиваний за 30 дней0лайковвеса обновлены25 фев 2025

Описание модели

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

Дообученный энкодер BERT преобразует предложения и абзацы в векторы для сравнения семантического сходства и поиска похожих текстов.

Это дообученный энкодер предложений на базе sentence-transformers/all-MiniLM-L6-v2, разработанный автором репозитория dabraldeepti25. Модель построена на архитектуре BERT и Sentence Transformers: усредняет токенные представления, нормализует результат и отображает предложения и абзацы в плотные векторы размерностью 384. Для сравнения используется косинусное сходство; максимальная длина последовательности в README — 256 токенов, а метаданные указывают контекст до 512 токенов.

Модель предназначена для вычисления семантического сходства и поиска похожих текстов; в README также указаны семантический поиск, поиск перефразировок, классификация и кластеризация. В качестве обучающих данных описана выборка из 1 164 пар предложений. Приведённая оценка Spearman для косинусного сходства составляет 0,1023, поэтому качество на этой проверке выглядит ограниченным и требует оценки на целевых данных. Репозиторий содержит веса Safetensors; лицензия в предоставленных сведениях не указана.

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

  • поиск семантически похожих предложений
  • поиск перефразировок
  • ранжирование текстов по сходству
  • кластеризация коротких текстов
  • извлечение векторов для текстовой классификации

Ограничения

В README приведена низкая оценка Spearman 0,1023 на описанной проверке, поэтому пригодность для конкретной задачи следует оценивать отдельно. Лицензия в доступных сведениях не указана.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

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

Открыть на Hugging Face

SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2

This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: sentence-transformers/all-MiniLM-L6-v2
  • Maximum Sequence Length: 256 tokens
  • Output Dimensionality: 384 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)

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 SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("dabraldeepti25/embedding-model-midterm-submission-updated")
# Run inference
sentences = [
    'Comprehensive Flight Analysis: NYC to ROM\n            \n            Route Overview:\n            \n    Route Characteristics:\n    - Distance and typical duration\n    - Common connection points\n    - Seasonal weather impact\n    - Time zone considerations\n    \n    Market Analysis:\n    - Popular travel periods\n    - Price fluctuation patterns\n    - Competing airlines\n    - Alternative routes\n    \n    Operational Considerations:\n    - Aircraft types commonly used\n    - Typical delays and causes\n    - Seasonal performance metrics\n    - Airport congestion analysis\n    \n            \n            Pricing Information:\n            Base Fare: 184.00\n            Total Price: 333.65 EUR\n            \n            Detailed Flight Information:\n            \n                    Flight Segment Analysis:\n                    Carrier: TP 204\n                    Equipment: 32Q\n                    \n                    Departure Details:\n                    Airport: EWR\n                    Terminal: B\n                    Time: 2025-03-27T00:55:00\n                    \n                    Arrival Details:\n                    Airport: LIS\n                    Terminal: 1\n                    Time: 2025-03-27T11:40:00\n                    \n                    Operational Information:\n                    - Aircraft specifications\n                    - Typical on-time performance\n                    - Seasonal reliability metrics\n                    \n                    Flight Segment Analysis:\n                    Carrier: TP 838\n                    Equipment: 32N\n                    \n                    Departure Details:\n                    Airport: LIS\n                    Terminal: 1\n                    Time: 2025-03-27T20:00:00\n                    \n                    Arrival Details:\n                    Airport: FCO\n                    Terminal: 1\n                    Time: 2025-03-28T00:05:00\n                    \n                    Operational Information:\n                    - Aircraft specifications\n                    - Typical on-time performance\n                    - Seasonal reliability metrics\n                    \n            \n            Route Market Analysis:\n            - Historical price trends\n            - Peak travel periods\n            - Alternative routing options\n            - Alliance and codeshare details\n            \n            Airport Information:\n            \n    Airport: NYC\n    \n    Terminal Information:\n    - Layout and facilities\n    - Transfer processes\n    - Security procedures\n    - Lounges and services\n    \n    Ground Transportation:\n    - Public transit options\n    - Taxi and ride-share\n    - Car rental facilities\n    - Parking services\n    \n    Amenities:\n    - Dining options\n    - Shopping facilities\n    - Business services\n    - Medical facilities\n    \n            \n    Airport: ROM\n    \n    Terminal Information:\n    - Layout and facilities\n    - Transfer processes\n    - Security procedures\n    - Lounges and services\n    \n    Ground Transportation:\n    - Public transit options\n    - Taxi and ride-share\n    - Car rental facilities\n    - Parking services\n    \n    Amenities:\n    - Dining options\n    - Shopping facilities\n    - Business services\n    - Medical facilities\n    \n            \n            Travel Planning Guidelines:\n            - Optimal booking windows\n            - Fare class benefits\n            - Baggage policies\n            - Transit visa requirements\n            - Connection considerations\n            \n            Additional Services:\n            - Available ancillary services\n            - Lounge access details\n            - Special assistance services\n            - Meal and seat selection options',
    "thumb|300x300px|The Colosseum\nTh\n            \n            Nearby Attractions:\n            '''Rome''' (Italian and Latin: ''Roma''), the 'Eternal City', is the capital and largest city of Italy and of the Lazio region. It's the famed city of the Roman Empire, the Seven Hills, ''La Dolce Vita'', the Vatican City and ''Three Coins in the Fountain''. Rome, as a millennia-long centre of power, culture and religion, was the centre of one of the greatest civilisations ever, and has exerted a huge influence over the world in its circa 2500 years of existence.\nthumb|300x300px|The Colosseum\nThe historic centre of the city is a UNESCO World Heritage Site. With wonderful palaces, thousand-year-old churches and basilicas, grand romantic ruins, opulent monuments, ornate statues and graceful fountains, Rome has an immensely rich historical heritage and cosmopolitan atmosphere, making it one of Europe's and the world's most visited, famous, influential and beautiful capitals. Today, Rome has a growing nightlife scene and is also seen as a shopping heaven, being regarded as one of the fashi\n            \n            Local Dining Scene:\n            '''Rome''' (Italian and Latin: ''Roma''), the 'Eternal City', is the capital and largest city of Italy and of the Lazio region. It's the famed city of the Roman Empire, the Seven Hills, ''La Dolce Vita'', the Vatican City and ''Three Coins in the Fountain''. Rome, as a millennia-long centre of power, culture and religion, was the centre of one of the greatest civilisations ever, and has exerted a huge influence over the world in its circa 2500 years of existence.\nthumb|300x300px|The Colosseum\nTh",
    'Comprehensive Flight Analysis: NYC to ROM\n            \n            Route Overview:\n            \n    Route Characteristics:\n    - Distance and typical duration\n    - Common connection points\n    - Seasonal weather impact\n    - Time zone considerations\n    \n    Market Analysis:\n    - Popular travel periods\n    - Price fluctuation patterns\n    - Competing airlines\n    - Alternative routes\n    \n    Operational Considerations:\n    - Aircraft types commonly used\n    - Typical delays and causes\n    - Seasonal performance metrics\n    - Airport congestion analysis\n    \n            \n            Pricing Information:\n            Base Fare: 184.00\n            Total Price: 333.65 EUR\n            \n            Detailed Flight Information:\n            \n                    Flight Segment Analysis:\n                    Carrier: TP 202\n                    Equipment: 32Q\n                    \n                    Departure Details:\n                    Airport: EWR\n                    Terminal: B\n                    Time: 2025-03-27T18:40:00\n                    \n                    Arrival Details:\n                    Airport: LIS\n                    Terminal: 1\n                    Time: 2025-03-28T05:25:00\n                    \n                    Operational Information:\n                    - Aircraft specifications\n                    - Typical on-time performance\n                    - Seasonal reliability metrics\n                    \n                    Flight Segment Analysis:\n                    Carrier: TP 834\n                    Equipment: 32Q\n                    \n                    Departure Details:\n                    Airport: LIS\n                    Terminal: 1\n                    Time: 2025-03-28T11:45:00\n                    \n                    Arrival Details:\n                    Airport: FCO\n                    Terminal: 1\n                    Time: 2025-03-28T15:50:00\n                    \n                    Operational Information:\n                    - Aircraft specifications\n                    - Typical on-time performance\n                    - Seasonal reliability metrics\n                    \n            \n            Route Market Analysis:\n            - Historical price trends\n            - Peak travel periods\n            - Alternative routing options\n            - Alliance and codeshare details\n            \n            Airport Information:\n            \n    Airport: NYC\n    \n    Terminal Information:\n    - Layout and facilities\n    - Transfer processes\n    - Security procedures\n    - Lounges and services\n    \n    Ground Transportation:\n    - Public transit options\n    - Taxi and ride-share\n    - Car rental facilities\n    - Parking services\n    \n    Amenities:\n    - Dining options\n    - Shopping facilities\n    - Business services\n    - Medical facilities\n    \n            \n    Airport: ROM\n    \n    Terminal Information:\n    - Layout and facilities\n    - Transfer processes\n    - Security procedures\n    - Lounges and services\n    \n    Ground Transportation:\n    - Public transit options\n    - Taxi and ride-share\n    - Car rental facilities\n    - Parking services\n    \n    Amenities:\n    - Dining options\n    - Shopping facilities\n    - Business services\n    - Medical facilities\n    \n            \n            Travel Planning Guidelines:\n            - Optimal booking windows\n            - Fare class benefits\n            - Baggage policies\n            - Transit visa requirements\n            - Connection considerations\n            \n            Additional Services:\n            - Available ancillary services\n            - Lounge access details\n            - Special assistance services\n            - Meal and seat selection options',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Evaluation

Metrics

Semantic Similarity

MetricValue
pearson_cosine0.0285
spearman_cosine0.1023

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,164 training samples
  • Columns: sentence_0, sentence_1, and label
  • Approximate statistics based on the first 1000 samples:
    sentence_0sentence_1label
    typestringstringfloat
    detailsmin: 92 tokensmean: 254.69 tokensmax: 256 tokensmin: 92 tokensmean: 255.18 tokensmax: 256 tokensmin: 0.0mean: 0.15max: 0.3
  • Samples:
    sentence_0sentence_1label
    Comprehensive Flight Analysis: NYC to PAR Route Overview: Route Characteristics: - Distance and typical duration - Common connection points - Seasonal weather impact - Time zone considerations Market Analysis: - Popular travel periods - Price fluctuation patterns - Competing airlines - Alternative routes Operational Considerations: - Aircraft types commonly used - Typical delays and causes - Seasonal performance metrics - Airport congestion analysis Pricing Information: Base Fare: 49.00 Total Price: 234.18 EUR Detailed Flight Information: Flight Segment Analysis: Carrier: B6 118 Equipment: E90 Departure Details: Airport: JFK Terminal: 5 ...Hotel Comprehensive Profile: PREMIER INN CROYDON SOUTH Location Analysis: City: LON Precise Location: 51.36269, -0.07195 Country: GB Property Details: Chain: PI Category: Standard Hotel Last Updated: 2023-06-15T10:18:03 Neighborhood Overview: Neighborhood Characteristics: - Local atmosphere and vibe - Safety and security assessment - Proximity to business districts - Entertainment and dining options - Cultural attractions nearby - Shopping facilities - Green spaces and recreation Transportation Hub Analysis: - Major transit stations - Bus and tram routes - Taxi availability - Bike-sharing stations Local Life: - Popular local venues - Markets and shopping areas - Cultural institutions - Sports facilities ...0.09089406418063414
    Comprehensive Flight Analysis: NYC to PAR Route Overview: Route Characteristics: - Distance and typical duration - Common connection points - Seasonal weather impact - Time zone considerations Market Analysis: - Popular travel periods - Price fluctuation patterns - Competing airlines - Alternative routes Operational Considerations: - Aircraft types commonly used - Typical delays and causes - Seasonal performance metrics - Airport congestion analysis Pricing Information: Base Fare: 49.00 Total Price: 234.18 EUR Detailed Flight Information: Flight Segment Analysis: Carrier: B6 118 Equipment: E90 Departure Details: Airport: JFK Terminal: 5 ...Hotel Comprehensive Profile: TUNE HOTEL PADDINGTON Location Analysis: City: LON Precise Location: 51.5183, -0.17069 Country: GB Property Details: Chain: XN Category: Standard Hotel Last Updated: 2023-06-15T10:24:21 Neighborhood Overview: Neighborhood Characteristics: - Local atmosphere and vibe - Safety and security assessment - Proximity to business districts - Entertainment and dining options - Cultural attractions nearby - Shopping facilities - Green spaces and recreation Transportation Hub Analysis: - Major transit stations - Bus and tram routes - Taxi availability - Bike-sharing stations Local Life: - Popular local venues - Markets and shopping areas - Cultural institutions - Sports facilities ...0.297061319001456
    Local Transportation: '''New York''' (known as "The Big Apple", "NYC," and often called "New York City") is a global center for media, entertainment, art, fashion, research, finance, and trade. The bustling, cosmopolitan heart of the 4th largest metropolis in the world and by far the most populous city in the United States, New York has long been a key entry point and a defining city for the nation.From the Statue of Liberty in the harbor to the Empire State Building towering over the Manhattan skyline, from the tun Nearby Attractions: '''New York''' (known as "The Big Apple", "NYC," and often called "New York City") is a global center for media, entertainment, art, fashion, research, finance, and trade. The bustling, cosmopolitan heart of the 4th largest metropolis in the world and by far the most populous city in the United States, New York has long been a key entry point and a defining city for the nation.From the Statue of Liberty ...Comprehensive Flight Analysis: LON to ROM Route Overview: Route Characteristics: - Distance and typical duration - Common connection points - Seasonal weather impact - Time zone considerations Market Analysis: - Popular travel periods - Price fluctuation patterns - Competing airlines - Alternative routes Operational Considerations: - Aircraft types commonly used - Typical delays and causes - Seasonal performance metrics - Airport congestion analysis Pricing Information: Base Fare: 80.00 Total Price: 119.32 EUR Detailed Flight Information: Flight Segment Analysis: Carrier: VY 6225 Equipment: 320 Departure Details: Airport: LGW Terminal: S ...0.12655311984152326
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            384,
            256,
            128,
            64
        ],
        "matryoshka_weights": [
            1,
            1,
            1,
            1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • num_train_epochs: 10
  • multi_dataset_batch_sampler: round_robin

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: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 10
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • 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: False
  • 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
  • dispatch_batches: None
  • split_batches: 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: batch_sampler
  • multi_dataset_batch_sampler: round_robin

Training Logs

EpochStepspearman_cosine
1.0730.0685
2.01460.0768
3.02190.0765
4.02920.0775
5.03650.0867
6.04380.1023

Framework Versions

  • Python: 3.13.1
  • Sentence Transformers: 3.4.1
  • Transformers: 4.49.0
  • PyTorch: 2.6.0+cpu
  • Accelerate: 0.26.0
  • Datasets: 3.3.1
  • Tokenizers: 0.21.0

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

MatryoshkaLoss

@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей