/ Модель

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

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

legal-clause-minilm-l6-v2

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

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

125скачиваний за 30 дней0лайковвеса обновлены29 дек 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

hbpkillerX/legal-clause-minilm-l6-v2 — дообученный Sentence Transformer на базе sentence-transformers/all-MiniLM-L6-v2 для представления предложений и абзацев в виде плотных семантических векторов. Модель построена на архитектуре BERT и содержит 25,9 млн параметров. Она формирует векторы размерности 384, нормализует их и сравнивает тексты с помощью косинусного сходства; метаданные указывают контекст до 512 токенов, а конфигурация из README задаёт максимальную длину последовательности 256 токенов.

Модель предназначена для семантического поиска и сравнения юридических положений, поиска перефразировок, кластеризации и классификации текстов. README описывает дообучение на парах anchor-positive и оценку на clause-eval-triplets с cosine_accuracy 0,9761. Это англоязычный энкодер; сведения указывают на специализацию на юридических положениях, но подробности лицензии и юридических юрисдикций в предоставленных данных отсутствуют.

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

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

Ограничения

Англоязычная модель с ограниченной длиной последовательности: README задаёт максимум 256 токенов, тогда как метаданные указывают контекст 512 токенов. Результаты оценки относятся к указанному набору clause-eval-triplets; лицензия в предоставленных данных не описана.

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

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

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

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

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

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, 'architecture': '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("hbpkillerX/legal-clause-minilm-l6-v2")
# Run inference
sentences = [
    'Since the Balance Sheet Date, the Company Group has conducted the Business in the ordinary course consistent with past practices. Without limiting the generality of the foregoing, except as set forth on Schedule 5.13, since the Balance Sheet Date, there has not been:',
    '(a) From December 31, 2011 to the Signing Date, (i) each Parent Entity conducted such Parent Entity’s operations only in the ordinary course of business consistent with past practices and (ii) there has not occurred and continued to exist any event, change, effect, fact, circumstance or condition which, individually or in the aggregate, has had, or would reasonably be expected to have or result in, a Parent Material Adverse Change.',
    'Notwithstanding the provisions of paragraph 2 above, all Restricted Equivalents then outstanding will immediately vest, in the event of:',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.9113, 0.1831],
#         [0.9113, 1.0000, 0.2245],
#         [0.1831, 0.2245, 1.0000]])

Evaluation

Metrics

Triplet

MetricValue
cosine_accuracy0.9761

Training Details

Training Dataset

Unnamed Dataset

  • Size: 133,951 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 1000 samples:
    anchorpositive
    typestringstring
    detailsmin: 6 tokensmean: 128.79 tokensmax: 256 tokensmin: 6 tokensmean: 128.94 tokensmax: 256 tokens
  • Samples:
    anchorpositive
    Except as disclosed in the SEC Documents, since December 31, 2005, there has been no material adverse change and no material adverse development in the business, properties, operations, condition (financial or otherwise), results of operations or prospects of the Company or its Subsidiaries. Since December 31, 2005, the Company has not (i) declared or paid any dividends, (ii) sold any assets, individually or in the aggregate, in excess of $50,000 outside of the ordinary course of business or (iii) had capital expenditures, individually or in the aggregate, in excess of $100,000. The Company has not taken any steps to seek protection pursuant to any bankruptcy law nor does the Company have any knowledge or reason to believe that its creditors intend to initiate involuntary bankruptcy proceedings or any actual knowledge of any fact which would reasonably lead a creditor to do so. After giving effect to the transactions contemplated hereby to occur at the Closing, the Company will not be ...Since December 31, 1995, there has not been (a) any Material Adverse Change (as defined in Section 12.3) in the business, prospects, financial condition, revenues, expenses or operations of DAP; (b) any decrease in the cash and cash equivalents of DAP from the amounts shown on the balance sheet included in the 1995 Financial Statements (except for any such decrease attributable to any Permitted Cash Payments (as defined in Section 12.3) hereof) made by DAP prior to Closing), (c) any damage, destruction or loss, whether covered by insurance or not, having a Material Adverse Effect, with regard to DAP's properties and business; (d) any payment by DAP to, or any notice to or acknowledgment by DAP of any amount due or owing to, DAP's self-insured carrier in connection with any self-insured amounts or liabilities under health insurance covering employees of DAP, in each case, in excess of a reserve therefor on the balance sheet included in the 1995 Financial Statements; (e) any declaration,...
    Since December 31, 1995, there has not been (a) any Material Adverse Change (as defined in Section 12.3) in the business, prospects, financial condition, revenues, expenses or operations of DAP; (b) any decrease in the cash and cash equivalents of DAP from the amounts shown on the balance sheet included in the 1995 Financial Statements (except for any such decrease attributable to any Permitted Cash Payments (as defined in Section 12.3) hereof) made by DAP prior to Closing), (c) any damage, destruction or loss, whether covered by insurance or not, having a Material Adverse Effect, with regard to DAP's properties and business; (d) any payment by DAP to, or any notice to or acknowledgment by DAP of any amount due or owing to, DAP's self-insured carrier in connection with any self-insured amounts or liabilities under health insurance covering employees of DAP, in each case, in excess of a reserve therefor on the balance sheet included in the 1995 Financial Statements; (e) any declaration,...Except as disclosed in Schedule 3(g) or -------------------------- the SEC Documents filed at least five (5) days prior to the date hereof, there has been no change or development in the business, properties, assets, operations, financial condition, results of operations or prospects of the Company or its Subsidiaries which has had or reasonably could have a Material Adverse Effect. The Company has not taken any steps, and does not currently expect to take any steps, to seek protection pursuant to any bankruptcy law nor does the Company or its Subsidiaries have any knowledge or reason to believe that its creditors intend to initiate involuntary bankruptcy proceedings.
    Except as disclosed in Schedule 3(g) or -------------------------- the SEC Documents filed at least five (5) days prior to the date hereof, there has been no change or development in the business, properties, assets, operations, financial condition, results of operations or prospects of the Company or its Subsidiaries which has had or reasonably could have a Material Adverse Effect. The Company has not taken any steps, and does not currently expect to take any steps, to seek protection pursuant to any bankruptcy law nor does the Company or its Subsidiaries have any knowledge or reason to believe that its creditors intend to initiate involuntary bankruptcy proceedings.Except as disclosed in the SEC Documents, since December 31, 2017, there has been no material adverse change in the business, properties, operations, financial condition or results of operations of the Company or its Subsidiaries. The Company is not in violation or default of (i) any provision of the Certificate of Incorporation or Bylaws, (ii) the terms of any indenture, contract, lease, mortgage, deed of trust, note agreement, loan agreement or other agreement, obligation, condition, covenant or instrument to which it is a party or bound or to which its property is subject, or (iii) any statute, law, rule, regulation, judgment, order or decree of any court, regulatory body, administrative agency, governmental body, arbitrator or other authority having jurisdiction over the Company or any of its properties, which, in the case of clauses (ii) or (iii), could be reasonably expected to have a Material Adverse Effect. Except as described in the SEC Documents, no dispute between the Compan...
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 256
  • per_device_eval_batch_size: 32
  • learning_rate: 2e-05
  • num_train_epochs: 10
  • warmup_ratio: 0.1
  • fp16: True
  • load_best_model_at_end: 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: 256
  • per_device_eval_batch_size: 32
  • 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: 10
  • 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
  • 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: True
  • 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}
  • parallelism_config: None
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch_fused
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • project: huggingface
  • trackio_space_id: trackio
  • 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
  • hub_revision: None
  • 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: no
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • liger_kernel_config: None
  • eval_use_gather_object: False
  • average_tokens_across_devices: True
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

