Downloads · 30 days
7
8% of all-time downloads
israelburns/jeremy-gemma4
jeremy-gemma4 is a text generation model from israelburns. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
[](https://www.kaggle.com/competitions/gemma-4-good-hackathon) [](https://github.com/israelburns/gemma4-good-hackathon) [](https://prosenetwork.org/demo)
Downloads · 30 days
7
8% of all-time downloads
All-time downloads
84
Public
Repo size
615 MB
Likes
0
Public
Click a slice to open those files.
.safetensors286 MB · 63%
From the Hugging Face model README
A QLoRA adapter fine-tuned on Gemma 4 E4B for legal procedural guidance. Built for the Gemma 4 Good Hackathon as part of the Pro Se Network — free legal AI infrastructure for self-represented litigants.
80% of low-income Americans cannot afford a lawyer. Jeremy AI is a nonprofit infrastructure project that gives self-represented litigants a trained legal procedural guide — free, self-hostable, and deployable anywhere in the world at $0 per conversation.
The choice of Gemma 4 open weights is a mission requirement, not a technical preference. A per-token API bill is not acceptable for legal aid organizations.
Jeremy is a legal procedural guidance engine — not a legal advice chatbot. It:
It runs on top of a deterministic rule engine covering 12 areas of law across 13 U.S. jurisdictions. The LLM never decides the law — rules are loaded from verified JSON databases.
5,196 legal Q&A pairs from 5 free sources — israelburns/jeremy-training-data
| Source | Pairs |
|---|---|
| Synthetic (from rule JSONs) | 959 |
| law.stackexchange.com | 2,805 |
| SEC EDGAR (employment contracts) | 202 |
| CourtListener API (case law) | 1,119 |
| Court self-help guides | 111 |
| Parameter | Value |
|---|---|
| Base model | unsloth/gemma-4-E4B-it-unsloth-bnb-4bit |
| Method | QLoRA |
| Rank (r) | 16 |
| Alpha | 32 |
| Dropout | 0.0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Quantization | 4-bit (NF4 via Unsloth) |
| Seq length | 1024 |
| Epochs | 3 |
| Steps | 927 |
| Batch size | 1 (grad accum 16, effective batch 16) |
| Learning rate | 2e-4 (cosine decay) |
| Optimizer | adamw_8bit |
| GPU | Kaggle T4 (15.6GB, sm_75, fp16) |
| Training time | 5h 18m |
| Cost | $0 |
42,401,792 of 8,038,558,240 total (0.53%)
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
base_model = "google/gemma-4-E4B-it"
adapter = "israelburns/jeremy-gemma4"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(
base_model,
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter)
messages = [
{"role": "system", "content": "You are Jeremy, a legal procedural guidance AI for the Pro Se Network. You help self-represented litigants understand legal procedures. You are NOT a lawyer. Procedural guidance only, never legal advice. Always include a disclaimer."},
{"role": "user", "content": "I was served with a lawsuit in New York. I have 20 days to respond. What do I do?"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Israel "Ace" Burns — Cornell Tech LLM '17 · Co-Founder, Pro Se Network · New York