/ Модель

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

Контекст
262 144 токена
Лицензия
Своя лицензия
Архитектура
nemotron_h · dense
Базовая модель
NVIDIA-Nemotron-3-Nano-4B-BF16
Библиотека
transformers
Опубликована
9 окт 2026

xll-spo-nemotron-4b

Генерация текстаТекст → текст3 профессии
478скачиваний за 30 дней0лайковвеса обновлены9 ноя 2026

Описание модели

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

Модель извлекает из нормативных актов США структурированные отношения о правах, разрешениях, обязанностях и определениях с подтверждающими цитатами в JSON.

XLL SPO Nemotron 4B v1.1 — модель, разработанная Thurston Powers и полностью дообученная на базе NVIDIA Nemotron 3 Nano 4B. Она извлекает из текстов федеральных законов и нормативных актов США отношения между субъектами и объектами: права, разрешения, обязанности и определения. На вход подаётся текст раздела закона в заданном формате диалога, на выходе модель формирует JSON-массив утверждений с цитатами и локаторами, модальностью, отрицанием и участниками. Модель использует архитектуру Nemotron H, поддерживает контекст до 262 144 токенов и рассчитана на английские юридические тексты.

На проверенной выборке из 300 разделов CFR модель получила F1 0,424 для извлечения отношений и F1 0,303 с учётом уточнений и участников; точность совпадения цитат с исходником составила 99,7%. Полнота и назначение ролей остаются несовершенными, а определения извлекаются хуже других типов отношений. Модель обучена на источниках федерального уровня США и не заявляет охват других правовых систем. Для надёжного использования необходима ручная проверка результатов. Лицензия указана как other; дополнительных условий README не приводит.

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

  • извлечение обязанностей субъектов из разделов CFR
  • поиск прав и разрешений, предоставленных законом
  • выделение определений и связанных с ними сущностей
  • формирование JSON-утверждений с точными юридическими цитатами

Ограничения

Качество извлечения неполное: F1 отношений на проверенной выборке составил 0,424, а определения оказались наиболее сложным типом. Модель обучена на федеральных источниках США; результаты требуют ручной проверки и не подтверждают охват других юрисдикций.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

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

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

XLL SPO Nemotron 4B — v1.1 actor relations

Task-specialized full-weight fine-tune for extracting actor-oriented legal relationships from United States federal and state statutes and regulations. Given a section of law, it returns a JSON array of assertions whose subject is the semantic actor/entity holding a permission, right, or obligation, whose predicate preserves modality and negation, and whose object is the target, entity, or defined meaning.

This is the v1.1 actor contract — a breaking change from the v3 provision-oriented checkpoint previously shipped in this repository. The v3 model (checkpoint-2400, provision → duty/permission → party) remains citable by commit hash in this repo's history; campaigns that reference thurstonpowers/xll-spo-nemotron-4b (checkpoint-2400) refer to that earlier revision, not this one.

Contract

  • Input: a chat conversation with a frozen system prompt (SYSTEM_PROMPT.txt, sha256 608281b35038ea922e4290cba6487afbd720adeac6200af534289d89489f913e) and a user message that is exactly <section_text>\n\n{section text}</section_text>.
  • No source preprocessing is part of the contract — plain section text only (no POS tagging, tokenization, or annotation).
  • Output: a JSON array; each assertion carries subject (raw/citation/ resolved_to), predicate_text, object or object_literal, an exact quote with locator, negated, qualifiers, participants, and unresolved_reason.
  • Decoding used for evaluation: greedy.
import hashlib
import json
from pathlib import Path
from huggingface_hub import HfApi, hf_hub_download
from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "thurstonpowers/xll-spo-nemotron-4b"
revision = HfApi().model_info(repo_id).sha  # resolve once; retain this commit for reproducibility
prompt_bytes = Path(hf_hub_download(repo_id, "SYSTEM_PROMPT.txt", revision=revision)).read_bytes()
assert hashlib.sha256(prompt_bytes).hexdigest() == "608281b35038ea922e4290cba6487afbd720adeac6200af534289d89489f913e"
system = prompt_bytes.decode("utf-8")  # no stripping, normalization or added newline
tok = AutoTokenizer.from_pretrained(repo_id, revision=revision)
model = AutoModelForCausalLM.from_pretrained(repo_id, revision=revision, dtype="bfloat16").cuda()
user = f"<section_text>\n\n{section_text}</section_text>"
ids = tok.apply_chat_template([{"role":"system","content":system},{"role":"user","content":user}],
                              tokenize=True, add_generation_prompt=True, return_tensors="pt").cuda()
out = model.generate(ids, max_new_tokens=16384, do_sample=False, pad_token_id=tok.eos_token_id)
assertions = json.loads(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))

Training

Full-parameter fine-tune on the DGX Spark fleet (see TRAINING_REPORT.json):

SettingValue
Examples7,462 (4,660 unique; repaired targets repeated 3×)
Epochs / updates2 / 3,732
Learning rate5e-6, 125-update warmup, cosine decay to 0.1
Effective batch4
Seed102301
Longest example19,452 tokens (no truncation)
Data sha256b27b4bd55329547599254954219092e02c137fa19f5404204387dc05e7b6a98a
Finished2026-10-12T08:59:00+00:00
Restart policyfresh_only (no auto-resume; final weights never re-trained)

