law-il-E2B

A Hebrew legal language model built by BrainboxAI, fine-tuned on 17,613 Israeli legal documents.

law-il-E2B is a domain-specific model designed to understand and respond to questions about Israeli law. It was trained on real court rulings from the Israeli Supreme Court, family courts, and criminal courts, combined with thousands of citizens' rights articles and contract analysis examples.

This model is part of BrainboxAI's effort to make legal knowledge more accessible through AI.

What it can do

  • Answer questions about Israeli law in natural Hebrew
  • Analyze court rulings and identify key legal principles
  • Explain citizens' rights (labor, housing, insurance, disability, pensions)
  • Review contract clauses and flag legal implications
  • Reference specific Israeli statutes when relevant

Semi-formal reasoning

The model uses a structured reasoning approach via its system prompt. Instead of generating free-form text, it follows a fixed reasoning path for every legal question:

  1. Identify the relevant law, section number, and year
  2. Explain the provision in plain language
  3. Give a practical example
  4. Cite relevant case law if available
  5. End with a commonly overlooked detail

This semi-formal structure produces more consistent, useful answers compared to open-ended generation - especially important for a small (2B) model where unstructured output tends to drift.

Quickstart

Ollama

ollama run hf.co/BrainboxAI/law-il-E2B

llama.cpp

llama-cli \
  -m gemma-4-E2B-it.Q4_K_M.gguf \
  -p "<start_of_turn>user\nמה הזכויות שלי כשוכר דירה?<end_of_turn>\n<start_of_turn>model\n" \
  --repeat-penalty 1.3 -n 512

Python

from llama_cpp import Llama

llm = Llama(model_path="gemma-4-E2B-it.Q4_K_M.gguf", n_ctx=2048)

output = llm(
    "<start_of_turn>user\nמה אומר החוק לגבי פיצויי פיטורים?<end_of_turn>\n<start_of_turn>model\n",
    max_tokens=512,
    temperature=0.7,
    repeat_penalty=1.3,
    stop=["<end_of_turn>"],
)

print(output["choices"][0]["text"])

Training details

Base model google/gemma-4-E2B-it (2B parameters)
Method QLoRA via Unsloth
Dataset BrainboxAI/legal-training-il
Samples 17,613
Epochs 20
Steps 500
LoRA rank 64
Hardware NVIDIA RTX 5090

Training data

The model was trained on a curated dataset covering multiple areas of Israeli law:

Source Count Description
Israeli court rulings 7,960 Supreme Court, family courts, criminal and civil courts
Kol-Zchut (כל-זכות) 2,353 Citizens' rights across labor, housing, health, insurance, disability
Israeli legislation 300 Laws from the Open Law Book (ספר החוקים הפתוח)
Contract clauses 7,000 41 contract types with clause-level analysis

60% of the training data is in Hebrew, 40% in English.

Files

File Size Description
gemma-4-E2B-it.Q4_K_M.gguf ~1.5 GB 4-bit quantized, recommended for inference
gemma-4-E2B-it.BF16-mmproj.gguf ~987 MB Vision projection weights

The full-precision safetensors version is available at BrainboxAI/law-il-E2B-safetensors for further fine-tuning or format conversion.

Intended use

This model is intended as a research and educational tool. It can help users understand their legal rights, explore relevant legislation, and get a starting point for legal research.

It is not a substitute for professional legal advice from a licensed attorney. Legal questions with real consequences should always be reviewed by a qualified professional.

Known limitations

  • 2B parameter model - may lack depth on complex, multi-layered legal questions
  • May generate inaccurate statute numbers or case references
  • Stronger on labor law and citizens' rights due to training data composition
  • Court ruling analysis tends toward summaries rather than deep legal reasoning
  • English contract analysis uses template-based outputs

About BrainboxAI

BrainboxAI is an AI agency based in Israel, building specialized AI solutions for businesses - including business intelligence tools, cybersecurity scanning, and domain-specific Hebrew language models.

For questions, collaborations, or enterprise inquiries: support@brainboxai.io

License

This model is released under the Apache 2.0 License, subject to the Gemma Terms of Use.

Downloads last month
-
GGUF
Model size
5B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for BrainboxAI/law-il-E2B

Quantized
(68)
this model

Dataset used to train BrainboxAI/law-il-E2B