Introduction

The regulations model turns a published rule section into machine-readable legal structure. It is trained to identify headings, nested provisions, notes and tables while keeping the text anchored to the original source. The goal is reusable regulatory data, not a summary, a rewritten rule or an answer about what the law means.

The model weights and model card and training data and evaluation evidence are published on Hugging Face for inspection and replication.

The function

The input is one section as the publisher printed it: the heading, the numbered paragraphs, the notes, the tables, and the links. The output is that same section as USLM, with the hierarchy made explicit and the words unchanged.

Two checks decide whether a section can be published. The XML has to validate against the USLM schema, and the text of the XML, with whitespace removed, has to equal the publisher’s text. A model that rearranges a sentence into cleaner prose has failed, even if the result is readable.

The same section, three ways

Sec. 19-411-C5 is short enough to show the whole path. The model receives the section as published. It returns USLM: the same words, with the number, the heading, the operative paragraph, and the history note marked as those things. The reading page is that markup.

1 · Raw text

Sec. 19-411-C5. Inspection by the department
Each vertical wheelchair lift shall be thoroughly inspected by a department elevator inspector at least once each twelve months.
(Effective October 28, 1980)

2 · USLM

<section xmlns="http://schemas.gpo.gov/xml/uslm" id="_19-411-C5">
  <num value="19-411-C5">Sec. 19-411-C5.</num>
  <heading>Inspection by the department</heading>
  <content>
    <p>Each vertical wheelchair lift shall be thoroughly inspected by a department elevator inspector at least once each twelve months.</p>
  </content>
  <notes>
    <note>
      <p>(Effective October 28, 1980)</p>
    </note>
  </notes>
</section>

3 · Reading page

Sec. 19-411-C5. Inspection by the department

Each vertical wheelchair lift shall be thoroughly inspected by a department elevator inspector at least once each twelve months.

(Effective October 28, 1980)

Presentation styles copied from the publisher page are left out of the listing above. The complete USLM file is what the Connecticut reading page uses.

How it was trained

The recipe search started on Qwen 9B. Four machines tried learning rates, epoch counts, and data mixes in parallel, and each candidate was compared with the untouched base model on held-out sections. The point of the small model was to find a recipe before spending a larger training run.

The scaled run is a full fine-tune of Qwen3.8 27B on a mixed set of 5,000 sections: 2,792 gold examples from Government Publishing Office sources and 2,208 silver examples from the Electronic Code of Federal Regulations, chosen to cover titles the gold set does not. Training runs two epochs, completion-only loss, and a 32,768-token cap with no truncation. Sections are the training unit. A section that does not fit is split by a defined rule rather than cut off mid-sentence.

Training loss is not the quality number. Quality is schema validity and source-text fidelity on held-out sections, including tables and long sections. The published weights are the retained Qwen3.5 9B full fine-tune, XLL Regulations Qwen3.5-9B. The model card has the trained prompt, the two-epoch recipe, and the reserved-set scores.

Where it stands

Connecticut is the first jurisdiction carried through to a reading site. Sections the model did not get right were repaired against the publisher page and checked again for the same two conditions: valid USLM, and raw text that still matches the source. One section, 46a-5-11, is held back because its printed labels cannot be stored as legal section numbers without changing the text.

Open the Connecticut regulations. Statutes are a separate model and a separate reading site. Registers and the other document types will be too.