/ Модель

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

Контекст
32 768 токенов
Параметры
508 млн
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-Embedding-0.6B
Библиотека
sentence-transformers
Опубликована
13 июл 2026

dinghy-law-0.6b-v1

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

Компактная многоязычная embedding-модель для семантического поиска, извлечения и сопоставления юридических документов.

1 983скачиваний за 30 дней3лайкавеса обновлены31 июл 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

  • VABBMultiLabelClassification

    main_score

    Результат

    0,5322

    MTEB

    Публичная таблицадругая ревизия

  • SIB200Classification

    main_score

    Результат

    0,8093

    Общий результат 0,8201Общий результат 0,7626
    MTEB

    Публичная таблицадругая ревизия

  • AILAStatutes

    main_score

    Результат

    0,7758

    MTEB

    Публичная таблицадругая ревизия

  • VABBClusteringP2P

    main_score

    Результат

    0,5258

    MTEB

    Публичная таблицадругая ревизия

  • MassiveScenarioClassification

    main_score

    Результат

    0,7601

    Общий результат 0,7661
    MTEB

    Публичная таблицадругая ревизия

  • GerDaLIRSmall

    main_score

    Результат

    0,3933

    MTEB

    Публичная таблицадругая ревизия

  • OpenTenderRetrieval

    main_score

    Результат

    0,4648

    MTEB

    Публичная таблицадругая ревизия

  • LegalQANLRetrieval

    main_score

    Результат

    0,6695

    MTEB

    Публичная таблицадругая ревизия

  • IconclassClusteringS2S

    main_score

    Результат

    0,2956

    MTEB

    Публичная таблицадругая ревизия

  • DutchColaClassification

    main_score

    Результат

    0,5629

    MTEB

    Публичная таблицадругая ревизия

  • DutchBookReviewSentimentClassification.v2

    main_score

    Результат

    0,9229

    MTEB

    Публичная таблицадругая ревизия

  • IconclassClassification

    main_score

    Результат

    0,5005

    MTEB

    Публичная таблицадругая ревизия

  • STSBenchmarkMultilingualSTS

    main_score

    Результат

    0,8072

    Общий результат 0,8305
    MTEB

    Публичная таблицадругая ревизия

  • WikipediaRerankingMultilingual

    main_score

    Результат

    0,8683

    MTEB

    Публичная таблицадругая ревизия

  • LegalSummarization

    main_score

    Результат

    0,6174

    MTEB

    Публичная таблицадругая ревизия

  • NFCorpus-NL.v2

    main_score

    Результат

    0,2894

    MTEB

    Публичная таблицадругая ревизия

  • LegalBenchConsumerContractsQA

    main_score

    Результат

    0,7958

    MTEB

    Публичная таблицадругая ревизия

  • VABBClusteringS2S

    main_score

    Результат

    0,3864

    MTEB

    Публичная таблицадругая ревизия

  • ArguAna-NL.v2

    main_score

    Результат

    0,5738

    MTEB

    Публичная таблицадругая ревизия

  • DutchNewsArticlesClusteringS2S

    main_score

    Результат

    0,2709

    MTEB

    Публичная таблицадругая ревизия

  • LegalBenchCorporateLobbying

    main_score

    Результат

    0,9495

    MTEB

    Публичная таблицадругая ревизия

  • bBSARDNLRetrieval

    main_score

    Результат

    0,2315

    MTEB

    Публичная таблицадругая ревизия

  • MassiveIntentClassification

    main_score

    Результат

    0,703

    Общий результат 0,7061
    MTEB

    Публичная таблицадругая ревизия

  • DutchGovernmentBiasClassification

    main_score

    Результат

    0,585

    MTEB

    Публичная таблицадругая ревизия

  • SICK-NL-STS

    main_score

    Результат

    0,7278

    MTEB

    Публичная таблицадругая ревизия

  • DutchSarcasticHeadlinesClassification

    main_score

    Результат

    0,6467

    MTEB

    Публичная таблицадругая ревизия

  • SIB200ClusteringS2S

    main_score

    Результат

    0,5367

    MTEB

    Публичная таблицадругая ревизия

  • SciFact-NL.v2

    main_score

    Результат

    0,6677

    MTEB

    Публичная таблицадругая ревизия

  • LeCaRDv2

    main_score

    Результат

    0,7362

    MTEB

    Публичная таблицадругая ревизия

  • DutchNewsArticlesClusteringP2P

    main_score

    Результат

    0,3725

    MTEB

    Публичная таблицадругая ревизия

  • MultiEURLEXMultilabelClassification

    main_score

    Результат

    0,0599

    MTEB

    Публичная таблицадругая ревизия

  • WikipediaRetrievalMultilingual

    main_score

    Результат

    0,8845

    MTEB

    Публичная таблицадругая ревизия

  • BelebeleRetrieval

    main_score

    Результат

    0,9137

    MTEB

    Публичная таблицадругая ревизия

  • SCIDOCS-NL.v2

    main_score

    Результат

    0,1775

    MTEB

    Публичная таблицадругая ревизия

  • LegalQuAD

    main_score

    Результат

    0,5852

    MTEB

    Публичная таблицадругая ревизия

  • VaccinChatNLClassification

    main_score

    Результат

    0,4555

    MTEB

    Публичная таблицадругая ревизия

  • DutchNewsArticlesRetrieval

    main_score

    Результат

    0,6084

    MTEB

    Публичная таблицадругая ревизия

  • VABBRetrieval

    main_score

    Результат

    0,7333

    MTEB

    Публичная таблицадругая ревизия

  • OpenTenderClassification

    main_score

    Результат

    0,4865

    MTEB

    Публичная таблицадругая ревизия

  • OpenTenderClusteringP2P

    main_score

    Результат

    0,4068

    MTEB

    Публичная таблицадругая ревизия

  • SICKNLPairClassification

    main_score

    Результат

    0,8474

    MTEB

    Публичная таблицадругая ревизия

  • CovidDisinformationNLMultiLabelClassification

    main_score

    Результат

    0,5081

    MTEB

    Публичная таблицадругая ревизия

  • AILACasedocs

    main_score

    Результат

    0,4132

    MTEB

    Публичная таблицадругая ревизия

  • WebFAQRetrieval

    main_score

    Результат

    0,7053

    MTEB

    Публичная таблицадругая ревизия

  • MultiHateClassification

    main_score

    Результат

    0,551

    MTEB

    Публичная таблицадругая ревизия

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

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

