Add model card
Browse files
README.md
CHANGED
|
@@ -1,56 +1,91 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
-
|
|
|
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
-
|
| 15 |
# OhioCustodyBERT
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
##
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
##
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
## Training
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- learning_rate: 5e-05
|
| 37 |
-
- train_batch_size: 4
|
| 38 |
-
- eval_batch_size: 16
|
| 39 |
-
- seed: 42
|
| 40 |
-
- gradient_accumulation_steps: 32
|
| 41 |
-
- total_train_batch_size: 128
|
| 42 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 43 |
-
- lr_scheduler_type: cosine
|
| 44 |
-
- lr_scheduler_warmup_steps: 10
|
| 45 |
-
- num_epochs: 3
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
| 48 |
|
|
|
|
| 49 |
|
|
|
|
| 50 |
|
| 51 |
-
##
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
tags:
|
| 6 |
+
- legal
|
| 7 |
+
- custody
|
| 8 |
+
- family-law
|
| 9 |
+
- ohio
|
| 10 |
+
- modernbert
|
| 11 |
+
- mlm
|
| 12 |
+
base_model: answerdotai/ModernBERT-base
|
| 13 |
+
datasets:
|
| 14 |
+
- Roderick3rd/OhioCustodyBERT-corpus
|
| 15 |
+
pipeline_tag: fill-mask
|
| 16 |
---
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# OhioCustodyBERT
|
| 19 |
|
| 20 |
+
A domain-adapted language model for **Ohio family law and child custody** cases, fine-tuned from [ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base).
|
| 21 |
+
|
| 22 |
+
## Overview
|
| 23 |
+
|
| 24 |
+
| | |
|
| 25 |
+
|---|---|
|
| 26 |
+
| **Base Model** | answerdotai/ModernBERT-base (149.7M params) |
|
| 27 |
+
| **Domain** | Ohio family law, child custody, domestic relations |
|
| 28 |
+
| **Training** | Masked Language Modeling (MLM) on custody case corpus |
|
| 29 |
+
| **Hardware** | 2× NVIDIA Tesla T4 (Kaggle) |
|
| 30 |
+
| **Corpus** | 864 curated custody case analyses |
|
| 31 |
+
| **Developer** | [Phoenix Intelligence LLC](https://github.com/rodneymullins) |
|
| 32 |
+
|
| 33 |
+
## Training Data
|
| 34 |
+
|
| 35 |
+
Fine-tuned on the [OhioCustodyBERT-corpus](https://huggingface.co/datasets/Roderick3rd/OhioCustodyBERT-corpus), which contains structured analyses of Ohio custody cases including:
|
| 36 |
+
|
| 37 |
+
- **Case excerpts** from Ohio appellate decisions (e.g., *In re M.J.C.*, *Davis v. Davis*)
|
| 38 |
+
- **Best-interest factor analysis** under Ohio Revised Code § 3109.04
|
| 39 |
+
- **Guardian ad litem recommendations**
|
| 40 |
+
- **Custody modification standards**
|
| 41 |
+
- **Shared parenting plan evaluations**
|
| 42 |
|
| 43 |
+
## Usage
|
| 44 |
|
| 45 |
+
```python
|
| 46 |
+
from transformers import pipeline
|
| 47 |
|
| 48 |
+
fill = pipeline("fill-mask", model="Roderick3rd/OhioCustodyBERT")
|
| 49 |
|
| 50 |
+
# Predict custody terms
|
| 51 |
+
result = fill("The court granted [MASK] custody to the mother.")
|
| 52 |
+
for r in result[:3]:
|
| 53 |
+
print(f"{r['token_str']:15s} ({r['score']:.3f})")
|
| 54 |
+
```
|
| 55 |
|
| 56 |
+
## Use Cases
|
| 57 |
|
| 58 |
+
- **Legal research**: Auto-complete and suggest custody-relevant legal terminology
|
| 59 |
+
- **Document analysis**: Enhanced understanding of family law documents
|
| 60 |
+
- **Case prediction**: Feature extraction for custody outcome modeling
|
| 61 |
+
- **RAG pipelines**: Better embeddings for custody-related retrieval
|
| 62 |
|
| 63 |
+
## Training Details
|
| 64 |
|
| 65 |
+
- **Epochs**: 3
|
| 66 |
+
- **Batch size**: 4 per device × 32 gradient accumulation = 128 effective
|
| 67 |
+
- **Learning rate**: 5e-5 with cosine schedule
|
| 68 |
+
- **Precision**: bf16 mixed precision
|
| 69 |
+
- **Gradient checkpointing**: Enabled
|
| 70 |
|
| 71 |
+
## Limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
- Trained on Ohio-specific case law; may not generalize to other jurisdictions
|
| 74 |
+
- Small corpus (864 examples) — best used as a starting point for further fine-tuning
|
| 75 |
+
- Not a substitute for legal advice
|
| 76 |
|
| 77 |
+
## License
|
| 78 |
|
| 79 |
+
Apache 2.0
|
| 80 |
|
| 81 |
+
## Citation
|
| 82 |
|
| 83 |
+
```bibtex
|
| 84 |
+
@misc{ohiocustodybert2026,
|
| 85 |
+
title={OhioCustodyBERT: Domain-Adapted Language Model for Ohio Family Law},
|
| 86 |
+
author={Phoenix Intelligence LLC},
|
| 87 |
+
year={2026},
|
| 88 |
+
publisher={Hugging Face},
|
| 89 |
+
url={https://huggingface.co/Roderick3rd/OhioCustodyBERT}
|
| 90 |
+
}
|
| 91 |
+
```
|