Update model card: Legal Agent Council architecture with Qwopus-27B judge, corrected corpus stats (469 opinions, 916 audited SFT pairs)
Browse files
README.md
CHANGED
|
@@ -4,364 +4,93 @@ language:
|
|
| 4 |
- en
|
| 5 |
tags:
|
| 6 |
- legal
|
|
|
|
| 7 |
- custody
|
| 8 |
- family-law
|
| 9 |
-
-
|
|
|
|
| 10 |
- modernbert
|
| 11 |
-
- masked-lm
|
| 12 |
-
- domain-adapted
|
| 13 |
-
- encoder
|
| 14 |
-
base_model: answerdotai/ModernBERT-base
|
| 15 |
datasets:
|
| 16 |
- Roderick3rd/OhioCustodyBERT-corpus
|
| 17 |
-
pipeline_tag:
|
| 18 |
-
library_name: transformers
|
| 19 |
---
|
| 20 |
|
| 21 |
# OhioCustodyBERT
|
| 22 |
|
| 23 |
-
|
| 24 |
-
<em>A domain-adapted legal language model for Ohio family law and child custody proceedings</em>
|
| 25 |
-
</p>
|
| 26 |
-
|
| 27 |
-
## Table of Contents
|
| 28 |
-
|
| 29 |
-
- [Model Summary](#model-summary)
|
| 30 |
-
- [Usage](#usage)
|
| 31 |
-
- [Training Data](#training-data)
|
| 32 |
-
- [Training Details](#training-details)
|
| 33 |
-
- [Results](#results)
|
| 34 |
-
- [Intended Use & Limitations](#intended-use--limitations)
|
| 35 |
-
- [Roadmap](#roadmap)
|
| 36 |
-
- [License](#license)
|
| 37 |
-
- [Citation](#citation)
|
| 38 |
-
|
| 39 |
-
---
|
| 40 |
-
|
| 41 |
-
## Model Summary
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
| | |
|
| 46 |
|---|---|
|
| 47 |
-
| **Base Model** |
|
| 48 |
-
| **
|
| 49 |
-
| **
|
| 50 |
-
| **
|
| 51 |
-
| **
|
| 52 |
-
| **Training Hardware** | 2× NVIDIA Tesla T4 (Kaggle, 32GB VRAM total) |
|
| 53 |
-
| **Developer** | [Phoenix Intelligence LLC](https://github.com/rodneymullins) |
|
| 54 |
-
| **Version** | v0.1 (proof-of-concept) |
|
| 55 |
-
|
| 56 |
-
OhioCustodyBERT is designed to understand the specialized vocabulary, reasoning patterns, and statutory references found in Ohio custody proceedings — including best-interest factors under ORC § 3109.04, guardian ad litem recommendations, shared parenting plans, and modification standards.
|
| 57 |
-
|
| 58 |
-
---
|
| 59 |
-
|
| 60 |
-
## Usage
|
| 61 |
-
|
| 62 |
-
Install transformers ≥ 4.48.0:
|
| 63 |
-
|
| 64 |
-
```bash
|
| 65 |
-
pip install -U transformers>=4.48.0
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
For best performance, install Flash Attention:
|
| 69 |
-
|
| 70 |
-
```bash
|
| 71 |
-
pip install flash-attn
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
### Fill-Mask (MLM)
|
| 75 |
-
|
| 76 |
-
```python
|
| 77 |
-
from transformers import pipeline
|
| 78 |
-
|
| 79 |
-
fill = pipeline("fill-mask", model="Roderick3rd/OhioCustodyBERT")
|
| 80 |
-
|
| 81 |
-
# Predict custody-specific legal terms
|
| 82 |
-
results = fill("The court granted [MASK] custody to the mother.")
|
| 83 |
-
for r in results[:5]:
|
| 84 |
-
print(f" {r['token_str']:20s} (score: {r['score']:.4f})")
|
| 85 |
-
```
|
| 86 |
-
|
| 87 |
-
### As a Feature Extractor
|
| 88 |
-
|
| 89 |
-
```python
|
| 90 |
-
from transformers import AutoTokenizer, AutoModel
|
| 91 |
-
import torch
|
| 92 |
-
|
| 93 |
-
tokenizer = AutoTokenizer.from_pretrained("Roderick3rd/OhioCustodyBERT")
|
| 94 |
-
model = AutoModel.from_pretrained("Roderick3rd/OhioCustodyBERT")
|
| 95 |
-
|
| 96 |
-
text = "The guardian ad litem recommended supervised visitation based on the best interest of the child."
|
| 97 |
-
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
|
| 98 |
-
|
| 99 |
-
with torch.no_grad():
|
| 100 |
-
outputs = model(**inputs)
|
| 101 |
-
|
| 102 |
-
# Use [CLS] embedding for classification or retrieval
|
| 103 |
-
cls_embedding = outputs.last_hidden_state[:, 0, :]
|
| 104 |
-
print(f"Embedding shape: {cls_embedding.shape}") # [1, 768]
|
| 105 |
-
```
|
| 106 |
-
|
| 107 |
-
### Fine-Tuning for Downstream Tasks
|
| 108 |
-
|
| 109 |
-
OhioCustodyBERT can be further fine-tuned for:
|
| 110 |
-
|
| 111 |
-
- **Custody outcome classification** — predict custody type from case facts
|
| 112 |
-
- **Legal NER** — extract parties, statutes, dates, custody terms
|
| 113 |
-
- **Semantic search** — retrieve relevant precedent from case databases
|
| 114 |
-
- **Document classification** — categorize motions, orders, GAL reports
|
| 115 |
-
|
| 116 |
-
Fine-tuning follows standard BERT recipes. See [Hugging Face fine-tuning tutorial](https://huggingface.co/docs/transformers/training).
|
| 117 |
-
|
| 118 |
-
---
|
| 119 |
-
|
| 120 |
-
## Training Data
|
| 121 |
-
|
| 122 |
-
Fine-tuned on the [OhioCustodyBERT-corpus](https://huggingface.co/datasets/Roderick3rd/OhioCustodyBERT-corpus), containing **864 curated training examples** and **95 validation examples** of structured Ohio custody case analyses.
|
| 123 |
-
|
| 124 |
-
### Corpus Contents
|
| 125 |
-
|
| 126 |
-
| Category | Description |
|
| 127 |
-
|----------|-------------|
|
| 128 |
-
| **Case Law** | Excerpts from Ohio appellate custody decisions (e.g., *In re M.J.C.*, *Davis v. Davis*) |
|
| 129 |
-
| **Best-Interest Analysis** | Factor-by-factor analysis under Ohio Revised Code § 3109.04(F)(1) |
|
| 130 |
-
| **GAL Reports** | Guardian ad litem recommendation patterns and reasoning |
|
| 131 |
-
| **Modification Standards** | Change-of-circumstances analysis for custody modifications |
|
| 132 |
-
| **Shared Parenting** | Shared parenting plan evaluations and court reasoning |
|
| 133 |
-
| **Statutory References** | ORC § 3109.04, § 3109.051, § 3109.052, and related provisions |
|
| 134 |
-
|
| 135 |
-
### Data Format
|
| 136 |
-
|
| 137 |
-
Each example is structured as a system-prompted analysis:
|
| 138 |
-
- **System prompt**: Legal research assistant context for Ohio family law
|
| 139 |
-
- **Case content**: Extracted custody-relevant passages with analytical commentary
|
| 140 |
-
|
| 141 |
-
### Planned Corpus Expansion (v0.2+)
|
| 142 |
-
|
| 143 |
-
| Source | Status | Estimated Size |
|
| 144 |
-
|--------|--------|----------------|
|
| 145 |
-
| CourtListener (6.7M opinions) | 🔄 Downloading | ~50,000 family law cases |
|
| 146 |
-
| GovInfo US Code (family law titles) | ✅ Downloaded | Federal statutes |
|
| 147 |
-
| LeXFiles (19B tokens) | ✅ Downloaded | Broad legal foundation |
|
| 148 |
-
| Ohio Revised Code (lawriter.net) | ⏳ Planned | Ohio-specific statutes |
|
| 149 |
-
| Ohio Supreme Court slip opinions | ⏳ Planned | Latest case law |
|
| 150 |
-
|
| 151 |
-
---
|
| 152 |
-
|
| 153 |
-
## Training Details
|
| 154 |
-
|
| 155 |
-
### Configuration
|
| 156 |
-
|
| 157 |
-
| Parameter | Value |
|
| 158 |
-
|-----------|-------|
|
| 159 |
-
| **Epochs** | 3 |
|
| 160 |
-
| **Per-device batch size** | 4 |
|
| 161 |
-
| **Gradient accumulation** | 32 (effective batch: 128) |
|
| 162 |
-
| **Learning rate** | 5e-5 |
|
| 163 |
-
| **LR scheduler** | Cosine with 10-step warmup |
|
| 164 |
-
| **Weight decay** | 0.01 |
|
| 165 |
-
| **Precision** | bf16 mixed precision |
|
| 166 |
-
| **Gradient checkpointing** | Enabled |
|
| 167 |
-
| **MLM probability** | 15% |
|
| 168 |
-
| **Max sequence length** | 512 tokens |
|
| 169 |
-
|
| 170 |
-
### Training Infrastructure
|
| 171 |
-
|
| 172 |
-
- **Hardware**: 2× NVIDIA Tesla T4 (15.6 GB VRAM each) on Kaggle
|
| 173 |
-
- **Training time**: ~7 minutes
|
| 174 |
-
- **Framework**: Hugging Face Transformers + Accelerate
|
| 175 |
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
## Results
|
| 179 |
-
|
| 180 |
-
### Training Metrics
|
| 181 |
-
|
| 182 |
-
| Step | Training Loss |
|
| 183 |
-
|------|---------------|
|
| 184 |
-
| 5 | 1.0149 |
|
| 185 |
-
| 10 | 0.9345 |
|
| 186 |
-
| 15 | 0.8611 |
|
| 187 |
-
| 20 | 0.8364 |
|
| 188 |
-
| **Final** | **0.9089** |
|
| 189 |
-
|
| 190 |
-
Loss decreased **17.4%** from step 5 to step 20, indicating the model is learning custody-specific language patterns. With only 864 examples and 3 epochs, this is a proof-of-concept demonstrating the training pipeline works end-to-end.
|
| 191 |
-
|
| 192 |
-
### Expected Improvements (v0.2)
|
| 193 |
-
|
| 194 |
-
- **10-100x more training data** from CourtListener + GovInfo family law filtering
|
| 195 |
-
- **More epochs** with larger dataset
|
| 196 |
-
- **Downstream task evaluation** on custody classification benchmarks
|
| 197 |
-
- **Comparison** against base ModernBERT and legal-specific models (LegalBERT, SaulLM)
|
| 198 |
-
|
| 199 |
-
---
|
| 200 |
-
|
| 201 |
-
## Intended Use & Limitations
|
| 202 |
-
|
| 203 |
-
### Intended Use
|
| 204 |
-
|
| 205 |
-
- **Legal research augmentation**: Enhanced understanding of custody terminology for RAG pipelines
|
| 206 |
-
- **Document analysis**: Feature extraction for custody case classification systems
|
| 207 |
-
- **Academic research**: Study of judicial reasoning patterns in family law
|
| 208 |
-
- **Legal tech prototyping**: Foundation for custody-aware NLP applications
|
| 209 |
-
|
| 210 |
-
### Limitations
|
| 211 |
-
|
| 212 |
-
⚠️ **This is v0.1 — a proof-of-concept model.**
|
| 213 |
-
|
| 214 |
-
- **Small corpus**: 864 training examples is insufficient for robust legal understanding. Production use requires the expanded corpus (v0.2+).
|
| 215 |
-
- **Ohio-specific**: Trained on Ohio case law; may not generalize to other states' custody standards, which vary significantly.
|
| 216 |
-
- **Not legal advice**: This model does not provide legal advice and should not be relied upon for legal decision-making.
|
| 217 |
-
- **MLM only**: Currently trained for masked language modeling. Task-specific fine-tuning (classification, NER, QA) is needed for downstream applications.
|
| 218 |
-
- **Bias**: May reflect biases present in the training data, including historical patterns in judicial decision-making.
|
| 219 |
-
|
| 220 |
-
### Ethical Considerations
|
| 221 |
-
|
| 222 |
-
Family law involves sensitive matters affecting children and families. Any application of this model in production systems should:
|
| 223 |
-
- Include human oversight for all outputs
|
| 224 |
-
- Be transparent about AI involvement
|
| 225 |
-
- Not be used to predict outcomes in active custody proceedings without legal professional review
|
| 226 |
-
- Comply with applicable rules of professional conduct
|
| 227 |
-
|
| 228 |
-
---
|
| 229 |
-
|
| 230 |
-
## Roadmap
|
| 231 |
-
|
| 232 |
-
| Version | Target | Key Changes |
|
| 233 |
-
|---------|--------|-------------|
|
| 234 |
-
| **v0.1** ✅ | Feb 2026 | Proof-of-concept, 864 examples, MLM training pipeline |
|
| 235 |
-
| **v0.2** | Mar 2026 | 10,000+ examples from CourtListener + GovInfo, improved loss |
|
| 236 |
-
| **v0.3** | Apr 2026 | Task fine-tuning: custody outcome classification |
|
| 237 |
-
| **v1.0** | Q2 2026 | Production-ready with evaluation benchmarks |
|
| 238 |
-
|
| 239 |
-
---
|
| 240 |
-
|
| 241 |
-
## Ohio Family Law Reform: A Timeline
|
| 242 |
-
|
| 243 |
-
Understanding the legislative and judicial history behind Ohio's custody framework is essential context for this model's domain.
|
| 244 |
|
| 245 |
-
|
| 246 |
-
|------|-------|
|
| 247 |
-
| **1999** | The **Ohio Task Force on Family Law and Children** is created by the 122nd General Assembly. |
|
| 248 |
-
| **2001** | The task force releases its final report to the legislature and Chief Justice Thomas J. Moyer, outlining goals for reforming Ohio's family law via proposed changes to **ORC Chapter 3109**. This leads Chief Justice Moyer to create the **Advisory Committee on Children, Family, and the Courts** (now the Advisory Committee on Children and Families). |
|
| 249 |
-
| **2005** | The advisory committee issues its report and recommendations, including many of the same proposals to amend ORC Chapter 3109 as the 2001 task force. The **Subcommittee on Family Law Reform Implementation (FLRI)** is created. |
|
| 250 |
-
| **2009** | The Supreme Court adopts **Guardian ad Litem standards, Sup.R. 48**. |
|
| 251 |
-
| **2010** | The Supreme Court promulgates **Uniform Domestic Relations Forms 1–5**. |
|
| 252 |
-
| **2013** | The Supreme Court promulgates **Uniform Domestic Relations Forms 6–28**. |
|
| 253 |
-
| **2014** | The Supreme Court hosts the **Domestic Relations Summit**, an interdisciplinary training. The court also adopts **parent coordination guidelines, Sup.R. 16.60** (formerly Sup.R. 90.05). |
|
| 254 |
-
| **2016** | The Supreme Court adopts **Sup.R. 44(C)(2)(h)(i–ix)** requiring confidential information be placed in a separate family file. |
|
| 255 |
-
| **2022** | The Supreme Court adopts **custody evaluator standards, Sup.R. 91**. |
|
| 256 |
-
| **2023** | The Supreme Court adopts **neutral evaluation guidelines, Sup.R. 16.50**. |
|
| 257 |
-
| **2024** | **SB325** is introduced in the 135th General Assembly — the implementation of the original proposals for a significantly revised Chapter 3109, creating a new statutory scheme for family law in Ohio. The bill stalls in the Senate Judiciary Committee. |
|
| 258 |
-
| **2025** | **SB174** is introduced in the 136th General Assembly (reintroduction of SB325). The bill is amended to address concerns and **passes the Ohio Senate in November**. |
|
| 259 |
-
| **2026** | **SB174** is pending in the House Judiciary Committee where conversations continue around revisions to improve the bill's language. |
|
| 260 |
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
|
|
|
|
|
|
|
|
|
| 264 |
|
| 265 |
-
|
| 266 |
|
| 267 |
-
|
| 268 |
-
- **Parenting responsibilities** (§3109.04(A)(20)): Replaces "custody" framework with parenting responsibility allocation
|
| 269 |
-
- **Expanded best-interest factors**: 26 enumerated factors (up from 9 + 5) under §3109.0430
|
| 270 |
-
- **Maximizing parenting time**: Courts must consider maximizing time with each parent when in the child's best interest (§3109.044)
|
| 271 |
-
- **Written findings required**: Courts must provide written findings of fact when rejecting joint parenting plans (§3109.046)
|
| 272 |
-
- **Modification standards**: Changes may be granted due to change in circumstances of *either* parent (§3109.0419)
|
| 273 |
-
- **Anti-interference provisions**: Specific procedures for motions alleging interference with parenting time (§§3109.0491-3109.0493)
|
| 274 |
-
- **Attorney fee sanctions**: Courts may assess fees for bad-faith or frivolous modification motions (§3109.0420)
|
| 275 |
-
- **Public policy declaration**: "(I)t is the public policy of this chapter, when it is in the child's best interest (1) to foster and continue the relationship between the child and each parent; (2) for the child's parents to have substantial, meaningful, and developmentally appropriate parenting time" (§3109.401)
|
| 276 |
|
| 277 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
-
|
| 282 |
-
|
| 283 |
-
-
|
| 284 |
-
|
| 285 |
|
| 286 |
### Reference Materials
|
|
|
|
|
|
|
|
|
|
| 287 |
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
1. **ECPH Encyclopedia of Psychology** (Zhang Kan) — Psychological foundations of custody evaluation
|
| 291 |
-
2. **Effects on Children and Improving Relationships: Overnight Access Research** (Kelly & Lamb) — Seminal research on overnight visitation impact on child development
|
| 292 |
-
3. **GAL Report Analysis** — Guardian ad Litem reporting patterns and recommendation structures
|
| 293 |
-
4. **Gifted Child Memorandum** — Special considerations for gifted children in custody proceedings
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
## Acknowledgments & Methodology Credits
|
| 297 |
-
|
| 298 |
-
Our domain-adaptive pre-training approach draws inspiration from several key works:
|
| 299 |
-
|
| 300 |
-
### AI4Bharat / IndicBERT
|
| 301 |
|
| 302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
|
| 304 |
-
|
| 305 |
-
|-----------|-----------------|
|
| 306 |
-
| Pre-trained ALBERT on 8.9B tokens across 12 Indian languages | Fine-tuned ModernBERT on Ohio custody case corpus |
|
| 307 |
-
| Masked Language Modeling (MLM) objective | Masked Language Modeling (MLM) objective |
|
| 308 |
-
| Domain-specific corpus curation | Domain-specific corpus curation (legal/custody) |
|
| 309 |
-
| Curriculum learning phases | Planned multi-phase training (v0.2+) |
|
| 310 |
-
| Efficient training with limited compute | Trained on free-tier Kaggle 2×T4 GPUs |
|
| 311 |
-
|
| 312 |
-
IndicBERT demonstrated that **focused domain adaptation on a well-curated corpus** can outperform larger general-purpose models — a principle we apply to the legal domain. Their curriculum learning approach (foundation → high-resource → low-resource) will inform our planned training phases:
|
| 313 |
-
|
| 314 |
-
1. **Phase 1** (current): Broad legal language modeling on custody cases
|
| 315 |
-
2. **Phase 2** (planned): Expanded corpus with CourtListener + GovInfo federal law
|
| 316 |
-
3. **Phase 3** (planned): Ohio-specific statutes and recent slip opinions
|
| 317 |
-
|
| 318 |
-
```bibtex
|
| 319 |
-
@inproceedings{kakwani2020indicnlpsuite,
|
| 320 |
-
title={{IndicNLPSuite: Monolingual Corpora, Evaluation Benchmarks and Pre-trained Multilingual Language Models for Indian Languages}},
|
| 321 |
-
author={Divyanshu Kakwani and Anoop Kunchukuttan and Satber Gopi and Gokul N.C. and Avik Bhattacharyya and Mitesh M. Khapra and Pratyush Kumar},
|
| 322 |
-
year={2020},
|
| 323 |
-
booktitle={Findings of EMNLP},
|
| 324 |
-
}
|
| 325 |
-
```
|
| 326 |
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
## License
|
| 333 |
-
|
| 334 |
-
Released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0), consistent with the base ModernBERT model.
|
| 335 |
-
|
| 336 |
-
---
|
| 337 |
|
| 338 |
## Citation
|
| 339 |
|
| 340 |
```bibtex
|
| 341 |
@misc{ohiocustodybert2026,
|
| 342 |
-
title={OhioCustodyBERT:
|
| 343 |
-
author={
|
| 344 |
year={2026},
|
| 345 |
-
|
| 346 |
-
howpublished={\url{https://huggingface.co/Roderick3rd/OhioCustodyBERT}},
|
| 347 |
}
|
| 348 |
```
|
| 349 |
|
| 350 |
-
##
|
| 351 |
-
|
| 352 |
-
```bibtex
|
| 353 |
-
@misc{modernbert,
|
| 354 |
-
title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference},
|
| 355 |
-
author={Benjamin Warner and Antoine Chaffin and Benjamin Clavié and Orion Weller and Oskar Hallström and Said Taghadouini and Alexis Gallagher and Raja Biswas and Faisal Ladhak and Tom Aarsen and Nathan Cooper and Griffin Adams and Jeremy Howard and Iacopo Poli},
|
| 356 |
-
year={2024},
|
| 357 |
-
eprint={2412.13663},
|
| 358 |
-
archivePrefix={arXiv},
|
| 359 |
-
primaryClass={cs.CL},
|
| 360 |
-
}
|
| 361 |
-
```
|
| 362 |
-
|
| 363 |
-
---
|
| 364 |
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
|
|
|
| 4 |
- en
|
| 5 |
tags:
|
| 6 |
- legal
|
| 7 |
+
- ohio
|
| 8 |
- custody
|
| 9 |
- family-law
|
| 10 |
+
- parental-alienation
|
| 11 |
+
- bert
|
| 12 |
- modernbert
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
datasets:
|
| 14 |
- Roderick3rd/OhioCustodyBERT-corpus
|
| 15 |
+
pipeline_tag: text-classification
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# OhioCustodyBERT
|
| 19 |
|
| 20 |
+
**Ohio Family Law & Custody Specialist** — Fine-tuned ModernBERT for Ohio family law, child custody, and parental alienation analysis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
## Model Overview
|
| 23 |
|
| 24 |
| | |
|
| 25 |
|---|---|
|
| 26 |
+
| **Base Model** | ModernBERT-base (149.7M params) |
|
| 27 |
+
| **Domain** | Ohio family law, child custody, parental alienation |
|
| 28 |
+
| **Training** | Kaggle 2×T4, 864 examples, 3 epochs, bf16 |
|
| 29 |
+
| **Loss** | 1.01 → 0.84 (final eval: 0.91) |
|
| 30 |
+
| **Version** | v0.1 (v0.2 in progress) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
## Part of the Legal Agent Council
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
OhioCustodyBERT is one of **4 models** in a multi-agent legal council architecture. All models are fine-tuned on the **identical curated Ohio family law corpus**, enabling consensus-based legal analysis where different architectures cross-validate each other.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
| Model | Role in Council |
|
| 37 |
+
|---|---|
|
| 38 |
+
| **OhioCustodyBERT** ← this model | Retriever + Verifier (classification, NER, fact-checking) |
|
| 39 |
+
| Qwen3.5-9B (LoRA) | Specialist Agents (statute, case law, adversary) |
|
| 40 |
+
| Qwen3-30B-A3B (LoRA) | Procedure Agent (sparse expert routing) |
|
| 41 |
+
| Qwen3.5-27B-Claude-Opus-Distilled (Q8_0) | Synthesis Judge (Claude reasoning distilled, 28 GB) |
|
| 42 |
|
| 43 |
+
**Principle**: Same data, different architectures = meaningful consensus. When all 4 models agree, confidence is high. When they disagree, the disagreement reveals where the law is ambiguous or the facts need closer examination.
|
| 44 |
|
| 45 |
+
## Training Corpus (v0.2 — March 2026)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
### Court Opinions — 469 deduplicated, full-text opinions (14.9 MB)
|
| 48 |
+
| Source | Count | Key Cases |
|
| 49 |
+
|---|---|---|
|
| 50 |
+
| Ohio Court of Appeals | 149 | PA, custody, GAL, DV, contempt, visitation |
|
| 51 |
+
| Ohio Supreme Court | 199 | Shearer, Felton, In re Murray, In re Bonfield |
|
| 52 |
+
| US Supreme Court | 121 | Santosky v. Kramer, Stanley v. Illinois, Troxel v. Granville |
|
| 53 |
|
| 54 |
+
### SFT Training Data (audited March 10, 2026)
|
| 55 |
+
| Dataset | Records | Status |
|
| 56 |
+
|---|---|---|
|
| 57 |
+
| v19 curated pairs | 916 train / 76 valid | ✅ Audited |
|
| 58 |
+
| Opinion-generated pairs | ~1,400 (3 per opinion) | 🔄 Generating |
|
| 59 |
+
| Phase 2 strategy pairs | 45 | ✅ Ready |
|
| 60 |
|
| 61 |
### Reference Materials
|
| 62 |
+
- **941 records (4.0 MB)**: Black's Law Dictionary (591), OH Task Force on Family Law, Custody Evaluator Toolkit, GAL Task Force, Parenting Time Guide
|
| 63 |
+
- **ORC Family Law (323 records, 1.2 MB)**: §3109, §2919, §2151, §3111, §3127, §3105
|
| 64 |
+
- **55 PA references**: Academic papers, case analyses, legal guides
|
| 65 |
|
| 66 |
+
## Intended Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
+
- **Classification**: Custody outcome prediction, legal issue spotting
|
| 69 |
+
- **NER**: Legal entity recognition (judges, statutes, case names)
|
| 70 |
+
- **Retrieval**: Semantic search over Ohio family law corpus
|
| 71 |
+
- **Fact-checking**: Citation verification for LLM-generated legal text
|
| 72 |
+
- **Council agent**: BERT Retriever + Verifier roles in Legal Agent Council
|
| 73 |
|
| 74 |
+
## Limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
- Trained primarily on Ohio law — may not generalize to other jurisdictions
|
| 77 |
+
- v0.1 had limited training examples (864); v0.2 will substantially expand this
|
| 78 |
+
- Not a substitute for legal counsel
|
| 79 |
+
- Classification boundaries reflect Ohio statutory framework (R.C. 3109.04)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
## Citation
|
| 82 |
|
| 83 |
```bibtex
|
| 84 |
@misc{ohiocustodybert2026,
|
| 85 |
+
title={OhioCustodyBERT: Domain-Specific Legal Language Model for Ohio Family Law},
|
| 86 |
+
author={Roderick Mullins},
|
| 87 |
year={2026},
|
| 88 |
+
howpublished={HuggingFace: Roderick3rd/OhioCustodyBERT}
|
|
|
|
| 89 |
}
|
| 90 |
```
|
| 91 |
|
| 92 |
+
## Related Resources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
+
- **Corpus**: [Roderick3rd/OhioCustodyBERT-corpus](https://huggingface.co/datasets/Roderick3rd/OhioCustodyBERT-corpus)
|
| 95 |
+
- **Kaggle**: [ohio-legal-corpus](https://www.kaggle.com/datasets/phoenixintelligence/ohio-legal-corpus), [pa-references](https://www.kaggle.com/datasets/phoenixintelligence/pa-references)
|
| 96 |
+
- **Council Architecture**: 6 agents, 4 models, sequential swap on M4 Pro 48GB
|