/ Модель

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

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

dhara-reranker

Ранжирование текстаТекст → score3 профессии

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

158скачиваний за 30 дней1лайквеса обновлены12 ноя 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Dhara reranker — модель-переранжировщик на основе двунаправленного cross-encoder MiniLM-L6, разработанная для юридического исследовательского инструмента Dhara. Она оценивает релевантность фрагментов решений Верховного суда Индии по уголовным делам и положений уголовных кодексов ответу на юридический вопрос. Модель предназначена для повторной сортировки результатов поиска, в том числе когда вопрос использует номера статей новых кодексов, а судебные решения ссылаются на прежние нормы.

Модель дообучена методом дистилляции на парах «вопрос — фрагмент» из корпуса Dhara; в метаданных указано 25,9 млн параметров, а контекст ограничен 512 токенами. Она работает на английском языке и рассчитана на CPU-развёртывание. В оценке DharaBench на dev-наборе показала результат на уровне более крупных базовых reranker-моделей, но уступила значительно более крупной bge-reranker-v2-m3; в пользовательском сценарии качество также зависит от исходного поиска и объединения рангов. Лицензия — Apache-2.0. Модель предназначена для исследовательского поиска и не заменяет юридическую консультацию.

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

  • переранжирование найденных решений Верховного суда Индии по уголовно-правовому вопросу
  • поиск судебных фрагментов по вопросу с номером статьи нового уголовного кодекса
  • сопоставление вопроса с текстом положения уголовного кодекса Индии
  • отсев нерелевантных фрагментов в поиске по уголовному праву Индии

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Dhara reranker: Indian criminal law

A small cross-encoder that scores how well a passage from a Supreme Court of India criminal judgment, or a section of the criminal codes, answers a legal question. It is a MiniLM-L6 (22.7M parameters) distilled from bge-reranker-v2-m3 fine-tuned on question–passage pairs mined from the Dhara corpus. It is the reranker in the Dhara research tool, live at dhara.aravarun.in, where it runs on a CPU.

It was built for the 1 July 2024 change of codes (IPC, CrPC and the Evidence Act replaced by BNS, BNSS and BSA). Questions are asked with new-code section numbers, but most judgments cite the old ones, so the model has to judge a passage on what it says, not on the number it quotes.

Use

from sentence_transformers import CrossEncoder

model = CrossEncoder("AravArun/dhara-reranker", max_length=512)
question = "Can a conviction under BNS 103 rest on circumstantial evidence alone?"
passages = [
    "Where the case rests on circumstantial evidence, the chain must be so complete that it excludes every hypothesis but guilt...",
    "The appellant was granted anticipatory bail subject to conditions...",
]
scores = model.predict([(question, p) for p in passages])

Higher is more relevant. In Dhara it rereads the top 50 passages from a rank fusion of BM25, a citation-graph retriever and bge-m3 dense and sparse search, in about 0.7 seconds on a laptop CPU, and its order is then fused by rank with the retrieval order, so a landmark judgment that every retriever finds is not pushed below later judgments quoting it.

Training

  • Questions: written for training-split judgments and sections only, the same way as the DharaBench benchmark, so no judgment or section in dev or test is seen in training. 3,188 questions, of which 2,756 give usable pairs, about 14,200 in all.
  • Positives: passages of the source judgment that cite the provisions behind the question, or the provision's own text for statute questions.
  • Hard negatives: top results from the live retriever that are not the answer, plus passages citing a neighbouring section of the same code (murder against culpable homicide or attempt). A passage from another judgment citing the same law is never a negative, since it is often a right answer too.
  • Teacher: bge-reranker-v2-m3 fine-tuned with binary cross-entropy for one epoch, learning rate 2e-5, effective batch 16, 512 tokens, mixed precision on a T4.
  • Student (this model): trained to reproduce the teacher's scores (mean squared error on its logits) over the same pairs, two epochs, learning rate 5e-5, batch 32, 512 tokens.

Evaluation

DharaBench, 450 precedent questions per split, each answered by a known Supreme Court judgment, many phrased with new-code numbers for a judgment that cites only the old code. Right judgment in the top 10, reranking the top 50 of the rank fusion:

SetupDevTest
Rank fusion, no reranker0.370.36
bge-reranker-base, off the shelf0.41
bge-reranker-v2-m3, off the shelf0.47
bge-reranker-base, fine-tuned0.380.42
bge-reranker-v2-m3, fine-tuned (the teacher)0.380.41
LLM reranker0.400.40
This model0.400.45
This model, its order fused with the retrieval order (as served)0.430.44

With 450 questions a figure carries about ±0.023 of noise. On dev this model ties the base-sized rerankers and trails the off-the-shelf v2-m3, which is 25 times larger and too slow for a CPU server. It was chosen on dev for being as accurate as the base-sized models at a fifth of their cost; test was scored afterwards. Full tables: eval/results.

On 40 questions typed the way people ask them, mostly without a section number and each answered by a landmark judgment no training question came from, Dhara's served setup puts the landmark in the top 10 for 33 (0.83), against 26 for this model's order alone and 27 for dense search alone.

Dhara also uses its top score over the retrieved sections to decline questions outside criminal law. With a threshold fitted on dev to answer 95% of in-scope questions, it declines 9 of the 20 out-of-scope ones (civil, tax, family law).

Limits

  • Trained on Supreme Court criminal judgments and the six criminal codes only; other courts and areas of law are out of its domain.
  • English only.
  • Questions were generated from headnotes, so they are cleaner than real queries.
  • A ranking aid for research, not legal advice.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей