/ Модель

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

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

slm-500m-legal-ppo

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

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

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

slm-500m-legal-ppo — языковая модель семейства Llama, разработанная Abhishekai для ответов на юридические и финансовые вопросы по предоставленному фрагменту текста. Модель содержит около 517,7 млн параметров, принимает текст и генерирует текст; для диалога следует использовать шаблон чата из токенизатора. Контекст ограничен 1024 токенами, основной указанный язык — английский.

Модель дообучена методом PPO на базе abhishekai/slm-500m-legal-sft с использованием reward-модели, обученной на синтетических предпочтениях RLAIF. По оценке авторов, на тесте из 100 пар PPO-модель статистически не отличалась от исходной SFT-модели; средняя оценка на отдельном наборе из 300 запросов составила 4,51 из 10. Лицензия — Apache-2.0.

Модель предназначена для grounded question answering по переданному контексту в юридических и финансовых сценариях. Без исходного фрагмента она может выдумывать факты; арифметические ответы ненадёжны. Оценка PPO частично зависит от предпочтений модели-судьи, поэтому результаты не подтверждают повышение фактической точности. Модель не предназначена для предоставления юридических или финансовых рекомендаций.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

slm-500m-legal-ppo

A 517.8M-parameter grounded legal/financial Q&A model, tuned with PPO against a learned reward model on AI-generated feedback (RLAIF).

Honest headline

This model performs at parity with the SFT model it was trained from.

win-rate vs slm-500m-legal-sft0.520
tally16 wins / 12 losses / 72 ties (n=100)
two-sided sign test on the 28 decisive pairsp = 0.572
95% CI on the overall win-rate[0.423, 0.615]

The interval straddles 0.5. PPO here did not measurably improve the model and did not measurably harm it. If you want the better-understood model, use the SFT one.

The 72 ties are the substantive result, not a footnote. Mean KL from the SFT reference across training was 0.134 — the policy barely moved, so the judge mostly cannot distinguish the two models. A numerically healthy PPO run at this scale produces nearly the same model.

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 score4.51 / 10
95% CI (bootstrap over per-prompt scores)[4.19, 4.84]
paired step-0.15 against its own SFT (4.65), CI [-0.35, +0.06] - indistinguishable from the SFT.

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

Where it sits in the scaling picture

Same pipeline, same prompt pool, same Gemini 2.5 Flash judge, same PPO code across all three models. PPO's win-rate falls with scale — the mirror image of DPO's rise:

modelparamsPPO win-ratepDPO win-rate
125M126M0.5700.0160.455
500M (this)518M0.5200.5720.480
Gemma-2-2B2,614M0.3300.00020.530

Only the two ends are significant, and they point in opposite directions. The Gemma PPO checkpoint is a real degradation and is deliberately not published.

Evaluation caveat

The reward model distilled Gemini 2.5 Flash's preferences, PPO optimized against that reward model, and Gemini 2.5 Flash then judged the result. Win-rates under those conditions partly measure agreement with the judge's own taste. An independent judge would be needed to break that circularity.

Training

PPO maximizing reward - kl_coef * KL(policy ‖ SFT), 60 rollout steps, 16 prompts per rollout, kl_coef=0.2 on 1×H100. Realized: mean KL 0.134, final KL 0.556, value loss 0.0005–0.035, kl_coef never left its floor, no abort, 13.3 min, $0.23.

Three implementation details were load-bearing — without them the run is not merely worse, it is invalid:

  • Reward whitening. kl_coef is only meaningful relative to reward magnitude, and a Bradley-Terry reward model only fixes score differences — its absolute scale is arbitrary. Scores are normalized per rollout batch.
  • Gradient accumulation across the rollout, rather than one optimizer step per sequence.
  • An adaptive KL controller with a floor at the configured kl_coef, since at step 1 the policy is the reference and KL ≈ 0.

Reward model

Trained from the same SFT backbone with a fresh scalar head and the pairwise Bradley-Terry loss, reaching 0.820 pairwise accuracy on held-out preference pairs. Published separately as slm-500m-legal-rm.

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-500m-legal-ppo")
model = AutoModelForCausalLM.from_pretrained("abhishekai/slm-500m-legal-ppo")

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

  • Grounded QA only — it answers from a supplied passage and confabulates without one.
  • Arithmetic is unreliable. Do not trust generated figures.
  • Not legal or financial advice.
  • PPO optimizes a proxy for quality; a higher reward-model score is not evidence of a more correct answer.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей