This model is a
Continued Pretrained Language Model (CPT)
based on a 7B parameter LLaMA architecture, further trained on the
common-pile/caselaw_access_project
dataset — a large corpus of U.S. court decisions.
The goal of this model is to
adapt a general LLM to legal language
, style, and reasoning patterns, enabling more accurate and fluent completions, clause generation, and preliminary legal Q&A.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained("yasserrmd/caselaw-cpt-8b").to("cuda")
tokenizer = AutoTokenizer.from_pretrained("yasserrmd/caselaw-cpt-8b")
prompt = "Q: What are the three conditions for res ipsa loquitur to apply?\nA:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.7,
top_p=0.9,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
🧪 Example Output
“The three conditions are that the defendant had exclusive control over the instrumentality that caused the plaintiff's injury, the plaintiff's injury was the type of injury that would not occur in the absence of negligence, and the plaintiff was not guilty of contributory negligence.”
📊 Evaluation
While not instruction-tuned, the model demonstrates:
✅ Strong fluency in legal domain terminology
✅ Structured legal logic in completions
✅ Promising zero-shot performance on legal questions
The base model follows its original license (Meta AI or Unsloth), and the Caselaw Access Project is in the public domain.
This checkpoint is provided
for research and educational use only
. Not intended for actual legal advice or decisions.
caselaw-cpt-8b huggingface.co is an AI model on huggingface.co that provides caselaw-cpt-8b's model effect (), which can be used instantly with this yasserrmd caselaw-cpt-8b model. huggingface.co supports a free trial of the caselaw-cpt-8b model, and also provides paid use of the caselaw-cpt-8b. Support call caselaw-cpt-8b model through api, including Node.js, Python, http.
caselaw-cpt-8b huggingface.co is an online trial and call api platform, which integrates caselaw-cpt-8b's modeling effects, including api services, and provides a free online trial of caselaw-cpt-8b, you can try caselaw-cpt-8b online for free by clicking the link below.
yasserrmd caselaw-cpt-8b online free url in huggingface.co:
caselaw-cpt-8b is an open source model from GitHub that offers a free installation service, and any user can find caselaw-cpt-8b on GitHub to install. At the same time, huggingface.co provides the effect of caselaw-cpt-8b install, users can directly use caselaw-cpt-8b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.