mufeedh28/dictalm2-israeli-law-pretrain-merged
020
DictaLM 2.0 - Israeli Law
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.
Model Details
Training Data
The model was trained on ~140,000 Israeli legal documents from four sources:
Data Pipeline:
- Text cleaning and normalization (niqqud removal, whitespace, template stripping)
- PII scrubbing (Israeli ID numbers, phone numbers, emails, credit cards)
- Quality filtering (minimum length, Hebrew ratio, repetition, boilerplate)
- Near-deduplication via MinHash LSH (threshold 0.7)
- Source balancing: Kol-Zchut and Wikisource upsampled 5x to balance court dominance
Training Details
Training Loss
Usage
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))With Unsloth (faster inference)
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))Example Outputs
Prompt: חוק יסוד: כבוד האדם וחירותו קובע כי
כל אדם זכאי להגנה על חייו, גופו וכבודו. הזכות להגנה עצמית היא חלק מהזכות לכבוד. בנסיבות של הגנה עצמית מותר לאדם לתקוף את מי שמאיים עליו או תוקף אותו כדי להפסיק את התקיפה או למנוע אותה. שימוש בכוח במצב של הגנה עצמית מוגבל למידה הסבירה הדרושה בנסיבות המקרה.
Prompt: על פי חוק השכירות והשאילה
שטר-חוב הוא סוג מסוים של ערובה שמותר לדרוש משוכר דירה להפקיד בידי המשכיר. שטר-החוב צריך לעמוד בכל התנאים הבאים כדי שיהיה תקף: שוכרי הדירה יהיו רשומים בו כחייבים, על שטר החוב יופיע סכום כספי, השטר יהיה בר פרעון באופן מיידי עם דרישה של בעל הדירה.
Intended Use
- Legal text completion and generation
- Hebrew legal NLP research
- Legal document understanding and analysis
- Building legal search and retrieval systems
- Educational tools for Israeli law
Limitations
- This is a text completion model, not a chatbot. It continues text, not answers questions.
- May generate plausible-sounding but incorrect legal information. Do not use as legal advice.
- Trained primarily on court rulings — may be less knowledgeable about specific regulatory domains.
- May occasionally reproduce patterns from training data.
- Hebrew-only. Performance on other languages will match the base DictaLM 2.0 model.
Citation
@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}
}Acknowledgments
- Dicta - The Israel Center for Text Analysis for the base DictaLM 2.0 model
- Unsloth for efficient fine-tuning
- Israeli Courts, Kol-Zchut, and Hebrew Wikisource for the source data