dinghy-law-0.6b — плотная текстовая embedding-модель Hanno-Labs на 507,6 млн параметров, дообученная на базе Qwen/Qwen3-Embedding-0.6B для поиска по юридическим документам. Она создаёт вектор размерности 1024 для входного текста и предназначена для семантического поиска, первого этапа извлечения и ранжирования в юридических RAG-системах, а также сопоставления и группировки правовых текстов. Модель использует архитектуру Qwen3 и библиотеку sentence-transformers; длина контекста по умолчанию — 8192 токена, с возможностью увеличить её до 32768.

Контрастивное дообучение охватывает юридические тексты на английском, немецком и китайском языках. В описанной авторами оценке MTEB(Law, v1) модель получила 65,88 по Mean(Task) nDCG@10; это собственное измерение авторов, а не официальное место в рейтинге. Модель рассчитана на локальный запуск, в том числе на CPU без GPU, и подходит для поиска по законам, судебной практике и договорам. Она не генерирует текст и не предоставляет юридических консультаций.

Среди ограничений авторы отмечают отставание на поиске по немецким судебным делам и длинных документах, а также небольшое снижение качества некоторых задач общего поиска по сравнению с базовой моделью. Поддержка за пределами английского, немецкого и китайского юридического текста не подтверждена. Лицензия — Apache-2.0.

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

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

Ограничения

В сравнении авторов качество ниже на поиске по немецким судебным делам и длинных документах; общий поиск немного уступает базовой модели на отдельных задачах. Поддержка других языков и юрисдикций не подтверждена; модель не генерирует юридические ответы и не заменяет юридическую консультацию.

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

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

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

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

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

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

Открыть на Hugging Face

dinghy-law-0.6b

A 0.6B-parameter text-embedding model for legal retrieval, fine-tuned from Qwen/Qwen3-Embedding-0.6B for statute, case-law, and contract text. It is intended for retrieval, reranking, and semantic search over legal corpora.

On MTEB(Law, v1) it scores 65.88 by Mean(Task) nDCG@10. In our reproduction of the benchmark, the only models that score higher are 7B+ parameters — 12 to 23 times its size — or closed commercial APIs. That places it among the strongest open models under 7B parameters, and, to our knowledge, the strongest under 1B by roughly seven points. It reaches about 94% of the top model's score at under 8% of its parameter count — small enough to run on a CPU with no GPU (see Intended use and positioning). These are our own measurements against published scores, not an official leaderboard placement (see Evaluation protocol).

