/ Модель

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

Контекст
512 токенов
Параметры
25,9 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
ms-marco-MiniLM-L-6-v2
Опубликована
2 июл 2026

cuad-cross-encoder-v11

Классификация текстаТекст → label3 профессии

datgacon/cuad-cross-encoder-v11 — модель reranking для поиска и повторного ранжирования договорных фрагментов по запросам на естественном языке в задачах анализа контрактов.

39скачиваний за 30 дней0лайковвеса обновлены3 июл 2026

Бенчмарки

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

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

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

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

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

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

Она разработана datgacon на основе cross-encoder/ms-marco-MiniLM-L-6-v2 и дообучена на данных CUAD, ACCORD, LEDGAR, ContractNLI, выдержках контрактов из EDGAR и синтетических примерах. Модель ориентирована на англоязычные коммерческие договоры и предназначена прежде всего для сценариев contract review, включая поиск положений о совместных предприятиях, интеллектуальной собственности, запрете конкуренции и непереманивании, а также конфиденциальности и NDA. Она не предназначена для общего поиска документов, нелегальных доменов или использования в качестве самостоятельного юридического консультанта.

Архитектура — cross-encoder на базе BERT-подобной модели MiniLM; модель оценивает пары «запрос — фрагмент» и возвращает оценку релевантности для последующего ранжирования. Максимальная длина последовательности составляет 512 токенов. Доступна версия ONNX INT8, оптимизированная для инференса в браузере и на периферийных устройствах через ONNX Runtime Web, а также использование через sentence-transformers на PyTorch. Обучение выполнено на примерно 72 101 тренировочной и 5 612 валидационных тройках. На закрытом наборе из 16 контрактов модель показала от 37 до 47% полностью успешных результатов в зависимости от домена, но часто возвращала частично корректные результаты, поэтому требует проверки человеком и не заменяет юридическую экспертизу. Модель распространяется по лицензии Apache-2.0.

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

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

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

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

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

Открыть на Hugging Face

cuad-cross-encoder-v11

A cross-encoder reranker fine-tuned for legal clause retrieval in contract review workflows. Built on cross-encoder/ms-marco-MiniLM-L-6-v2 and fine-tuned on a combination of CUAD, ACCORD, LEDGAR, ContractNLI, EDGAR-sourced contract pairs, and LLM-generated synthetic pairs targeting known failure patterns.

Deployed as ONNX INT8 for in-browser inference via ONNX Runtime Web.


Intended Use

  • Primary: Reranking retrieved contract chunks against natural-language clause queries (e.g. "What are the governing law provisions?", "What IP does each party retain?")
  • Domains covered: Joint Venture, Intellectual Property, Non-Compete / Non-Solicit, Non-Disclosure Agreement (NDA)
  • Not intended for: General-purpose document retrieval, non-legal domains, or as a standalone legal advisor

Training Data

SourceDescriptionPairs
CUAD v1510 contracts, 41 clause categories (Atticus Project)~30,000
ACCORD3,931 annotated legal passages~6,000
LEDGARSEC EDGAR provisions, 14 labels filtered for JV/NC/IP~4,000
ContractNLI / LegalBench14 NLI tasks over contract text~3,000
EDGAR default (re-run)SC 13D + 8-K NC/IP exhibits6,680 pos
EDGAR JV (re-run)8-K joint venture exhibit filings1,054 pos
EDGAR Sino-JV (re-run)20-F chapter-format Sino-JV agreements~4,272
EDGAR NDA (new v11)EX-99 confidentiality exhibits from SC TO-T / 8-K filings4,417 pos
Synthetic spinoff-IP (new v11)LLM-labeled pairs for IP spinoff format failures294
Synthetic NDA (new v11)LLM-labeled pairs for NDA section-dominance failures267
Synthetic definitions-bleed (new v11)LLM-labeled pairs for definitions-article bleed failures507
Synthetic Armstrong-IP (new v11)LLM-labeled pairs for irrevocable license confusion102
Eval positivesFull-chunk positives extracted from passing eval cases84
Pipeline hard negativesClause queries where prior model failed — reranked negatives254

