Downloads · 30 days
21
10% of all-time downloads
mufeedh28/dictalm2-israeli-law-pretrain-merged
dictalm2-israeli-law-pretrain-merged is a text generation model from mufeedh28. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A Hebrew legal language model fine-tuned on 140,000+ Israeli legal documents. Built for understanding, generating, and working with Israeli law, court rulings, and civil rights content.
Downloads · 30 days
21
10% of all-time downloads
All-time downloads
209
Public
Parameters
7.3B
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
A Hebrew legal language model fine-tuned on 140,000+ Israeli legal documents. Built for understanding, generating, and working with Israeli law, court rulings, and civil rights content.
| Base Model | dicta-il/dictalm2.0 (Mistral-based, 7B params) |
| Training | Continued pretraining with QLoRA (4-bit) via Unsloth |
| Language | Hebrew |
| Domain | Israeli law, court rulings, legislation, civil rights |
| License | Apache 2.0 |
The model was trained on ~140,000 Israeli legal documents from four sources:
| Source | Documents | Description |
|---|---|---|
| Israeli Courts (court.gov.il) | ~97,000 | Supreme Court and district court rulings |
| Kol-Zchut (kolzchut.org.il) | ~5,300 | Citizens' rights guides and legal explainers |
| Wikisource Laws | ~3,800 | Israeli legislation and basic laws |
| Total (after filtering) | ~106,000 |
Data Pipeline:
| Parameter | Value |
|---|---|
| GPU | NVIDIA A100-SXM4-40GB |
| Precision | BF16 + 4-bit QLoRA |
| LoRA rank | 64 |
| LoRA target modules | q, k, v, o, gate, up, down projections |
| Trainable parameters | 167M / 7.4B (2.26%) |
| Batch size | 16 (4 x 4 gradient accumulation) |
| Learning rate | 2e-4 (cosine schedule) |
| Epochs | 1 |
| Context length | 2,048 tokens |
| Packing | Enabled |
| Training time | ~7.75 hours |
| Framework | Unsloth + HuggingFace TRL |
| Step | Train Loss | Val Loss |
|---|---|---|
| 500 | 0.850 | 0.827 |
| 1000 | 0.781 | 0.816 |
| 2000 | 0.794 | 0.801 |
| 4000 | 0.697 | 0.782 |
| 6000 | 0.636 | 0.770 |
| 8000 | 0.564 | 0.769 |
| 8785 | 0.700 | 0.769 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("mufeedh28/dictalm2-israeli-law-merged")
tokenizer = AutoTokenizer.from_pretrained("mufeedh28/dictalm2-israeli-law-merged")
prompt = "בית המשפט העליון פסק כי"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7, top_p=0.9, repetition_penalty=1.15)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained("mufeedh28/dictalm2-israeli-law-merged")
FastLanguageModel.for_inference(model)
inputs = tokenizer("חוק יסוד: כבוד האדם וחירותו קובע כי", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Prompt: חוק יסוד: כבוד האדם וחירותו קובע כי
כל אדם זכאי להגנה על חייו, גופו וכבודו. הזכות להגנה עצמית היא חלק מהזכות לכבוד. בנסיבות של הגנה עצמית מותר לאדם לתקוף את מי שמאיים עליו או תוקף אותו כדי להפסיק את התקיפה או למנוע אותה. שימוש בכוח במצב של הגנה עצמית מוגבל למידה הסבירה הדרושה בנסיבות המקרה.
Prompt: על פי חוק השכירות והשאילה
שטר-חוב הוא סוג מסוים של ערובה שמותר לדרוש משוכר דירה להפקיד בידי המשכיר. שטר-החוב צריך לעמוד בכל התנאים הבאים כדי שיהיה תקף: שוכרי הדירה יהיו רשומים בו כחייבים, על שטר החוב יופיע סכום כספי, השטר יהיה בר פרעון באופן מיידי עם דרישה של בעל הדירה.
@misc{dictalm2-israeli-law,
title={DictaLM 2.0 - Israeli Law},
author={Mufeed Haj},
year={2026},
url={https://huggingface.co/mufeedh28/dictalm2-israeli-law-merged},
note={Fine-tuned from dicta-il/dictalm2.0 on Israeli legal corpus}
}