File size: 13,047 Bytes
bde105e 0c59e50 bde105e 0c59e50 46b42ee 0c59e50 46b42ee 0c59e50 0d062bf 0c59e50 46b42ee bde105e 0d062bf 1654304 0d062bf 411a402 0d062bf a7ebf45 0d062bf a7ebf45 0d062bf 0c59e50 0d062bf 46b42ee 0d062bf 1654304 0d062bf c56bb5c 0d062bf c56bb5c 0d062bf 8b7fb56 0d062bf 8b7fb56 0d062bf a7ebf45 1e6f970 0d062bf a7ebf45 c56bb5c 0d062bf 4fd67f9 0d062bf 4fd67f9 46b42ee 4fd67f9 0d062bf a7ebf45 0d062bf bde105e 0c59e50 bde105e 0c59e50 0d062bf 46b42ee 0c59e50 46b42ee 0c59e50 1654304 46b42ee 1654304 0d062bf 46b42ee | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | ---
license: apache-2.0
language:
- en
tags:
- legal
- ohio
- custody
- family-law
- parental-alienation
- bert
- modernbert
- legal-agent-council
- multi-agent
- retrieval
- classification
datasets:
- Roderick3rd/OhioCustodyBERT-corpus
pipeline_tag: text-classification
---
# OhioCustodyBERT
**A domain-specific legal AI system for Ohio family law, child custody, and parental alienation.** Built from the ground up with over 13,000 curated training examples from Ohio statutes, appellate decisions, Supreme Court cases, and legal reference materials.
> β οΈ **This is a legal research tool, not legal advice.** Always consult a licensed attorney for legal matters.
---
## Two Ways to Use This
### π’ Simple: One File, One Command
Download a single GGUF file and run it. No setup, no configuration, no Python required.
```bash
# Download the GGUF from the Qwen adapter repo, then:
ollama create ohio-custody -f Modelfile
ollama run ohio-custody
>>> What are the best interest factors for custody under Ohio law?
```
**What you get**: A Qwen3.5-9B model fine-tuned on 13,346 Ohio family law Q&A pairs. It knows Ohio statutes, case law, and court procedures. Ask it anything about Ohio custody law and it responds with citations.
π **[Download the GGUF](https://huggingface.co/Roderick3rd/OhioCustodyBERT-Qwen3.5-9B)**
---
### π΅ Advanced: The Full Legal Agent Council
Deploy a multi-agent system where specialized AI models cross-examine each other β like having a legal team debate your case. Multiple models, each with a different perspective, produce consensus-based legal analysis.
**What you get**: 6 agents analyzing your question from different angles (statute law, case law, procedure, adversary's argument), a synthesis judge that resolves conflicts, and a verifier that fact-checks every citation. When the models agree, you can be confident. When they disagree, you've found where the law is genuinely unclear.
π Keep reading below for the full architecture.
---
## Why This Exists
The Ohio family court system processes thousands of custody cases annually. Parents β especially pro se litigants β face a legal system built on decades of case law, statutes, and procedural rules that are nearly impossible to navigate without expensive legal counsel.
**OhioCustodyBERT aims to democratize access to Ohio family law knowledge** by providing AI models trained specifically on:
- Ohio Revised Code (ORC) Chapter 3109 and related family law statutes
- **Ohio Rules of Evidence (Evid.R. 101-1103)** β authentication, hearsay, cross-examination, expert testimony
- Ohio Administrative Code (OAC) custody and child welfare rules
- Appellate court decisions on custody, parental alienation, and visitation
- US Supreme Court precedent on parental rights (Santosky, Stanley, Troxel)
- Ohio Supreme Court reports, bench cards, and practice guides
- **Trial advocacy techniques** β cross-examination methods, evidence foundation, objection handling
---
## The Legal Agent Council
OhioCustodyBERT is not a single model β it's a **multi-agent legal reasoning system** where specialized AI models work together to provide comprehensive legal analysis. Each model is fine-tuned on the same curated Ohio family law corpus, but serves a different role.
### Architecture
```
User Query
β
βΌ
βββββββββββββββββββββββββββββββ
β β BERT Retriever β β OhioCustodyBERT (this model)
β Finds relevant statutes, β ModernBERT-base, 149.7M params
β case law, and rules β
ββββββββββββ¬βββββββββββββββββββ
β Retrieved context
βΌ
βββββββββββββββββββββββββββββββ
β β‘ Statute Agent β β OhioCustodyBERT-Qwen3.5-9B (LoRA)
β "What does the law say?" β Analyzes applicable statutes
βββββββββββββββββββββββββββββββ€
β β’ Case Law Agent β β Same base, different prompt
β "What have courts held?" β Finds binding precedent
βββββββββββββββββββββββββββββββ€
β β£ Procedure Agent β β Qwen3-30B-A3B (MoE, planned)
β "Was due process followed?"β Procedural compliance check
βββββββββββββββββββββββββββββββ€
β β€ Adversary Agent β β OhioCustodyBERT-Qwen3.5-9B (LoRA)
β "What's the other side?" β Steel-mans the opposition
ββββββββββββ¬βββββββββββββββββββ
β All analyses
βΌ
βββββββββββββββββββββββββββββββ
β β₯ Synthesis Judge β β QwQ-32B (deep reasoning)
β Weighs all perspectives, β Produces final analysis with
β resolves conflicts β confidence scoring
ββββββββββββ¬βββββββββββββββββββ
β Final analysis
βΌ
βββββββββββββββββββββββββββββββ
β β¦ BERT Verifier β β OhioCustodyBERT (this model)
β Fact-checks citations, β Catches hallucinated case law
β validates statute refs β and incorrect statute numbers
βββββββββββββββββββββββββββββββ
```
### Why Multiple Models?
**Same data, different architectures = meaningful consensus.** When all models agree on a legal analysis, confidence is high. When they disagree, the disagreement reveals where the law is ambiguous or the facts need closer examination β which is exactly what a good lawyer would identify.
---
## Models in This System
| Model | HuggingFace | Role | Architecture |
|-------|-------------|------|-------------|
| **OhioCustodyBERT** | [This repo](https://huggingface.co/Roderick3rd/OhioCustodyBERT) | Retriever + Verifier | ModernBERT-base (149.7M) |
| **OhioCustodyBERT-Qwen3.5-9B** | [Adapter repo](https://huggingface.co/Roderick3rd/OhioCustodyBERT-Qwen3.5-9B) | Generative Agents | Qwen3.5-9B + LoRA |
| **Training Corpus** | [Dataset](https://huggingface.co/datasets/Roderick3rd/OhioCustodyBERT-corpus) | All training data | 13,346 SFT pairs + raw corpus |
---
## This Model: ModernBERT Retriever + Verifier
### What It Does
- **Semantic retrieval**: Find the most relevant statutes, rules, and case law for a given legal question
- **Classification**: Identify legal issues (custody type, parental alienation indicators, due process violations)
- **NER**: Extract legal entities (judge names, case citations, statute references)
- **Citation verification**: Validate that LLM-generated citations point to real cases and statutes
### Model Details
| | |
|---|---|
| **Base** | ModernBERT-base (149.7M params) |
| **Domain** | Ohio family law, child custody, parental alienation |
| **Training** | Masked Language Modeling on curated Ohio legal corpus |
| **Version** | v0.1 (v0.2 training in progress β full corpus) |
| **License** | Apache 2.0 |
---
## Training Corpus (v24 β March 2026)
All models in the Legal Agent Council are trained on the same curated corpus:
### SFT Training Data β 13,346 unique pairs
| Source | Pairs | Description |
|--------|-------|-------------|
| Ohio Revised Code | 4,145 | R.C. 3109, 2919, 2151, 3111, 3127, 3105 β statutes on custody, DV, juvenile, paternity, UCCJEA, divorce |
| Ohio Administrative Code | 3,849 | OAC rules on child welfare, custody evaluation, court procedures |
| Curated Q&A | 2,288 | Hand-audited pairs from opinion analysis, case strategy, verified datasets |
| CourtListener opinions | 1,374 | Ohio appellate court custody and family law decisions |
| Reference materials | 732 | Ohio SC task force reports, bench cards, GAL guides, custody evaluator toolkit |
| Targeted opinions | 560 | Ohio appellate, Ohio SC, and SCOTUS parental rights decisions |
| Sperm donor cases | 154 | R.C. 3111 paternity and donor rights case law |
| OhioFamilyRights | 113 | Family law reform advocacy, legislative testimony, case analyses |
| Juvenile court | 75 | Juvenile court procedures and delinquency |
| Gemini-generated | 56 | Cloud-generated Q&A from corpus documents |
**Generators**: Gemini 2.5 Flash, qwen3-coder:480b, Ollama local models, manual curation
### Raw Corpus
| Source | Records | Size |
|--------|---------|------|
| Ohio Revised Code (19 chapters) | 1,034 sections | 3.0 MB |
| Ohio Administrative Code (19 divisions) | 1,283 rules | 7.3 MB |
| CourtListener opinions (OH App, SC, SCOTUS) | 259 opinions | 14 MB |
| Reference materials | 941 records | 4.0 MB |
| Parental alienation research | 55 papers | β |
| **Ohio Rules of Evidence** | **89 rules (all 11 articles)** | **170 KB** |
### Key Cases Covered
- **SCOTUS**: Santosky v. Kramer, Stanley v. Illinois, Troxel v. Granville, Michael H. v. Gerald D., Lehr v. Robertson
- **Ohio SC**: In re Murray, In re Bonfield, Shearer v. Shearer, Felton, Davis v. Flickinger
- **Topics**: Best interest standard (R.C. 3109.04), shared parenting, parental alienation, GAL standards, custody evaluation, DV protective orders, contempt, UCCJEA jurisdiction, **evidence authentication, hearsay exceptions, cross-examination**
---
## Quick Start
### Using This Model (ModernBERT β Retrieval/Classification)
```python
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("Roderick3rd/OhioCustodyBERT")
tokenizer = AutoTokenizer.from_pretrained("Roderick3rd/OhioCustodyBERT")
# Encode legal text for semantic search
text = "What factors does R.C. 3109.04 consider for shared parenting?"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
embeddings = outputs.last_hidden_state.mean(dim=1)
```
### Using the Generative Model (Qwen3.5-9B β Legal Analysis)
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B")
model = PeftModel.from_pretrained(base, "Roderick3rd/OhioCustodyBERT-Qwen3.5-9B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")
```
### Using via Ollama (Easiest)
```bash
ollama run ohio-custody
>>> What are the best interest factors under R.C. 3109.04?
```
---
## Limitations
- **Ohio-specific**: Trained primarily on Ohio law β may not generalize to other states
- **Not legal advice**: This is a research tool, not a substitute for a licensed attorney
- **v0.1**: Current model trained on limited examples; v0.2 will substantially improve quality
- **Case law currency**: Training data has a cutoff; recent decisions may not be reflected
- **Classification bias**: Reflects the Ohio statutory framework (R.C. 3109.04 best interest factors)
---
## Intended Use
| Use Case | β
Appropriate | β Not Appropriate |
|----------|---------------|-------------------|
| Legal research | Identifying relevant statutes and cases | Generating court filings |
| Case preparation | Understanding legal standards and precedent | Making custody recommendations |
| **Trial preparation** | **Practicing cross-examination and evidence presentation** | **Replacing legal counsel** |
| Education | Learning Ohio family law framework | Autonomous legal decision-making |
| Citation checking | Verifying case law references | β |
| **Evidence rules** | **Understanding authentication and hearsay** | **β ** |
---
## Project Status
| Component | Status | Notes |
|-----------|--------|-------|
| ModernBERT v0.1 | β
Live | 149.7M params, 864 examples |
| ModernBERT v0.2 | π Training | Full corpus MLM retraining |
| Qwen3.5-9B LoRA | π Training | 13,346 pairs, MLX on M4 Pro 48GB |
| v24 Corpus | β
Complete | 13,346 pairs from 19 sources |
| Legal Agent Council | π In Development | 6-agent pipeline, sequential model swap |
| Kaggle Datasets | β
Published | `ohio-legal-corpus`, `pa-references`, `ohio-custody-sft-v21` |
---
## Citation
```bibtex
@misc{ohiocustodybert2026,
title={OhioCustodyBERT: Domain-Specific Legal AI System for Ohio Family Law},
author={Roderick Mullins},
year={2026},
howpublished={HuggingFace: Roderick3rd/OhioCustodyBERT}
}
```
## Related Resources
- **Generative Model**: [OhioCustodyBERT-Qwen3.5-9B](https://huggingface.co/Roderick3rd/OhioCustodyBERT-Qwen3.5-9B) β LoRA adapter for legal analysis generation
- **Training Corpus**: [OhioCustodyBERT-corpus](https://huggingface.co/datasets/Roderick3rd/OhioCustodyBERT-corpus) β Full dataset with SFT pairs
- **Kaggle**: [ohio-legal-corpus](https://www.kaggle.com/datasets/phoenixintelligence/ohio-legal-corpus), [pa-references](https://www.kaggle.com/datasets/phoenixintelligence/pa-references)
|