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,objectorobject_literal, an exactquotewith locator,negated,qualifiers,participants, andunresolved_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):
| Setting | Value |
|---|---|
| Examples | 7,462 (4,660 unique; repaired targets repeated 3×) |
| Epochs / updates | 2 / 3,732 |
| Learning rate | 5e-6, 125-update warmup, cosine decay to 0.1 |
| Effective batch | 4 |
| Seed | 102301 |
| Longest example | 19,452 tokens (no truncation) |
| Data sha256 | b27b4bd55329547599254954219092e02c137fa19f5404204387dc05e7b6a98a |
| Finished | 2026-10-12T08:59:00+00:00 |
| Restart policy | fresh_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 bin | Sections | Precision | Recall | F1 |
|---|---|---|---|---|
| 1–2 gold assertions | 77 | 0.438 | 0.475 | 0.455 |
| 3–5 gold assertions | 94 | 0.509 | 0.513 | 0.511 |
| 6+ gold assertions | 127 | 0.422 | 0.385 | 0.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).

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):
| Model | Sections | Strict JSON array | Hit 16k token cap | Exact evidence spans | SPO F1 (P / R) | Full F1 w/ qualifiers & participants |
|---|---|---|---|---|---|---|
| Retained full fine-tune (this repo) | 300 | 298/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) | 300 | 300/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) | 300 | 0/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.