Total: ~72,101 training pairs · 5,612 validation pairs

Pairs are (query, positive_chunk, negative_chunk) triplets. Negatives are a mix of hard negatives (wrong clause from same contract) and random negatives (chunks from other contracts).


Training Details

HyperparameterValue
Base modelcross-encoder/ms-marco-MiniLM-L-6-v2
Epochs3
Batch size32
Learning rate2e-5
Max sequence length512 tokens
Warmup steps10% of total steps
LossCross-entropy (sentence-transformers CrossEncoderTrainer)
HardwareNVIDIA RTX 3090 (RunPod)
Training time~50 min

Evaluation

Evaluated on a held-out set of 16 contracts across 4 clause domains. Each contract is queried with 3–8 clause-type questions; the top-ranked chunk is scored as pass (correct clause returned), partial (correct section but wrong chunk boundary), or fail.

SuiteContractsQueriesPassPartialFailvs v10
Joint Venture95120 (39%)15 (29%)16 (31%)+11 pass 🚀
Intellectual Property44918 (37%)18 (37%)13 (27%)+1 pass
Non-Compete / Non-Solicit3136 (46%)7 (54%)0 (0%)+1 pass
NDA3199 (47%)7 (37%)3 (16%)+1 pass

Test contracts (JV): MightyCell Batteries, BorrowMoney.com, Galera Therapeutics, MINDA IMPCO Technologies, Kiromic Biopharma, Novo Integrated Sciences, Transphorm / Aizu Fujitsu, Valence Technology / Baoding Fengfan, Veoneer

Test contracts (IP): Armstrong Flooring, Cerence Inc, Garrett Motion, Rare Element Resources

Test contracts (NDA): Kite Pharma / Gilead Sciences, Fortune Brands / Norcraft Companies, Aspect Medical Systems / Tyco Healthcare

The JV improvement (+11 pass) is driven by new Sino-JV EDGAR data and synthetic definitions-bleed pairs targeting contracts where the model previously returned definitions articles for Governing Law and Non-Compete queries.


Usage

ONNX Runtime (recommended for browser / edge)

import onnxruntime as ort
from transformers import AutoTokenizer
import numpy as np

tokenizer = AutoTokenizer.from_pretrained("datgacon/cuad-cross-encoder-v11")
session = ort.InferenceSession("onnx/model_quantized.onnx")

query = "What governing law applies to this agreement?"
passage = "This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware."

inputs = tokenizer(query, passage, return_tensors="np", max_length=512, truncation=True, padding=True)
outputs = session.run(None, {k: v for k, v in inputs.items() if k in ["input_ids", "attention_mask", "token_type_ids"]})
score = outputs[0][0][0]
print(f"Relevance score: {score:.4f}")

sentence-transformers (PyTorch)

from sentence_transformers.cross_encoder import CrossEncoder

model = CrossEncoder("datgacon/cuad-cross-encoder-v11")

query = "What governing law applies to this agreement?"
passages = [
    "This Agreement shall be governed by the laws of the State of Delaware.",
    "Each party shall maintain the confidentiality of the other party's information.",
    "The term of this Agreement shall commence on the Effective Date.",
]

scores = model.predict([(query, p) for p in passages])
ranked = sorted(zip(scores, passages), reverse=True)
for score, passage in ranked:
    print(f"{score:.4f}  {passage[:80]}")

Limitations

  • Trained on US commercial contracts (CUAD corpus); may underperform on EU, UK, or public-sector agreements
  • Partial matches are common at clause-boundary edges — chunk size and overlap in the retrieval pipeline significantly affect results
  • Not a legal advisor — scores indicate retrieval relevance, not legal interpretation
  • Performance on clause types outside the four trained domains (JV, IP, NC, NDA) is untested
  • Token type IDs must be passed explicitly when using ONNX Runtime Web; omitting them collapses score spread

Citation

If you use this model, please cite the underlying datasets:

@article{hendrycks2021cuad,
  title={CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review},
  author={Hendrycks, Dan and others},
  journal={arXiv preprint arXiv:2103.06268},
  year={2021}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
7915e5f

0 моделей