EpochStepTraining Lossclause-eval-triplets_cosine_accuracy
0.0954504.0121-
0.19081003.6193-
0.28631503.2993-
0.38172003.13970.9145
0.47712503.0152-
0.57253002.8616-
0.66793502.7934-
0.76344002.68940.9415
0.85884502.6142-
0.95425002.5517-
1.04965502.4866-
1.14506002.47560.9552
1.24056502.4114-
1.33597002.3485-
1.43137502.317-
1.52678002.28110.9583
1.62218502.2907-
1.71769002.2771-
1.81309502.2511-
1.908410002.20150.9639
2.003810502.1946-
2.099211002.1394-
2.194711502.1468-
2.290112002.13170.9644
2.385512502.1101-
2.480913002.1233-
2.576313502.1143-
2.671814002.08170.9644
2.767214502.0413-
2.862615002.0659-
2.958015502.0521-
3.053416001.99730.9695
3.148916502.0266-
3.244317002.0031-
3.339717502.0033-
3.435118001.98410.9710
3.530518501.9978-
3.626019001.9635-
3.721419501.954-
3.816820001.94850.9705
3.912220501.966-
4.007621001.95-
4.103121501.8986-
4.198522001.90880.9710
4.293922501.932-
4.389323001.9031-
4.484723501.9196-
4.580224001.89260.9736
4.675624501.8905-
4.771025001.8862-
4.866425501.8986-
4.961826001.90480.9730
5.057326501.8612-
5.152727001.8464-
5.248127501.8505-
5.343528001.88150.9741
5.438928501.8752-
5.534429001.8455-
5.629829501.8356-
5.725230001.8420.9736
5.820630501.8675-
5.916031001.8399-
6.011531501.8019-
6.106932001.80820.9771
6.202332501.7821-
6.297733001.8269-
6.393133501.8183-
6.488534001.81380.9756
6.584034501.8044-
6.679435001.8233-
6.774835501.8037-
6.870236001.79210.9756
6.965636501.8211-
7.061137001.7421-
7.156537501.7685-
7.251938001.76150.9756
7.347338501.7571-
7.442739001.7901-
7.538239501.7746-
7.633640001.77750.9756
7.729040501.7752-
7.824441001.7688-
7.919841501.7948-
8.015342001.76490.9761
8.110742501.7176-
8.206143001.7416-
8.301543501.7579-
8.396944001.7450.9761
8.492444501.7731-
8.587845001.7713-
8.683245501.7188-
8.778646001.74630.9761
8.874046501.7669-
8.969547001.7648-
9.064947501.7254-
9.160348001.71730.9766
9.255748501.7451-
9.351149001.7605-
9.446649501.7449-
9.542050001.74320.9761
9.637450501.7518-
9.732851001.717-
9.828251501.7456-
9.923752001.71850.9761
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.12.11
  • Sentence Transformers: 5.2.0
  • Transformers: 4.57.3
  • PyTorch: 2.8.0+cu128
  • Accelerate: 1.12.0
  • Datasets: 4.4.2
  • Tokenizers: 0.22.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",
}

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
Ревизия весов
54e84fd

0 моделей