common-pile/caselaw_access_project dataset — a large corpus of U.S. court decisions.| 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 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model = AutoModelForCausalLM.from_pretrained("yasserrmd/caselaw-cpt-8b").to("cuda")
5tokenizer = AutoTokenizer.from_pretrained("yasserrmd/caselaw-cpt-8b")
6
7prompt = "Q: What are the three conditions for res ipsa loquitur to apply?\nA:"
8inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
9
10with torch.no_grad():
11 outputs = model.generate(
12 **inputs,
13 max_new_tokens=100,
14 temperature=0.7,
15 top_p=0.9,
16 )
17
18print(tokenizer.decode(outputs[0], skip_special_tokens=True))“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.”
config.jsonpytorch_model.bin or adapter_model.bin (if LoRA)tokenizer_config.jsontokenizer.model / tokenizer.jsongeneration_config.json