Training data: thurstonpowers/xll-spo-dataset, v1.1/ subtree (v1.1/nemotron/train.jsonl, dev split disjoint by CFR part group).

Benchmarks

Regenerated for the v1.1 weights from the frozen 300-section reviewed CFR holdout (greedy decoding, exact frozen prompts, strict surface matching). Mid-density sections score best; dense sections (6+ gold assertions) are the hardest, driven by recall:

Density binSectionsPrecisionRecallF1
1–2 gold assertions770.4380.4750.455
3–5 gold assertions940.5090.5130.511
6+ gold assertions1270.4220.3850.402

By relationship kind (modality): permission F1 0.478, obligation F1 0.440, other F1 0.386, definition F1 0.338. Definitions remain the weakest kind; the definition-publication hold in the XLL pipeline is unrelated to and unchanged by this model. Evidence-quote grounding is strong across all bins (99.5–100% exact spans).

agreement by section density evidence spans by section density agreement by relationship kind

Evaluation

Reviewed 300-section CFR-part-group development holdout, greedy decoding, exact frozen prompts (EVAL_REPORT.json):

  • 298/300 sections returned valid JSON arrays (1 generation cap)
  • 1,756 predicted assertions vs 1,893 gold; 1,750 exact evidence spans
  • SPO F1 0.4237 (precision 0.4402, recall 0.4083)
  • with-qualifiers+participants F1 0.3025

Scoring is strict normalized surface matching against reviewed references — not semantic adjudication. Paraphrases can miss and quote matches do not prove support or completeness; treat scores as agreement metrics, not accuracy. Manual output review remains required before any downstream use.

Task comparison and teacher/baseline caveats

Same-cohort evaluation on the frozen 300-section reviewed CFR-part-group development holdout using the identical v1.1 system prompt, <section_text> envelope, greedy decoding (max_new_tokens=16384), and normalized surface matcher (scripts/train/eval_actor_nemotron.py):

ModelSectionsStrict JSON arrayHit 16k token capExact evidence spansSPO F1 (P / R)Full F1 w/ qualifiers & participants
Retained full fine-tune (this repo)300298/300 (99.3%)1/300 (0.3%)1,750/1,756 (99.7%)0.424 (0.440 / 0.408)0.303 (0.314 / 0.292)
Muse 1.3 teacher (meta/muse-spark-1.3-contributor)300300/300 (100.0%)0/300 (0.0%)1,901/1,901 (100.0%)0.941 (0.940 / 0.943)0.899 (0.897 / 0.901)
Baseline vanilla (nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16)3000/300 (0.0%)300/300 (100.0%)54/185 (29.2%)*0.010 (0.054 / 0.005)*0.003 (0.016 / 0.002)*

*Baseline vanilla emitted 0/300 strict JSON arrays and ran to the 16,384-token generation cap on all 300 sections. Even after permissive regex extraction of embedded [...] substrings from prose (recovered in 28/300 sections, 185 total assertions), only 54/185 quotes matched source text verbatim and only 10 assertions matched reference SPO triples (F1 0.010; 0.000 under strict JSON parsing).

Lineage and interpretation caveats:

  • Muse 1.3 is the upstream teacher, not an independent held-out competitor. The reviewed development references were constructed by running the two-pass Muse 1.3 teacher workflow (runs/spo-muse-ecfr5000-20261011), auditing every assertion with JEV/Laya, and applying agent-reviewed repairs where needed (runs/jev-ecfr5000-actor-20261011). The Muse 1.3 row therefore measures pre-repair teacher agreement with the post-review gold standard (~94.1% SPO F1, reflecting the ~6% of assertions modified or added during review), whereas the 4B fine-tune row measures single-pass student distillation into a compact local model.
  • Vanilla baseline failure is structural and stopping-related, not a general capability ranking. Under the zero-shot frozen contract prompt, the untuned 4B base model fails to terminate generation (300/300 sections hit the 16,384-token limit) and wraps commentary around malformed or hallucinated JSON. Fine-tuning teaches both the v1.1 schema/stopping behavior (298/300 clean JSON arrays, ~40× faster inference) and verbatim quote grounding (99.7% exact spans).
  • Full baseline evaluation report: BASELINE_EVAL_REPORT.json.

Limitations

  • Completeness and role assignment are imperfect (see scores above); the extraction contract favors fidelity of what is emitted over recall.
  • Editorial notes inside section text are excluded by contract; edge cases remain.
  • Trained on US federal sources (eCFR/GPO) with Connecticut reserved for downstream campaigns; no claim of coverage outside US administrative law.

Provenance

See WEIGHTS_PROVENANCE.json for weight hashes, dataset bindings, and the verification chain. This checkpoint replaces the repository contents in place; the prior v3 artifacts remain retrievable via git history.

Replication dataset

Training and evaluation data: thurstonpowers/xll-spo-dataset. Use the model-specific contract and splits described in the dataset card.

For the current actor-relation checkpoint, use the v1.1/ files, not the legacy provision-oriented root files. The dataset includes exact model-bound splits, hashes, original reports and replication code.

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

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

0 моделей