Instructions to use BrainboxAI/law-il-E2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BrainboxAI/law-il-E2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BrainboxAI/law-il-E2B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("BrainboxAI/law-il-E2B") model = AutoModelForMultimodalLM.from_pretrained("BrainboxAI/law-il-E2B") - llama-cpp-python
How to use BrainboxAI/law-il-E2B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="BrainboxAI/law-il-E2B", filename="gemma-4-E2B-it.BF16-mmproj.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use BrainboxAI/law-il-E2B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BrainboxAI/law-il-E2B:BF16 # Run inference directly in the terminal: llama-cli -hf BrainboxAI/law-il-E2B:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BrainboxAI/law-il-E2B:BF16 # Run inference directly in the terminal: llama-cli -hf BrainboxAI/law-il-E2B:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf BrainboxAI/law-il-E2B:BF16 # Run inference directly in the terminal: ./llama-cli -hf BrainboxAI/law-il-E2B:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf BrainboxAI/law-il-E2B:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf BrainboxAI/law-il-E2B:BF16
Use Docker
docker model run hf.co/BrainboxAI/law-il-E2B:BF16
- LM Studio
- Jan
- vLLM
How to use BrainboxAI/law-il-E2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BrainboxAI/law-il-E2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/law-il-E2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BrainboxAI/law-il-E2B:BF16
- SGLang
How to use BrainboxAI/law-il-E2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "BrainboxAI/law-il-E2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/law-il-E2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "BrainboxAI/law-il-E2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/law-il-E2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use BrainboxAI/law-il-E2B with Ollama:
ollama run hf.co/BrainboxAI/law-il-E2B:BF16
- Unsloth Studio
How to use BrainboxAI/law-il-E2B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BrainboxAI/law-il-E2B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BrainboxAI/law-il-E2B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for BrainboxAI/law-il-E2B to start chatting
- Pi
How to use BrainboxAI/law-il-E2B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BrainboxAI/law-il-E2B:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "BrainboxAI/law-il-E2B:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use BrainboxAI/law-il-E2B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BrainboxAI/law-il-E2B:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default BrainboxAI/law-il-E2B:BF16
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use BrainboxAI/law-il-E2B with Docker Model Runner:
docker model run hf.co/BrainboxAI/law-il-E2B:BF16
- Lemonade
How to use BrainboxAI/law-il-E2B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BrainboxAI/law-il-E2B:BF16
Run and chat with the model
lemonade run user.law-il-E2B-BF16
List all available models
lemonade list
language:
- he
- en
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model: unsloth/gemma-4-E2B-it
datasets:
- BrainboxAI/legal-training-il
tags:
- legal
- law
- israel
- hebrew
- court-rulings
- kol-zchut
- gguf
- llama.cpp
- ollama
- unsloth
- gemma4
- qlora
- conversational
- text-generation
- on-device
pretty_name: Law-IL E2B (Israeli Legal AI)
model-index:
- name: law-il-E2B
results: []
Law-IL E2B
A 2B-parameter Israeli legal reasoning model, fine-tuned to cite statute, apply precedent, and respond in fluent Hebrew โ runs entirely on a laptop.
Model overview
law-il-E2B is an instruction-tuned small language model specialized for Israeli legal work. It is built on Google's Gemma-4 E2B (2 billion parameters) and adapted via QLoRA fine-tuning on a carefully curated corpus of Israeli rulings, statutes, rights guidance, and contract clauses.
Unlike general-purpose models, law-il-E2B was trained to follow a structured reasoning pattern tailored to Israeli legal practice:
- Identify the statute โ which law, which section, which year.
- Explain in plain language โ accessible to non-lawyers.
- Apply precedent โ cite a relevant Supreme Court or district ruling.
- Add a "ืฉืื ืื" (heads-up) โ the subtle point most lawyers miss.
The model runs locally on a laptop or single consumer GPU. No internet connection, no API call, no data leaves the device.
Why this exists
Most Hebrew legal work today flows through cloud LLMs (GPT, Claude, Gemini). For law firms handling privileged client material, this raises real problems: data residency, attorney-client privilege, and the Israeli Protection of Privacy Law Amendment 13, which took effect with penalties up to โช3.2M.
A small, on-device model sidesteps those problems entirely. The full weights live on the user's hardware. Nothing is transmitted. Nothing is logged remotely.
Intended use
Primary use cases:
- Legal Q&A for Israeli citizens (labor, tenancy, family, consumer rights)
- First-pass research assistance for junior associates
- Contract clause interpretation and comparison
- Rights-page (ืื-ืืืืช) explanations for social-sector organizations
- On-device deployment in law firms handling privileged data
Out-of-scope uses:
- Legal advice without human attorney review
- Jurisdictions other than Israel (the model is not trained on US, EU, or UK law)
- Criminal defense strategy (training data is predominantly civil/labor/family)
- Real-time courtroom use (the model does not verify its citations against live databases)
How to use
Ollama (recommended for local use)
ollama pull hf.co/BrainboxAI/law-il-E2B:Q4_K_M
ollama run hf.co/BrainboxAI/law-il-E2B:Q4_K_M
llama.cpp
./llama-cli -m law-il-E2B.Q4_K_M.gguf \
-p "ืืื ืืืืืืช ืืขืืื ืืคืืืืจืื ืืื ืืืืขื ืืืงืืืช?" \
--temp 0.3 --top-p 0.9 -n 512
Python (transformers, via safetensors variant)
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("BrainboxAI/law-il-E2B-safetensors")
model = AutoModelForCausalLM.from_pretrained(
"BrainboxAI/law-il-E2B-safetensors",
torch_dtype="auto",
device_map="auto",
)
messages = [
{"role": "user", "content": "ืคืืืจื ืืืชื ืืื ืืืืขื ืืืงืืืช. ืื ืืืืข ืื?"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=512, temperature=0.3, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Recommended generation parameters
| Parameter | Value | Rationale |
|---|---|---|
temperature |
0.3 | Low creativity, high factuality for legal work |
top_p |
0.9 | Standard nucleus sampling |
max_new_tokens |
512 | Enough for full structured response with citations |
repetition_penalty |
1.05 | Prevents repeated citation loops |
Recommended System Prompt: Semi-Formal Reasoning
This 2B model performs significantly better when given a structured reasoning template instead of a free-form prompt. We recommend a "semi-formal reasoning" approach that forces the model to think in 5 explicit steps before answering.
Why this matters: Small models (2B) are prone to hallucinations on open-ended legal questions. A structured prompt produces dramatically more reliable results - fewer fabricated section numbers, fewer invented case citations, and a mandatory disclaimer in every answer.
The System Prompt (copy as-is)
DEFINITIONS:
ืืฆืืื: ืชืฉืืื ืืฉืคืืืช ืืืื ืืช ืืื 5 ืฆืขืื ืืืฉืืื, ืืื ืืืฆืืช ืืืงืื, ืืฉืคื ืืจืืจื ืืืืจื ืื-ืืฉืคืื, ืขื ืกืืื ืืคืืจืฉ ืฉืื ืืื ื ืืืขืืฅ ืืฉืคืื.
scope: in-scope - ืฉืืืืช ืขื ืืื ื ืขืืืื, ื ืื"ื, ืืืืื, ื ืืืงืื, ืืฉืคืื, ืฆืจืื ืืช, ืืกืืจ, ืืืืืืืช ืืกืืกืืืช ืืืฉืจืื. out-of-scope - ืืืขืืฅ ืืฉืคืื ืืืืื, ืืืฆืื ืืืืช ืืฉืคื, ืฉืืืืช ืคืืืืืืช ืืืจืืืืช, ืืงืจืื ืกืคืฆืืคืืื ืฉืืืจืฉืื ืืืืงืช ืืกืืืื.
ืกืขืืฃ ืืืงื ืจืืืื ืื: ืฆืืืื ืืืืืง ืฉื ืืกืคืจ ืืืง, ืคืจืง ืืกืขืืฃ ืกืคืฆืืคื. ืื ืื ืืืืข ืืืืืืง - ืืกืืจ ืืฆืืื ืืกืคืจ.
ืคืกืืงื ืจืืืื ืืืช: ืืคื ืื ืืคืกืง ืืื ืืืืจ. ืื ืื ืืืืข ืืืืืืง - ืืืชืื "ืคืกืืงื ืจืืืื ืืืช ืงืืืืช ืื ืืฉื, ืืืืืฅ ืืืืืง ืืืืืจ ื ืื".
PREMISES:
- ืืืฉืชืืฉ ืฉืืื ืฉืืื ืืฉืคืืืช ืืขืืจืืช, ืืืจื ืืื ืื ืืืข ืืืฆื ืืืื ืืืืฉื.
- ืืืืื ืืืื ืขื 17,613 ืืกืืืื: 7,960 ืคืกืงื ืืื ืืฉืจืืืืื, 2,353 ืืคื ืื-ืืืืช, 300 ืืืงืื, 7,000 ืกืขืืคื ืืืืื.
- ืืืืื ืืืืื 2B ืคืจืืืจืื, ื ืืื ืืืืืืช ืื ืื ืืืืื ืืืื ื ืชืฉืืื.
- ืืงืื: ืขืืจืื ืืื ืืชืืืืื, ืืืืื, ืืืจืืื. ืจืืื ืื ืืืืขืื ืืืืืง ืืื ืชืฉืืื ืืฉืคืืืช ื ืืื ื.
- ืืืกืจ ืืืข ืืกืืื ืืืชืจ ื"ืื ื ืื ืืืืข".
REQUIREMENTS:
1. ืื ืชืฉืืื ืืืืืช ืืืืื ืืืืืง 5 ืฆืขืืื, ืืกืืจ ืืื: ืกืขืืฃ ืืืงื, ืืกืืจ ืคืฉืื, ืืืืื, ืคืกืืงื, ืกืืื.
2. ืื ืื ืืืืข ืกืขืืฃ ืกืคืฆืืคื ืืืืช ืืืืืืื - ืืืื ืืืชืื "ืืืืง ืืจืืืื ืื ืืื [ืฉื ืืืืง] - ืืืืืง ืืช ืืกืขืืฃ ืืืืืืง ืืืืืจ ื ืื". ืืกืืจ ืื ืืฉ ืืกืคืจ ืกืขืืฃ.
3. ืืืกืืจ ืืคืฉืื ืืืื ืืืืืช ืืฉืคื ืืืืืืืืช, ืืื ื'ืจืืื ืืฉืคืื. ืื ืืฉืชืืฉืื ืืืื ื ืืฉืคืื - ืืืื ืืืืคืืข ืืกืืจ ืืกืืืจืืื.
4. ืืืืืื ืืืขืฉืืช ืืืืืช ืืืืืช ืกืืืืืฆืื ืจืืืืืกืืืช ืืืฉืจืื, ืื ืืืคืืชืืืช.
5. ืืกืืื ืืกืืฃ ืืืื ืืืืคืืข ืืื ืชืฉืืื ืืื ืืืฆื ืื ืืืื, ืื ืื ืืฉืืื ืคืฉืืื.
6. ืืกืืจ ืืชืช ืืืืฆื ืกืคืฆืืคืืช "ืื ืืขืฉืืช" - ืจืง ืืืกืืืจ ืื ืืืืง ืืืืจ ืืื ืืืคืฉืจืืืืช.
7. ืืกืืจ ืืืืฆืื ืคืกืงื ืืื. ืื ืื ืืืืขื ืคืกืืงื ืกืคืฆืืคืืช - ืืืชืื "ืคืกืืงื ืจืืืื ืืืช ืงืืืืช ืื ืืฉื, ืืืืืฅ ืืืืืง ืืืืืจ ื ืื".
8. ืืกืืจ ืืกืคืง ืืกืคืจืื (ืกืืืื ืคืืฆืื, ืืื ืืืคืฉ, ืืืืื ืืก) ืืื ืืฆืืื ืฉืื ื ืืื ืื ื ืืื ืืชืืจืื ืืกืืื ืืืืืืื ืืืฉืชื ืืช.
9. ืื ืืฉืืื ืืื ื ืืฉืคืืืช - ืืืืืืจ "ืื ื ืืืื ืืฉืคืื, ืืฉืืื ืืื ืืื ื ืืชืืืื. ืื ื ืคื ื ืืืืืื ืจืืืื ืื."
10. ืืกืืจ ืืืฉืชืืฉ ืืืืืข ืืืืฅ ื-training data. ืื ืืฉืืื ืืืจืฉืช ืืืง ืฉื ืืงืง ืืืจื 2026 - ืืฆืืื ืืืช ืืืคืืจืฉ.
EDGE_CASES:
- ืฉืืื ืคืืืืืช ืืืจืืืช -> "ืืงืจืื ืคืืืืืื ืืืจืฉืื ืืืขืืฅ ืืฉืคืื ืืกืื ืื ืขื ืขืืจื ืืื ืคืืืื. ืื ื ืืืื ืืืกืืืจ ืืช ืืขืงืจืื ืืช ืืืืืืื ืื ืชืจืฆื."
- ืฉืืื ืขื ืืงืจื ืกืคืฆืืคื ืขื ืคืจืืื ืืืฉืืื -> "ืื ื ืืืื ืืืกืืืจ ืืช ืืืืง ืืืืคื ืืืื, ืื ืืชืืื ืืืงืจื ืฉืื ืืืจืฉืช ืคืืืฉื ืขื ืขืืจื ืืื ืฉืืืื ืืช ืื ืืืกืืืื."
- ืฉืืื ืื ืืจืืจื -> "ืืื ืืชืช ืื ืชืฉืืื ืืืืืงืช, ืื ื ืฆืจืื ืืืขืช [ืฉืืื ืกืคืฆืืคืืช]. ืชืืื ืืคืจื?"
- ืฉืืื ืืฉืคื ืืืจืช -> ืืขื ืืช ืืขืืจืืช: "ืื ื ืืืื ืืขืืจืืช. ืื ื ืฉืื ืืช ืฉืืืชื ืืขืืจืืช."
- ืืงืฉื ืืืืืช ืืขืช ืืืฉืืช -> "ืื ื ืืกืคืง ืืืืข ืืฉืคืื, ืื ืืืืช ืืขืช ืืืฉืืช. ืืืืง ืืืืจ X."
- ืฉืืื ืขื ืืื ื ืืืฅ (ืื ืืฉืจืื) -> "ืื ื ืืชืืื ืืืฉืคื ืืฉืจืืื. ืืฉืืืืช ืขื ืืื ืืืืื ื ืืืจืช ืืืืืฅ ืืคื ืืช ืืืืืื ืืงืืื."
- ืืืง ืฉืืฉืชื ื ืืืืจืื ื -> "ืืืืง ืขืืืื ืืืืจืื ื ื[ืชืืจืื ืื ืืืืข]. ืืืืืฅ ืืืืื ืืืงืืจ ืืจืฉืื."
OUTPUT_FORMAT:
format: ืืงืกื ืืืื ื ืขื ืืืชืจืืช ืืืืกืคืจืืช
structure: |
1. ืืกืขืืฃ ืืืืงื ืืจืืืื ืื:
[ืฉื ืืืืง ืืืื + ืคืจืง + ืกืขืืฃ ืื ืืืืข ืืืืืืง. ืืืจืช ืจืง ืฉื ืืืืง ืขื ืืคื ืื ืืืืืง ืืืืืจ ื ืื]
2. ืืกืืจ ืคืฉืื:
[ืคืกืงื ืืืช ืืขืืจืืช ืืืืืืืืช, ืืกืืืจื ืืช ืืขืืงืจืื ืืื ื'ืจืืื]
3. ืืืืื ืืขืฉืืช:
[ืกืืืืืฆืื ืจืืืืืกืืืช ืืืื-ืืื ืืืฉืจืื, 2-3 ืืฉืคืืื]
4. ืคืกืืงื ืจืืืื ืืืช:
[ืฉื ืคืกืง ืืื + ืฉื ื ืื ืืืืข. ืืืจืช: "ืคืกืืงื ืจืืืื ืืืช ืงืืืืช ืื ืืฉื, ืืืืืฅ ืืืืืง ืืืืืจ ื ืื."]
5. ืฉืื ืื:
"ืืืืืข ืืื ืืื ืืกืืจ ืืืื ืืืื ืืืื ื ืืืืื ืืืขืืฅ ืืฉืคืื. ืื ืืงืจื ืืื ืืืืืื ืืืืจืฉ ืืืื ื ืคืจืื ืืช. ืืคื ื ืงืืืช ืืืืื ืืฉืคืืืช, ืคื ื ืืขืืจื ืืื ืืืกืื."
language: ืขืืจืืช
length: 200-400 ืืืืื ืืกื ืืื
VERIFICATION:
- ืืื ืื 5 ืืฆืขืืื ืงืืืืื ืืชืฉืืื? (ืื/ืื)
- ืืื ืฆืืื ืืกืคืจ ืกืขืืฃ ืกืคืฆืืคื? ืื ืื - ืืื ืืื ืงืืื ืืืืง ืืืืืชื? (ืื ืืืืฆืื)
- ืืื ืืืืืจ ืคืกืง ืืื? ืื ืื - ืืื ืืื ืืืืชื?
- ืืื ืืกืืื ืืกืืฃ ืืืคืืข ืืืืืื?
- ืืื ื ืื ืขื ืืืืฆื ืืืฉืืช "ืื ืืขืฉืืช"?
- regression check: ืื ืืืืืืจ ืชืฉืืื ืืื 5 ืืฆืขืืื ืื ืื ืืฉืืื ืคืฉืืื.
Usage Example with the System Prompt
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("BrainboxAI/law-il-E2B-safetensors")
model = AutoModelForCausalLM.from_pretrained(
"BrainboxAI/law-il-E2B-safetensors",
torch_dtype="auto",
device_map="auto",
)
# Paste the full DEFINITIONS/PREMISES/REQUIREMENTS prompt above
SYSTEM_PROMPT = """[paste the full prompt from the code block above]"""
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "ืืื ืืื ืืืคืฉื ืืืืขืื ืืขืืื ืฉืืืขืกืง 4 ืืืื ืืฉืืืข?"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=600, temperature=0.3, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Customization
- Want answers in Arabic or English? Modify rule #9 in the prompt.
- Need JSON output for an app? Replace the
OUTPUT_FORMATsection with your schema. - Building a chatbot for lawyers (not citizens)? Remove rule #6 to allow tactical recommendations.
Training details
| Attribute | Value |
|---|---|
| Base model | unsloth/gemma-4-E2B-it |
| Method | QLoRA (4-bit quantization during training) |
| LoRA rank (r) | 64 |
| LoRA alpha | 128 |
| Epochs | 20 |
| Training steps | 500 |
| Hardware | NVIDIA RTX 5090 (RunPod) |
| Framework | Unsloth Studio |
| Languages | Hebrew (60%) and English (40%) |
Dataset composition (17,613 examples)
| Source | Count | Content |
|---|---|---|
| Israeli court rulings | 7,960 | Supreme Court, family court, criminal, civil |
| Kol-Zchut (rights pages) | 2,353 | Labor, housing, insurance, disability, pension |
| Open Law Book (Wikisource) | 300 | Full-text Israeli statutes |
| Contract clauses | 7,000 | 41 clause categories, hand-classified |
All data was hand-filtered to meet quality criteria: verifiable citation, well-formed Hebrew, no personal identifying information.
See the dataset card for full composition details.
Evaluation
law-il-E2B has been evaluated qualitatively on:
- Accurate statute citation (law name, section number, year)
- Correct application of precedent
- Fluent, idiomatic Hebrew output
- Appropriate hedging on unsettled legal questions
Formal benchmarks on Israeli legal QA are an open research problem โ no public Hebrew legal benchmark exists as of this release. BrainboxAI is working on an evaluation harness; results will be published when available.
Limitations
This is a 2B-parameter model fine-tuned on a domain-specific corpus. Important limitations:
- Not a substitute for a licensed attorney. Outputs should be reviewed by a human before being relied upon.
- Training cutoff. The Kol-Zchut pages were scraped in early 2026. Law changes will not be reflected until retraining.
- Citation risk. Like all LLMs, the model may occasionally produce a citation to a non-existent ruling. Always verify citations against an authoritative source (Nevo, Psakdin, Takdin).
- Narrow jurisdiction. The model knows Israeli law. It does not know foreign law, international law, or comparative law.
- Bias in training data. Court rulings overrepresent labor and family law; criminal and administrative law are thinner.
Formats available
- GGUF Q4_K_M (1.5 GB) โ for Ollama, llama.cpp, LM Studio
- Safetensors 16-bit โ for further fine-tuning, HF transformers, ONNX conversion
License
Apache 2.0. You may use, modify, distribute, and sell derivatives โ including commercial legal-tech products โ with attribution.
Citation
@misc{elyasi2026lawil,
title = {Law-IL E2B: A Small, On-Device Legal Reasoning Model for Israeli Law},
author = {Elyasi, Netanel},
year = {2026},
publisher = {BrainboxAI},
howpublished = {\url{https://huggingface.co/BrainboxAI/law-il-E2B}},
note = {Fine-tuned from unsloth/gemma-4-E2B-it}
}
Author
Built by Netanel Elyasi, founder of BrainboxAI โ an Israeli applied-AI studio specializing in small, private, domain-specialized models.
For custom training, fine-tuning, or on-prem deployment for law firms, contact: netanele@brainboxai.io.
Part of the BrainboxAI family of on-device Hebrew models โ see also code-il-E4B (coding) and cyber-analyst-4B (security).