yasserrmd / caselaw-cpt-8b

huggingface.co
Total runs: 34
24-hour runs: -2
7-day runs: 1
30-day runs: 15
Model's Last Updated: July 18 2025
text-generation

Introduction of caselaw-cpt-8b

Model Details of caselaw-cpt-8b

🏛️ Caselaw-CPT-7B

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.


🧠 Model Summary
Feature Value
Base model LLaMA-3 7B / Unsloth (4bit)
Type Continued Pretraining (CPT)
Domain Legal (Caselaw, U.S.)
Dataset Caselaw Access Project
Context length 2048
Quantization 4-bit via Unsloth

📜 Intended Use

This model is ideal for:

  • 📄 Legal clause completions
  • 🤖 Legal-style generation (opinions, summaries)
  • ❓ Basic legal Q&A (zero-shot, surprisingly strong)
  • 📚 Precursor to legal instruction tuning

🚀 Example Usage
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

For downstream evaluation, consider testing on:

  • LegalBench QA
  • SODA Law
  • Instruct-tuned legal tasks (summarization, classification)

📦 Files Included
  • config.json
  • pytorch_model.bin or adapter_model.bin (if LoRA)
  • tokenizer_config.json
  • tokenizer.model / tokenizer.json
  • (Optional) generation_config.json

📄 License & Use

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.


🙏 Acknowledgments

This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.

Runs of yasserrmd caselaw-cpt-8b on huggingface.co

34
Total runs
-2
24-hour runs
1
3-day runs
1
7-day runs
15
30-day runs

More Information About caselaw-cpt-8b huggingface.co Model

More caselaw-cpt-8b license Visit here:

https://choosealicense.com/licenses/apache-2.0

caselaw-cpt-8b huggingface.co

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 Url

https://huggingface.co/yasserrmd/caselaw-cpt-8b

yasserrmd caselaw-cpt-8b online free

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:

https://huggingface.co/yasserrmd/caselaw-cpt-8b

caselaw-cpt-8b install

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.

caselaw-cpt-8b install url in huggingface.co:

https://huggingface.co/yasserrmd/caselaw-cpt-8b

Url of caselaw-cpt-8b

caselaw-cpt-8b huggingface.co Url

Provider of caselaw-cpt-8b huggingface.co

yasserrmd
ORGANIZATIONS

Other API from yasserrmd

huggingface.co

Total runs: 28
Run Growth: 3
Growth Rate: 10.71%
Updated:October 19 2025