/ Модель

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

Контекст
1 024 токена
Параметры
126 млн
Лицензия
Apache 2.0
Архитектура
llama · dense
Базовая модель
slm-125m-legal-sft
Библиотека
transformers
Опубликована
4 авг 2026

slm-125m-legal-dpo

Генерация текстаТекст → текст3 профессии

Компактная англоязычная Llama-модель для генерации ответов на юридические и финансовые вопросы по предоставленному тексту, не показавшая улучшения относительно базовой SFT-версии.

32скачиваний за 30 дней0лайковвеса обновлены15 авг 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

abhishekai/slm-125m-legal-dpo — компактная языковая модель на 125,8 млн параметров, разработанная Abhishek AI. Это дообученная методом Direct Preference Optimization (DPO) версия abhishekai/slm-125m-legal-sft; предпочтения для обучения получены с помощью RLAIF. Модель использует плотную архитектуру Llama, предназначена для генерации ответов на вопросы по предоставленным юридическим и финансовым текстам. Она принимает текст и выдаёт текст, поддерживает английский язык, а длина контекста составляет 1024 токена.

Модель опубликована как воспроизводимый эксперимент и пример масштабирования DPO, а не как улучшение базовой SFT-модели. В сравнении с ней DPO-версия показала более низкий результат: автор рекомендует использовать slm-125m-legal-sft. На таком размере модель ненадёжно выполняет арифметические вычисления, может выдумывать ответы без контекста и не подходит для принятия юридических или финансовых решений. Лицензия — Apache-2.0.

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

  • ответы на юридические вопросы по предоставленному фрагменту документа
  • ответы на финансовые вопросы по заданному контексту
  • экспериментальное сравнение DPO и SFT на небольшой языковой модели

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

slm-125m-legal-dpo

A 125.8M-parameter grounded legal/financial Q&A model, preference-tuned with DPO (Direct Preference Optimization) on AI-generated feedback (RLAIF).

Honest headline

This model is, if anything, slightly worse than the SFT model it was trained from. Use slm-125m-legal-sft instead.

win-rate vs its SFT baseline0.455
tally37 wins / 46 losses / 17 ties (n=100)
two-sided sign test on the 83 decisive pairsp = 0.380
95% CI on the overall win-rate[0.361, 0.552]

The interval straddles 0.5, so the apparent degradation is not statistically established either — the honest reading is "no measurable gain, with the point estimate on the wrong side." It is published as a reproducible RLAIF artifact and as one point in a scaling comparison, not as an upgrade.

Independent absolute score (2026-08-15)

Scored by Claude Sonnet on four axes out of 10 — a different model family from the Gemini judge behind the win-rate above, and one that had no hand in writing this project's training data. 300 held-out prompts, the same prompts and the same scale used for all twelve checkpoints, so this number is comparable across models in a way no win-rate here is.

mean score3.52 / 10
95% CI (bootstrap over per-prompt scores)[3.23, 3.82]
paired step-0.52 against its own SFT (4.05), CI [-0.86, -0.18] - a real regression on this scale too.

The full twelve-checkpoint table, with every stage-to-stage interval, is in MODEL_INDEX.md in the project repository.

Why publish a negative result

Because it is the smallest point in a controlled 3-model comparison run through an identical pipeline — same prompt pool, same Gemini 2.5 Flash judge, same preference-mining thresholds, same DPO recipe:

modelparamsDPO win-rate vs its own SFTp
125M (this)126M0.4550.380
500M518M0.4800.704
Gemma-2-2B2,614M0.5300.545

DPO's win-rate rises monotonically with model scale, crossing from harmful to parity to slightly positive. No individual point is statistically distinguishable from 0.5 at n=100 — the trend is the finding, not any single number. Distinguishing a 0.53 effect from parity would need roughly 400–600 eval prompts.

Why it does not help at 125M

The objectives optimized correctly — DPO preference accuracy reached 0.96 on held-out pairs, and the reward model trained from the same data reached 0.837 pairwise accuracy. This is a capacity finding, not a bug.

SFT-greedy decoding is already close to this model's ceiling. Distilling toward a Gemini-class target pushes it into a fluent prose register it does not have the capacity to fill with substance: the answers get smoother, not more correct. A variant trained on Gemini-authored chosen responses instead of on-policy ones was worse still (0.335, 29 wins / 62 losses), which is the same effect seen more sharply.

Preference data

888 triplets (788 train / 100 held-out eval), built on-policy:

  1. Sample 4 candidate answers from the frozen SFT model (temp 0.9, top-p 0.95)
  2. Gemini 2.5 Flash scores each 1–10 on correctness and grounding
  3. Keep the best/worst pair only if the score gap is ≥ 2
  4. An independent pairwise judge re-checks that chosen really beats rejected, with A/B order randomized to cancel position bias
  5. Embedding dedup on prompts (cosine ≥ 0.97), then split

Prompt format

Use the chat template shipped with the tokenizer. The assistant turn ends on <|eos|>.

from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("abhishekai/slm-125m-legal-dpo")
model = AutoModelForCausalLM.from_pretrained("abhishekai/slm-125m-legal-dpo")

msgs = [
    {"role": "system", "content": "You are a precise legal and financial assistant. Answer only from the provided context."},
    {"role": "user", "content": "Context: In a civil negligence action the plaintiff must prove duty, breach, causation, and damages by a preponderance of the evidence.\n\nQuestion: What standard of proof applies to the plaintiff?"},
]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(text, return_tensors="pt", add_special_tokens=False),
                     max_new_tokens=128, do_sample=False)

Limitations

  • No arithmetic reliability. At 125M the model will state a revenue delta and a percentage that do not follow from the two figures it just produced. Do not trust generated numbers.
  • Grounded QA only. It is trained to answer from a supplied passage. Asked open-ended questions with no context, it confabulates.
  • Not legal or financial advice. Fluent, register-correct legal prose is not the same as correct legal reasoning, and this model produces the former.
  • The judge that created its preference data is also the judge that evaluated it (Gemini 2.5 Flash). Win-rates against an independent judge may differ.

Training

DPO, β=0.1, effective batch 16, on 1×H100. Full pipeline, configuration, and the negative results are documented in the project repository.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
68c26dc

0 моделей