Results

MTEB(Law, v1)

Mean nDCG@10 (Mean(Task)) over the eight MTEB(Law) tasks. This model is measured with a leaderboard-faithful harness (see Evaluation protocol); scores for the other models are their published MTEB(Law) results. The ordering below reflects those numbers, not an official leaderboard submission.

RankModelParamsMean(Task)
1Mira190/Euler-Legal-Embedding-V17.57B70.37
2dinghy-law-0.6b (this model)0.60B65.88
3voyageai/voyage-law-2 (commercial)—65.39
4codefuse-ai/F2LLM-v2-14B13.99B64.66
5voyageai/voyage-3 (commercial)—64.13
6infly/inf-retriever-v17.07B63.68
7codefuse-ai/F2LLM-v2-8B7.57B63.54
  • In this evaluation it scores above every model up to 14B parameters except one 8B fine-tune, and above the strongest commercial legal embedding model on the benchmark (voyage-law-2).
  • Among the models under 1B parameters it is the highest we measured by a wide margin: the next-best sub-1B model scores 58.96 (Snowflake arctic-embed-l-v2.0) and the same-size F2LLM-v2-0.6B scores 57.86 — a gap of about seven points.
  • The backbone is unchanged from Qwen3-Embedding-0.6B. On the seven tasks where the base can be evaluated at full context, the untuned base scores 61.7 and this model 64.8; the adaptation described below accounts for the gain.

Intended use and positioning

Strong legal retrieval has generally meant large models (7–14B) or a commercial API. Those can be self-hosted, and many teams do — but it takes real hardware, so the practical barrier is cost and infrastructure. dinghy-law-0.6b reaches near the top of the legal benchmark at 0.6B parameters, which lowers that barrier rather than removing an impossibility: it runs on a commodity CPU with no GPU, so competitive legal-domain retrieval is accessible to more deployments — on-premise, air-gapped, or on modest hardware — not only to teams that can host a large model or call an API.

Typical uses: first-stage retrieval and reranking for legal RAG, statute and precedent search, clause and contract matching, and clustering or deduplication of legal text. It produces a single dense vector per input; it is a retrieval model, not a generative model, and does not produce legal advice.

Method

The model is a contrastive fine-tune of Qwen3-Embedding-0.6B, specialized for legal retrieval and then merged back toward the base to preserve general capability.

  1. A strong instruction-following base. Qwen3-Embedding-0.6B is an LLM-derived embedding model that already accepts a task instruction on the query side [Qwen3-Embedding, 2506.05176]. Untuned it is a competent general retriever but well down the legal benchmark, so the adaptation only has to add legal specificity, not general retrieval competence.

  2. Contrastive domain fine-tuning. The model is fine-tuned with an InfoNCE objective [1807.03748] and in-batch negatives [DPR, 2004.04906] on query→passage pairs drawn from public legal corpora: German case law (GerDaLIR), European Court of Human Rights and U.S. Supreme Court opinions, Chinese legal cases, and public-domain Indian statutes (the Indian Penal Code, the Constitution of India, and 880+ central Acts from indiacode.nic.in).

  3. Instruction conditioning. Queries carry a task-specific instruction, matching the base model's native interface and the instruction-tuned-embedding line of work [INSTRUCTOR, 2212.09741]. The document side is encoded without an instruction.

  4. Gradient-aligned hard-negative mining. Rather than mining nearest-embedding negatives — the standard approach [ANCE, 2007.00808] — candidate negatives are selected by whether the gradient of the hard-negative-augmented InfoNCE loss aligns with the true retrieval gap. In the legal setting the nearest-embedding negative is frequently a false negative [cf. RocketQA, 2010.08191] and, empirically, is worse than a random negative; gradient-aligned selection avoids that failure. Negatives are mined in the base model's own representation geometry, so they are specific to this backbone.

  5. Statute-coverage breadth. The Indian-statute portion was deliberately broadened beyond the Indian Penal Code to constitutional, procedural, and commercial statute language. Broadening the coverage lifts performance across tasks, not only statute identification, because the encoder adapts to a wider range of legal register.

  6. Weight-space merge-back. The fine-tuned weights are interpolated back toward the base, θ = (1 − α)·θ_base + α·θ_finetuned, at α = 0.2 [WiSE-FT, 2109.01903; Model Soups, 2203.05482]. A small model fine-tuned hard on one domain forgets general retrieval; the merge recovers that general capability in weight space, in a single step and with no retraining, while keeping the legal gains. The α that maximizes MTEB(Law) is low (0.2), which is why the general-domain trade above is small: most of the base's weights are retained.

The specialization uses standard contrastive methods; the merge-back is what lets a 0.6B model keep both its legal gains and its general retrieval competence, which a hard domain fine-tune would otherwise lose.

Usage

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Hanno-Labs/dinghy-law-0.6b-v1")

query = "What is the punishment for criminal breach of trust by a public servant?"
docs = [
    "Whoever, being in any manner entrusted with property ... commits criminal breach of trust ...",
    "A contract of sale is a contract whereby the seller transfers ... the property in goods ...",
]

# The legal retrieval instruction is applied to queries and omitted from documents.
q_emb = model.encode_query(query)
d_emb = model.encode_document(docs)

scores = model.similarity(q_emb, d_emb)  # cosine
print(scores)

The query-side instruction is stored in the model config (default_prompt_name), so encode_query applies it and encode_document omits it; a bare model.encode(text) also applies the query instruction by default. The model emits 1024-dimensional embeddings, uses cosine similarity, and encodes sequences up to 8192 tokens by default (extensible to the base model's 32k context via model.max_seq_length).

Loading and serving. These results, and the exact embeddings, come from loading the model through sentence-transformers, which applies the model's final projection head. Runtimes that pool and normalize without a post-pooling projection — vLLM, Text Embeddings Inference, and GGUF/llama.cpp — omit that head; their embeddings agree with the reference to about 0.997 cosine (a small, roughly 0.3-point retrieval difference on MTEB(Law)). A projection-free build for those runtimes is planned.

Training data

All training sources are permissively licensed or public-domain legal text; each retains its original license (public domain, CC0, MIT, Apache-2.0, or CC-BY-4.0), and all permit redistribution and commercial use. The training data is released as two datasets — legal-retrieval-pairs-v1 and legal-hardnegs-qwen3-emb-0.6b-v1 — whose cards carry a per-source license and attribution table; CC-BY-4.0 material (ECtHR, SCOTUS, LEDGAR) is used with attribution. The Indian-statute component is built from public-domain enactments (Indian Copyright Act, 1957, §52(1)(q)); a cleaned slice is also released as indian-ipc-statute-identification under CC-BY-4.0. Compilation, curation, and hard-negative mining are © 2026 Clause Logic Inc.

Evaluation protocol

This model's MTEB(Law) number is produced with a leaderboard-faithful harness: query-side instruction only, raw documents, EOS token appended, max sequence length 8192, bf16, cosine similarity — matching the recipe the MTEB leaderboard uses for instruction embedders. The harness is validated against the board by reproducing a reference model's published score to within ±0.002. Scores quoted for other models are their published MTEB(Law) results; comparing our harness measurement against those published numbers is a reproduction, not an official leaderboard submission.

Limitations

  • The residual gap to the top of MTEB(Law) is concentrated in German-law case retrieval and long-document summarization, where a 0.6B backbone has limited capacity; more in-domain data does not close it. Tasks needing that headroom are better served by a larger backbone.
  • General-domain (non-legal) retrieval carries a small cost relative to the base, most visible on clustering tasks; the low merge weight (α = 0.2) keeps it bounded.
  • The model is multilingual only to the extent of its training languages (English, German, Chinese legal text); other languages and jurisdictions are out of distribution.
  • It is a retrieval/embedding model. It does not generate text and does not constitute legal advice.

License and attribution

Released under Apache-2.0. Copyright © 2026 Clause Logic Inc. The base model, Qwen3-Embedding-0.6B, is licensed by its authors under Apache-2.0; this fine-tune does not relicense it.

Citation

@misc{dinghy-law-0.6b,
  title  = {dinghy-law-0.6b: a compact legal text-embedding model},
  author = {Solka, Stephen},
  year   = {2026},
  note   = {Hanno Labs / Clause Logic Inc.},
  howpublished = {\url{https://huggingface.co/Hanno-Labs/dinghy-law-0.6b-v1}}
}

References

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3Model
Ревизия весов
080ba18

0 моделей