BrainboxAI commited on
Commit
523673b
ยท
verified ยท
1 Parent(s): f319e82

Rewrite the model card in English in the BrainboxAI house style; Hebrew kept only in example prompts; repository id unchanged

Browse files
Files changed (1) hide show
  1. README.md +103 -96
README.md CHANGED
@@ -32,61 +32,59 @@ model-index:
32
 
33
  # bx-legal-kochav
34
 
35
- ### ืžื–ื”ื” ื”ืžืื’ืจ: `BrainboxAI/law-il-E2B`
36
 
37
- **ืžื•ื“ืœ ืฉืคื” ืงื˜ืŸ ืœืžืฉืคื˜ ื”ื™ืฉืจืืœื™, ืฉืจืฅ ื›ื•ืœื• ืขืœ ื”ืžื—ืฉื‘ ืฉืœืš. ืฉื•ื ืฉืืœื” ืœื ื™ื•ืฆืืช ื”ื—ื•ืฆื”.**
38
 
39
  [![HF Model](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Model-yellow)](https://huggingface.co/BrainboxAI/law-il-E2B)
40
  [![Dataset](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Dataset-blue)](https://huggingface.co/datasets/BrainboxAI/legal-training-il)
41
  [![Safetensors](https://img.shields.io/badge/Format-Safetensors-green)](https://huggingface.co/BrainboxAI/law-il-E2B-safetensors)
42
  [![License](https://img.shields.io/badge/License-Apache_2.0-lightgrey)](https://www.apache.org/licenses/LICENSE-2.0)
43
 
44
- > **ืขืœ ื”ืฉื.** `bx-legal-kochav` ื”ื•ื ืฉื ื”ืžื•ื“ืœ ื‘ืžื•ืกื›ืžืช ื”ืฉืžื•ืช ืฉืœ BrainboxAI: `bx` ืœื—ื‘ืจื”, `legal` ืœืชื—ื•ื, ื•-`kochav` (ื›ื•ื›ื‘) ืœื“ืจื’ืช ื”ื’ื•ื“ืœ ื”ืงื˜ื ื” ื‘ื™ื•ืชืจ. **ืžื–ื”ื” ื”ืžืื’ืจ ื ืฉืืจ `BrainboxAI/law-il-E2B` ื•ืœื ื™ืฉืชื ื”** โ€” ื›ืœ ืงื™ืฉื•ืจ, ืกืงืจื™ืคื˜ ืื• ืคืงื•ื“ืช ื”ื•ืจื“ื” ืฉื›ืชื‘ืช ืžืžืฉื™ื›ื™ื ืœืขื‘ื•ื“ ื‘ื“ื™ื•ืง ื›ืžื• ืงื•ื“ื.
45
 
46
- > **ืขืœ ื™ืฆื™ื‘ื•ืช ื”ื’ืจืกื”.** ืื™ืžื•ืŸ ื—ื“ืฉ ืขืœ ืื•ืชื” ืžืฉื™ืžื” ื ื“ื—ืฃ ืœืื•ืชื• ืžืื’ืจ ื•ืžืขื“ื›ืŸ ืืช ื”ืžืฉืงื•ืœื•ืช ื‘ืžืงื•ื. ื›ืœื•ืžืจ ืžื™ ืฉื™ื•ืจื™ื“ ื”ื™ื•ื ื•ืฉื•ื‘ ื‘ืขื•ื“ ื—ื•ื“ืฉื™ื™ื ืขืœื•ืœ ืœืงื‘ืœ ืžืฉืงื•ืœื•ืช ืฉื•ื ื•ืช ืชื—ืช ืื•ืชื• ืฉื. ืžื™ ืฉืฆืจื™ืš ื™ืฆื™ื‘ื•ืช ืžื•ื—ืœื˜ืช โ€” ื™ืฆืžื™ื“ ืืช ืขืฆืžื• ืœ-commit ืžืกื•ื™ื ื•ืœื ืœืขื ืฃ ื”ืจืืฉื™.
47
-
48
- > **English.** `law-il-E2B` (brand name `bx-legal-kochav`) is a small Hebrew-first model for Israeli law, fine-tuned from `unsloth/gemma-4-E2B-it` on a 17,613-example curated corpus. It runs fully offline. It is **not** a lawyer, it can fabricate section numbers and case citations, and no formal benchmark has been run on it. This card is in Hebrew; identifiers, code and the recommended system prompt are in English.
49
 
50
  ---
51
 
52
- ## ืžื” ื–ื”, ื‘ืงืฆืจื”
53
 
54
- ืžื•ื“ืœ ืฉืคื” **ืงื˜ืŸ** ืฉืื•ืžืŸ ืขืœ ื—ื•ืžืจ ืžืฉืคื˜ื™ ื™ืฉืจืืœื™. ื”ื•ื ืขื•ื ื” ื‘ืขื‘ืจื™ืช ืขืœ ืฉืืœื•ืช ืžืฉืคื˜ื™ื•ืช ื‘ืžื‘ื ื” ืงื‘ื•ืข: ืื™ื–ื” ื—ื•ืง ืจืœื•ื•ื ื˜ื™, ืžื” ื”ื•ื ืื•ืžืจ ื‘ืฉืคื” ืคืฉื•ื˜ื”, ื“ื•ื’ืžื” ืžื”ื—ื™ื™ื, ืคืกื™ืงื” ืื ื™ืฉ, ื•ื‘ืกื•ืฃ ืกื™ื™ื’.
55
 
56
- ื”ื•ื ื‘ื ื•ื™ ืขืœ [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it) ืฉืœ ื’ื•ื’ืœ, ื•ืื•ืžืŸ ืžืขืœื™ื• ื‘ืฉื™ื˜ืช QLoRA ืขืœ 17,613 ื“ื•ื’ืžืื•ืช ืžืฉืคื˜ื™ื•ืช ืฉื ืืกืคื• ื•ืกื•ื ื ื•.
57
 
58
- **ืžื” ื–ื” ืื•ืžืจ "ืงื˜ืŸ".** ื”ื›ืœ ื ื›ื ืก ื‘ืงื•ื‘ืฅ ืื—ื“ ืฉืœ ื›-3.4 ื’'ื™ื’ื”-ื‘ื™ื™ื˜. ื”ื•ื ืจืฅ ืขืœ ืžื—ืฉื‘ ื ื™ื™ื“ ืจื’ื™ืœ ืื• ืขืœ ื›ืจื˜ื™ืก ืžืกืš ื‘ื™ืชื™. ื”ื•ื ืœื ื‘ืœื™ื’ื” ืฉืœ GPT ืื• Claude ื•ื”ื•ื ืœื ืžื ืกื” ืœื”ื™ื•ืช. ื”ื•ื ืขื•ืฉื” ื“ื‘ืจ ืื—ื“, ื‘ืžืงื•ื ืื—ื“ โ€” ืืฆืœืš.
59
 
60
- ## ืœืžื” ื”ื•ื ืงื™ื™ื
61
 
62
- ืจื•ื‘ ื”ืขื‘ื•ื“ื” ื”ืžืฉืคื˜ื™ืช ื‘ืขื‘ืจื™ืช ืขื•ื‘ืจืช ื”ื™ื•ื ื“ืจืš ืžื•ื“ืœื™ื ื‘ืขื ืŸ. ืœืžืฉืจื“ ืขื•ืจื›ื™ ื“ื™ืŸ ื–ื• ื‘ืขื™ื” ืืžื™ืชื™ืช: ื—ื•ืžืจ ืฉืœ ืœืงื•ื— ื™ื•ืฆื ืžื”ืžืฉืจื“, ื—ื™ืกื™ื•ืŸ ืขื•ืจืš-ื“ื™ืŸ-ืœืงื•ื— ื ืคื’ืข, ื•ืชื™ืงื•ืŸ 13 ืœื—ื•ืง ื”ื’ื ืช ื”ืคืจื˜ื™ื•ืช ื‘ื™ืฉืจืืœ ื”ื•ืกื™ืฃ ืœื–ื” ืงื ืกื•ืช.
63
 
64
- ืžื•ื“ืœ ืฉืจืฅ ืขืœ ื”ืžื—ืฉื‘ ๏ฟฝ๏ฟฝืฆืžื• ืคื•ืชืจ ืืช ื–ื” ืžื”ืฉื•ืจืฉ. ื”ืžืฉืงื•ืœื•ืช ื™ื•ืฉื‘ื•ืช ืขืœ ื”ื—ื•ืžืจื” ืฉืœ ื”ืžืฉืชืžืฉ. ืฉื•ื ื“ื‘ืจ ืœื ื ืฉืœื—, ืฉื•ื ื“ื‘ืจ ืœื ื ืฉืžืจ ืืฆืœ ืืฃ ืื—ื“.
65
 
66
- ## ืœืžื” ื”ื•ื ืžื™ื•ืขื“
67
 
68
- - ืฉืืœื•ืช ื•ืชืฉื•ื‘ื•ืช ืžืฉืคื˜ื™ื•ืช ืœืื–ืจื—: ืขื‘ื•ื“ื”, ืฉื›ื™ืจื•ืช, ืžืฉืคื—ื”, ืฆืจื›ื ื•ืช.
69
- - ืกื‘ื‘ ืžื—ืงืจ ืจืืฉื•ืŸ ืœืžืชืžื—ื” ืื• ืœืขื•ืจืš ื“ื™ืŸ ืฆืขื™ืจ โ€” ืœืคื ื™ ื”ื‘ื“ื™ืงื” ื”ืืžื™ืชื™ืช, ืœื ื‘ืžืงื•ืžื”.
70
- - ื”ืกื‘ืจ ืฉืœ ืกืขื™ืคื™ ื—ื•ื–ื” ื•ื”ืฉื•ื•ืื” ื‘ื™ื ื™ื”ื.
71
- - ื”ืกื‘ืจ ืฉืœ ื“ืคื™ ื–ื›ื•ื™ื•ืช (ื›ืœ-ื–ื›ื•ืช) ืœืืจื’ื•ื ื™ื ื—ื‘ืจืชื™ื™ื.
72
- - ื”ืชืงื ื” ื‘ืชื•ืš ืžืฉืจื“ ืฉืžื—ื–ื™ืง ื—ื•ืžืจ ื—ืกื•ื™ ื•ืœื ื™ื›ื•ืœ ืœืฉืœื•ื— ืื•ืชื• ื”ื—ื•ืฆื”.
73
 
74
- ## ืžื” ื”ื•ื **ืœื**, ื•ืžื” ืืกื•ืจ ืœืขืฉื•ืช ืื™ืชื•
75
 
76
- ื–ื” ื”ื—ืœืง ื”ื—ืฉื•ื‘ ื‘ื›ืจื˜ื™ืก. ืžื•ื“ืœ ืงื˜ืŸ ืฉืžื•ืฆื’ ื›ืžืกื•ื’ืœ ืœื”ื›ืœ ื”ื•ื ื—ืกืจ ืขืจืš; ืžื•ื“ืœ ืฉืื•ืžืจ ืžื” ื”ื•ื ืœื ื™ื›ื•ืœ โ€” ืืคืฉืจ ืœืกืžื•ืš ืขืœื™ื•.
77
 
78
- - **ื”ื•ื ืœื ืขื•ืจืš ื“ื™ืŸ, ื•ืืกื•ืจ ืœื”ืฉืชืžืฉ ื‘ืชืฉื•ื‘ื” ืฉืœื• ื›ื™ื™ืขื•ืฅ ืžืฉืคื˜ื™.** ื›ืœ ืชืฉื•ื‘ื” ืฆืจื™ื›ื” ืื“ื ืฉืงื•ืจื ื•ื‘ื•ื“ืง ืื•ืชื” ืœืคื ื™ ืฉืคื•ืขืœื™ื ืœืคื™ื”.
79
- - **ื”ื•ื ืžืžืฆื™ื ืžืกืคืจื™ ืกืขื™ืคื™ื ื•ืคืกืงื™ ื“ื™ืŸ.** ื–ื• ืœื ืชืงืœื” ื ื“ื™ืจื” โ€” ื–ื• ื”ืชื ื”ื’ื•ืช ืžื•ื›ืจืช ืฉืœ ื›ืœ ืžื•ื“ืœ ืฉืคื”, ื•ื‘ื’ื•ื“ืœ ื”ื–ื” ื”ื™ื ืฉื›ื™ื—ื” ื™ื•ืชืจ. **ื—ื•ื‘ื” ืœืืžืช ื›ืœ ืฆื™ื˜ื•ื˜** ืžื•ืœ ืžืงื•ืจ ืžื•ืกืžืš (ื ื‘ื•, ืคืกืงื“ื™ืŸ, ืชืงื“ื™ืŸ). ืคืจื•ืžืคื˜ ื”ืžืขืจื›ืช ืฉืœืžื˜ื” ืžืงื˜ื™ืŸ ืืช ื–ื”, ื•ืœื ืžืืคืก ืื•ืชื•.
80
- - **ื”ื•ื ืžื›ื™ืจ ืจืง ืืช ื”ื“ื™ืŸ ื”ื™ืฉืจืืœื™.** ืœื ืืจื”"ื‘, ืœื ืื™ืจื•ืคื”, ืœื ื‘ืจื™ื˜ื ื™ื”, ื•ืœื ืžืฉืคื˜ ื‘ื™ื ืœืื•ืžื™.
81
- - **ื™ืฉ ืœื• ืชืืจื™ืš ื™ื“ืข.** ื”ื—ื•ืžืจ ื ืืกืฃ ื‘ืชื—ื™ืœืช 2026. ื—ื•ืง ืฉื”ืฉืชื ื” ืžืื– โ€” ื”ื•ื ืœื ืžื›ื™ืจ, ื•ื”ื•ื ื’ื ืœื ื™ื•ื“ืข ืฉื”ื•ื ืœื ืžื›ื™ืจ.
82
- - **ื”ื•ื ืœื ืžืืžืช ืžื•ืœ ืžืื’ืจ ื—ื™.** ืื™ืŸ ืœื• ืื™ื ื˜ืจื ื˜ ื•ืื™ืŸ ืœื• ื’ื™ืฉื” ืœืžืื’ืจื™ ืคืกื™ืงื”. ื”ื•ื ืขื•ื ื” ืžื”ื–ื™ื›ืจื•ืŸ ืฉืœื• ื‘ืœื‘ื“.
83
- - **ื”ื•ื ื—ืœืฉ ื‘ืคืœื™ืœื™ ื•ื‘ืžื ื”ืœื™.** ืจื•ื‘ ื—ื•ืžืจ ื”ืื™ืžื•ืŸ ื”ื•ื ืื–ืจื—ื™, ืขื‘ื•ื“ื” ื•ืžืฉืคื—ื”. ื‘ืคืœื™ืœื™ื ืžื•ืจื›ื‘ื™ื ืืœ ืชืฉืชืžืฉ ื‘ื• ื‘ื›ืœืœ.
84
- - **ื”ื•ื ืœื ืœืฉื™ืžื•ืฉ ื‘ื–ืžืŸ ืืžืช ื‘ื‘ื™ืช ืžืฉืคื˜**, ื•ืœื ืœื›ืœ ืžืฆื‘ ืฉื‘ื• ืชืฉื•ื‘ื” ืฉื’ื•ื™ื” ืขื•ืœื” ืžืฉื”ื• ื•ืื™ืŸ ืžื™ ืฉื™ืงืจื ืื•ืชื” ืงื•ื“ื.
85
- - **ืื™ืŸ ืœื• ืฆื™ื•ืŸ.** ืจืื” ืืช ืคืจืง ื”ื”ืขืจื›ื” ืœืžื˜ื”. ืื™ืŸ ืจืื™ื” ื ืžื“ื“ืช ืฉื”ื•ื ื˜ื•ื‘ ื™ื•ืชืจ ืžืžื•ื“ืœ ื”ื‘ืกื™ืก ืฉืœื• ื‘ืžืฉื”ื•.
86
 
87
- ## ืื™ืš ืžืจื™ืฆื™ื
88
 
89
- ### Ollama, ื”ื“ืจืš ื”ืคืฉื•ื˜ื”
90
 
91
  ```bash
92
  ollama pull hf.co/BrainboxAI/law-il-E2B:Q4_K_M
@@ -95,15 +93,18 @@ ollama run hf.co/BrainboxAI/law-il-E2B:Q4_K_M
95
 
96
  ### llama.cpp
97
 
98
- ืฉื ื”ืงื•ื‘ืฅ ื‘ืชื•ืš ื”ืžืื’ืจ ื”ื•ื `gemma-4-E2B-it.Q4_K_M.gguf`. ื”ืฉื ื ืฉืžืจ ืžืฉืœื‘ ื”ื‘ื ื™ื™ื” โ€” ื–ื” ื”ืงื•๏ฟฝ๏ฟฝืฅ ืฉืœ ื”ืžื•ื“ืœ **ื”ืžืื•ืžืŸ**, ื•ืœื ืฉืœ ืžื•ื“ืœ ื”ื‘ืกื™ืก.
 
 
99
 
100
  ```bash
 
101
  ./llama-cli -m gemma-4-E2B-it.Q4_K_M.gguf \
102
  -p "ืžื”ืŸ ื–ื›ื•ื™ื•ืช ื”ืขื•ื‘ื“ ื‘ืคื™ื˜ื•ืจื™ื ืœืœื ื”ื•ื“ืขื” ืžื•ืงื“ืžืช?" \
103
  --temp 0.3 --top-p 0.9 -n 512
104
  ```
105
 
106
- ### ืคื™ื™ืชื•ืŸ, ื“ืจืš ืžืื’ืจ ื”-safetensors
107
 
108
  ```python
109
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -116,6 +117,7 @@ model = AutoModelForCausalLM.from_pretrained(
116
  )
117
 
118
  messages = [
 
119
  {"role": "user", "content": "ืคื™ื˜ืจื• ืื•ืชื™ ื‘ืœื™ ื”ื•ื“ืขื” ืžื•ืงื“ืžืช. ืžื” ืžื’ื™ืข ืœื™?"},
120
  ]
121
  inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
@@ -123,26 +125,28 @@ outputs = model.generate(inputs, max_new_tokens=512, temperature=0.3, top_p=0.9)
123
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
124
  ```
125
 
126
- ### ืคืจืžื˜ืจื™ ื”ืจืฆื” ืžื•ืžืœืฆื™ื
127
 
128
- | ืคืจืžื˜ืจ | ืขืจืš | ืœืžื” |
129
  |---|---|---|
130
- | `temperature` | 0.3 | ื™ืฆื™ืจืชื™ื•ืช ื ืžื•ื›ื”. ื‘ืขื‘ื•ื“ื” ืžืฉืคื˜ื™ืช ืจื•ืฆื™ื ืขื•ื‘ื“ื•ืช, ืœื ื ื™ืกื•ื— ืžืงื•ืจื™ |
131
- | `top_p` | 0.9 | ื‘ืจื™ืจืช ืžื—ื“ืœ ืžืงื•ื‘ืœืช |
132
- | `max_new_tokens` | 512 | ืžืกืคื™ืง ืœืชืฉื•ื‘ื” ืžืœืื” ื‘ื—ืžื™ืฉื” ืฉืœื‘ื™ื ืขื ืฆื™ื˜ื•ื˜ื™ื |
133
- | `repetition_penalty` | 1.05 | ืžื•ื ืข ืœื•ืœืื•ืช ืฉืœ ืฆื™ื˜ื•ื˜ ื—ื•ื–ืจ |
134
 
135
- > **ืฉื™ื ืœื‘ ืœืคืขืจ.** ืงื•ื‘ืฅ ื”-`Modelfile` ืฉื™ื•ืฉื‘ ื‘ืžืื’ืจ ื”ื–ื” ืžื’ื“ื™ืจ `temperature 0.7` ื•-`repeat_penalty 1.3` โ€” ืขืจื›ื™ื ืื—ืจื™ื ืžืืœื” ืฉื‘ื˜ื‘ืœื”. ื”ื˜ื‘ืœื” ื”ื™ื ื”ื”ืžืœืฆื”. ืื ืืชื” ืžืจื™ืฅ ื“ืจืš ื”-Modelfile, ืฉื ื” ืื•ืชื ื™ื“ื ื™ืช.
136
 
137
- ## ืคืจื•ืžืคื˜ ื”ืžืขืจื›ืช ื”ืžื•ืžืœืฅ โ€” ื–ื” ืžื” ืฉืžืฉื ื” ื”ื›ื™ ื”ืจื‘ื”
138
 
139
- ืžื•ื“ืœ ื‘ื’ื•ื“ืœ ื”ื–ื” ืขื•ื‘ื“ **ื”ืจื‘ื”** ื™ื•ืชืจ ื˜ื•ื‘ ื›ืฉืžืงื‘ืœ ืชื‘ื ื™ืช ื—ืฉื™ื‘ื” ืžื•ื‘ื ื™ืช ื‘ืžืงื•ื ืฉืืœื” ื—ื•ืคืฉื™ืช. ื”ืคืจื•ืžืคื˜ ืฉืœืžื˜ื” ืžื›ืจื™ื— ืื•ืชื• ืœืขื‘ื•ืจ ื—ืžื™ืฉื” ืฉืœื‘ื™ื ืœืคื ื™ ืฉื”ื•ื ืขื•ื ื”, ื•ื‘ื›ืœ ืฉืœื‘ ืื•ืžืจ ืœื• ืžื” ืžื•ืชืจ ื•ืžื” ืืกื•ืจ.
140
 
141
- **ืœืžื” ื–ื” ืžืฉื ื”.** ืžื•ื“ืœ ืงื˜ืŸ ืฉืžืงื‘ืœ ืฉืืœื” ืžืฉืคื˜ื™ืช ืคืชื•ื—ื” ื ื•ื˜ื” ืœื”ืžืฆื™ื: ืžืกืคืจ ืกืขื™ืฃ ืฉื ืฉืžืข ื ื›ื•ืŸ, ืฉื ืฉืœ ืคืกืง ื“ื™ืŸ ืฉืœื ืงื™ื™ื. ืชื‘ื ื™ืช ืžื•ื‘ื ื™ืช ืžื—ื™ื™ื‘ืช ืื•ืชื• ืœื›ืชื•ื‘ "ืœื‘ื“ื•ืง ื‘ืžืื’ืจ ื ื‘ื•" ื‘ืžืงื•ื ืœื ื—ืฉ ืžืกืคืจ, ื•ืžื—ื™ื™ื‘ืช ืกื™ื™ื’ ื‘ืกื•ืฃ ื›ืœ ืชืฉื•ื‘ื”.
142
 
143
- **ื•ื–ืืช ื”ืชืจืฉืžื•ืช, ืœื ืžื“ื™ื“ื”.** ืœื ืจืฆื” ื”ืฉื•ื•ืื” ืžืกืคืจื™ืช ื‘ื™ืŸ ื”ืจืฆื” ืขื ื”ืคืจื•ืžืคื˜ ืœื”ืจืฆื” ื‘ืœืขื“ื™ื•. ื–ื” ืžื” ืฉื ืจืื” ื‘ืขื‘ื•ื“ื” ืขื ื”ืžื•ื“ืœ, ื•ืœื ืžืกืคืจ.
144
 
145
- ### ื”ืคืจื•ืžืคื˜ ืขืฆืžื• โ€” ื”ืขืชืง ื›ืžื• ืฉื”ื•ื
 
 
146
 
147
  ```text
148
  DEFINITIONS:
@@ -208,7 +212,9 @@ VERIFICATION:
208
  - regression check: ืœื ืœื”ื—ื–ื™ืจ ืช๏ฟฝ๏ฟฝื•ื‘ื” ืœืœื 5 ื”ืฆืขื“ื™ื ื’ื ืื ื”ืฉืืœื” ืคืฉื•ื˜ื”.
209
  ```
210
 
211
- ### ื“ื•ื’ืžืช ืฉื™ืžื•ืฉ ืขื ื”ืคืจื•ืžืคื˜
 
 
212
 
213
  ```python
214
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -220,11 +226,12 @@ model = AutoModelForCausalLM.from_pretrained(
220
  device_map="auto",
221
  )
222
 
223
- # ื”ื“ื‘ืง ื›ืืŸ ืืช ื”ืคืจื•ืžืคื˜ ื”ืžืœื ืžื”ื‘ืœื•ืง ืฉืœืžืขืœื”
224
  SYSTEM_PROMPT = """[paste the full prompt from the code block above]"""
225
 
226
  messages = [
227
  {"role": "system", "content": SYSTEM_PROMPT},
 
228
  {"role": "user", "content": "ื›ืžื” ื™ืžื™ ื—ื•ืคืฉื” ืžื’ื™ืขื™ื ืœืขื•ื‘ื“ ืฉืžื•ืขืกืง 4 ื™ืžื™ื ื‘ืฉื‘ื•ืข?"},
229
  ]
230
 
@@ -233,79 +240,79 @@ outputs = model.generate(inputs, max_new_tokens=600, temperature=0.3, top_p=0.9)
233
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
234
  ```
235
 
236
- ### ื”ืชืืžื•ืช ืืคืฉืจื™ื•ืช
237
 
238
- - ืจื•ืฆื” ืชืฉื•ื‘ื•ืช ื‘ืื ื’ืœื™ืช ืื• ื‘ืขืจื‘ื™ืช? ืฉื ื” ืืช ื›ืœืœ ืžืกืคืจ 9.
239
- - ืฆืจื™ืš ืคืœื˜ JSON ืœืืคืœื™ืงืฆื™ื”? ื”ื—ืœืฃ ืืช ืกืขื™ืฃ `OUTPUT_FORMAT` ื‘ืกื›ื™ืžื” ืฉืœืš.
240
- - ื‘ื•ื ื” ื›ืœื™ ืœืขื•ืจื›ื™ ื“ื™ืŸ ื•ืœื ืœืื–ืจื—ื™ื? ื”ืกืจ ืืช ื›ืœืœ ืžืกืคืจ 6, ืฉืื•ืกืจ ืขืœ ื”ืžืœืฆื” ืžืขืฉื™ืช.
241
 
242
- ## ืคืจื˜ื™ ื”ืื™ืžื•ืŸ
243
 
244
- | ืžืืคื™ื™ืŸ | ืขืจืš |
245
  |---|---|
246
- | **ืžื•ื“ืœ ื‘ืกื™ืก** | [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it) |
247
- | **ืฉื™ื˜ื”** | QLoRA โ€” ืžื•ื“ืœ ื”ื‘ืกื™ืก ื ื˜ืขืŸ ื‘-4 ื‘ื™ื˜ ื‘ื–ืžืŸ ื”ืื™ืžื•ืŸ |
248
- | **ืžืกื’ืจืช** | Unsloth |
249
- | **ืฉื•ืจื•ืช ืื™ืžื•ืŸ** | 17,613 |
250
- | **ื”ื™ืคืจ-ืคืจืžื˜ืจื™ื, ื—ื•ืžืจื”, ื–ืžืŸ ื•ืขืœื•ืช** | ืœื ื ื›ืชื‘ื™ื ื›ืืŸ โ€” ืจืื” ื”ื”ืขืจื” ืžืชื—ืช ืœื˜ื‘ืœื” |
251
 
252
- > **ืœืžื” ื—ืกืจื™ื ื›ืืŸ ืžืกืคืจื™ื.** ืจืฉื•ืžื•ืช ื”ืื™ืžื•ืŸ ืฉืœ ื”ืžื•ื“ืœ ื”ื–ื” ืฉืจื“ื• ื‘ืฉืชื™ ื’ืจืกืื•ืช ืฉืกื•ืชืจื•ืช ื–ื• ืืช ื–ื• โ€” ื”ืŸ ื—ืœื•ืงื•ืช ืขืœ ื“ืจื’ืช ื”-LoRA, ืขืœ ืžืกืคืจ ืžื—ื–ื•ืจื™ ื”ืื™ืžื•ืŸ ื•ืขืœ ืกื•ื’ ื”ื›ืจื˜ื™ืก ื”ื’ืจืคื™ ืฉืขืœื™ื• ืจืฅ ื”ืื™ืžื•ืŸ. ืื™ ืืคืฉืจ ืœื“ืขืช ืžื”ืžืงื•ืจื•ืช ืฉืงื™ื™ืžื™ื ืื™ื–ื• ืžื”ืŸ ืžืชืืจืช ืืช ื”ืžืฉืงื•ืœื•ืช ืฉืคื•ืจืกืžื• ื›ืืŸ. ืœื›ืŸ ื›ืœ ื”ืฉื•ืจื•ืช ื”ืืœื” ื”ื•ืกืจื• ืžื”ื›ืจื˜ื™ืก ื‘ืžืงื•ื ืœื”ื™ืฉืืจ ืขืœื™ื• ื•ืœื”ื™ืจืื•ืช ื›ืžื• ืขื•ื‘ื“ื”. ื›ืฉืžืกืคืจ ืœื ื™ื“ื•ืข, ื”ื›ืจื˜ื™ืก ืื•ืžืจ "ืœื ื™ื“ื•ืข" ื•ืœื ืžืžืฆื™ื.
253
 
254
- ### ืžืžื” ืžื•ืจื›ื‘ ื”ื“ืื˜ื”
255
 
256
- ื”ืžืกืคืจื™ื ื›ืืŸ ืžื•ืคื™ืขื™ื ื’ื ื‘ื›ืจื˜ื™ืก ื”ื“ืื˜ื” ืฉืœ [`legal-training-il`](https://huggingface.co/datasets/BrainboxAI/legal-training-il) ื•ื’ื ื‘ื›ืจื˜ื™ืก ื”ืงื•ื“ื ืฉืœ ื”ืžื•ื“ืœ, ื•ื”ื ืžืกืชื›ืžื™ื ืœ-17,613 ื‘ื“ื™ื•ืง.
257
 
258
- | ืžืงื•ืจ | ื›ืžื•ืช | ืชื•ื›ืŸ |
259
  |---|---|---|
260
- | ืคืกืงื™ ื“ื™ืŸ ื™ืฉืจืืœื™ื™ื | 7,960 | ืขืœื™ื•ืŸ, ืžืฉืคื—ื”, ืคืœื™ืœื™, ืื–ืจื—ื™ |
261
- | ื“ืคื™ ื›ืœ-ื–ื›ื•ืช | 2,353 | ืขื‘ื•ื“ื”, ื“ื™ื•ืจ, ื‘ื™ื˜ื•ื—, ื ื›ื•ืช, ืคื ืกื™ื” |
262
- | ืกืคืจ ื”ื—ื•ืงื™ื ื”ืคืชื•ื— (ื•ื™ืงื™ื˜ืงืกื˜) | 300 | ื ื•ืกื— ืžืœื ืฉืœ ื—ื•ืงื™ื ื™ืฉืจืืœื™ื™ื |
263
- | ืกืขื™ืคื™ ื—ื•ื–ื™ื | 7,000 | 41 ืงื˜ื’ื•ืจื™ื•ืช, ืกื•ื•ื’ื• ื™ื“ื ื™ืช |
264
- | **ืกืš ื”ื›ืœ** | **17,613** | |
265
 
266
- ืชืขืจื•ื‘ืช ื”ืฉืคื•ืช, ืœืคื™ ื›ืจื˜ื™ืก ื”ื“ืื˜ื”: ื›-60% ืขื‘ืจื™ืช, ื›-40% ืื ื’ืœื™ืช.
267
 
268
- ื”ื—ื•ืžืจ ืกื•ื ืŸ ืœืคื™ ืฉืœื•ืฉื” ืชื ืื™ื: ืฆื™ื˜ื•ื˜ ืฉืืคืฉืจ ืœืืžืช, ืขื‘ืจื™ืช ืชืงื™ื ื”, ื•ืืคืก ืคืจื˜ื™ื ืžื–ื”ื™ื.
269
 
270
- ื”ื“ืื˜ื” ืžืคื•ืจืกื ืชื—ืช ืจื™ืฉื™ื•ืŸ **CC-BY-4.0** โ€” ืจื™ืฉื™ื•ืŸ ืฉื•ื ื” ืžื–ื” ืฉืœ ื”ืžื•ื“ืœ ืขืฆืžื•.
271
 
272
- ## ื”ืขืจื›ื”
273
 
274
- **ืœื ืจืฆื” ืžื“ื™ื“ื” ืžืกืคืจื™ืช ืขืœ ื”ืžื•ื“ืœ ื”ื–ื”. ืื™ืŸ ื›ืืŸ ืฆื™ื•ืŸ, ื•ืœื ื™ื•ืคื™ืข ื›ืืŸ ืฆื™ื•ืŸ ืขื“ ืฉืชืจื•ืฅ ืžื“ื™ื“ื” ืืžื™ืชื™ืช.**
275
 
276
- ืžื” ืฉื›ืŸ ื ืขืฉื”: ื‘ื“ื™ืงื” ืื™ื›ื•ืชื™ืช ื‘ืขื‘ื•ื“ื” ื™ื•ืžื™ื•ืžื™ืช โ€” ื”ืื ื”ื—ื•ืง ืฉืฆื•ื™ืŸ ื ื›ื•ืŸ, ื”ืื ื”ืคืกื™ืงื” ืžืชืื™ืžื”, ื”ืื ื”ืขื‘ืจื™ืช ืงื•ืœื—ืช, ื•ื”ืื ื”ืžื•ื“ืœ ื ื–ื”ืจ ื‘ืฉืืœื•ืช ืฉืื™ืŸ ืขืœื™ื”ืŸ ืชืฉื•ื‘ื” ื—ื“-ืžืฉืžืขื™ืช.
277
 
278
- **ืœืžื” ืื™ืŸ ืฆื™ื•ืŸ.** ื‘ื–ืžืŸ ื”ืคืจืกื•ื ืœื ื”ื™ื” ืงื™ื™ื ืžื‘ื—ืŸ ืฆื™ื‘ื•ืจื™ ืœืฉืืœื•ืช-ื•ืชืฉื•ื‘ื•ืช ืžืฉืคื˜ื™ื•ืช ื‘ืขื‘ืจื™ืช. ืžื‘ื—ืŸ ื›ื–ื” ื”ื•ื ื‘ืขื™ื” ืคืชื•ื—ื” ื‘ืžื—ืงืจ, ื•ืื™ ืืคืฉืจ ืœื”ืžืฆื™ื ืฆื™ื•ืŸ ื›ื“ื™ ืœืžืœื ืฉื•ืจื” ื‘ื˜ื‘ืœื”.
279
 
280
- **ืžื” ื–ื” ืื•ืžืจ ืขื‘ื•ืจืš:** ื™ืฉ ื”ืชืจืฉืžื•ืช ื˜ื•ื‘ื” ืžื”ืžื•ื“ืœ, ื•ืื™ืŸ ื”ื•ื›ื—ื”. ืืœื” ืฉื ื™ ื“ื‘ืจื™ื ืฉื•ื ื™ื, ื•ื›ืจื˜ื™ืก ืžื•ื“ืœ ืฆืจื™ืš ืœื”ื’ื™ื“ ืื™ื–ื” ืžืฉื ื™ื”ื ื™ืฉ ื›ืืŸ.
281
 
282
- ## ืžื’ื‘ืœื•ืช
283
 
284
- - **ืžื•ื“ืœ ืงื˜ืŸ.** ื‘ื’ื•ื“ืœ ื”ื–ื” ื™ืฉ ื˜ืขื•ื™ื•ืช. ื–ื• ืœื ืืคืฉืจื•ืช, ื–ื• ื•ื“ืื•ืช.
285
- - **ื”ื•ื ืžืžืฆื™ื ืฆื™ื˜ื•ื˜ื™ื.** ืชืžื™ื“ ืœืืžืช ืžื•ืœ ื ื‘ื•, ืคืกืงื“ื™ืŸ ืื• ืชืงื“ื™ืŸ.
286
- - **ืชืืจื™ืš ื™ื“ืข.** ื”ื—ื•ืžืจ ื ืืกืฃ ื‘ืชื—ื™ืœืช 2026. ืฉื™ื ื•ื™ื™ ื—ืงื™ืงื” ืžืื•ื—ืจื™ื ื™ื•ืชืจ ืœื ื ืžืฆืื™ื ื‘ื•.
287
- - **ื”ื˜ื™ื” ื‘ื“ืื˜ื”.** ืคืกืงื™ ื”ื“ื™ืŸ ื ื•ื˜ื™ื ืœื“ื™ื ื™ ืขื‘ื•ื“ื” ื•ืžืฉืคื—ื”. ืคืœื™ืœื™ ื•ืžื ื”ืœื™ ื“ืœื™ืœื™ื ื‘ื”ืจื‘ื”.
288
- - **ืื™ืŸ ืžื“ื™ื“ื”.** ืจืื” ืืช ืคืจืง ื”ื”ืขืจื›ื”.
289
- - **ื–ื”ื• ืื™ืžื•ืŸ ืžืขืœ `unsloth/gemma-4-E2B-it`.** ื›ืœ ืžื’ื‘ืœื” ืฉืœ ืžื•ื“ืœ ื”ื‘ืกื™ืก, ื›ื•ืœืœ ืชืืจื™ืš ื”ื™ื“ืข ืฉืœื•, ื ืžืฆืืช ื’ื ื›ืืŸ.
290
 
291
- ## ื”ืงื‘ืฆื™ื ื•ื”ืžืื’ืจื™ื
292
 
293
- | ืžืื’ืจ | ืžื” ื™ืฉ ื‘ืคื ื™ื | ืœืžื™ ื–ื” |
294
  |---|---|---|
295
- | [`BrainboxAI/law-il-E2B`](https://huggingface.co/BrainboxAI/law-il-E2B) | `gemma-4-E2B-it.Q4_K_M.gguf` (3.4 ื’'ื™ื’ื”) ื•ื”ื›ืจื˜ื™ืก ื”ื–ื” | Ollama, llama.cpp, LM Studio |
296
- | [`BrainboxAI/law-il-E2B-safetensors`](https://huggingface.co/BrainboxAI/law-il-E2B-safetensors) | ืžืฉืงื•ืœื•ืช ืžืœืื•ืช ื‘-16 ื‘ื™ื˜ (10.2 ื’'ื™ื’ื”) | transformers, ื•ื”ืžืฉืš ืื™ืžื•ืŸ |
297
 
298
- ื‘ืžืื’ืจ ื™ื•ืฉื‘ ื’ื `gemma-4-E2B-it.BF16-mmproj.gguf` (0.99 ื’'ื™ื’ื”). ื–ื”ื• ืจื›ื™ื‘ ื”ืจืื™ื™ื” ืฉืœ Gemma-4, ืฉื ื—ื•ืฅ ืจืง ืื ืจื•ืฆื™ื ืœื”ื–ื™ืŸ ืชืžื•ื ื•ืช. ืœืฉืืœื•ืช ื˜ืงืกื˜ ืื™ืŸ ื‘ื• ืฆื•ืจืš.
299
 
300
- ## ืจื™ืฉื™ื•ืŸ
301
 
302
- Apache 2.0. ืžื•ืชืจ ืœื”ืฉืชืžืฉ, ืœืฉื ื•ืช, ืœื”ืคื™ืฅ ื•ืœืžื›ื•ืจ ื ื’ื–ืจื•ืช, ื›ื•ืœืœ ืžื•ืฆืจื™ื ืžืกื—ืจื™ื™ื, ืขื ื™ื™ื—ื•ืก.
303
 
304
- ื–ื”ื• ืื™ืžื•ืŸ ืžืขืœ [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it), ื•ืœื›ืŸ ื”ืชื ืื™ื ืฉืœ ืžื•ื“ืœ ื”ื‘ืกื™ืก ื—ืœื™ื ื’ื ืขืœ ื”ืžื•ื“ืœ ื”ื–ื”. ืžื•ื“ืœ ื”ื‘ืกื™ืก ืžืคื•ืจืกื ืชื—ืช Apache 2.0 ื•ืžืคื ื” ื’ื ืืœ [ืชื ืื™ ื”ืฉื™ืžื•ืฉ ืฉืœ Gemma](https://ai.google.dev/gemma/docs/gemma_4_license). ื›ื“ืื™ ืœืงืจื•ื ืื•ืชื ืœืคื ื™ ืฉื™ืžื•ืฉ ืžืกื—ืจื™.
305
 
306
- ื”ื“ืื˜ื”, [`legal-training-il`](https://huggingface.co/datasets/BrainboxAI/legal-training-il), ืžืคื•ืจืกื ืชื—ืช CC-BY-4.0.
307
 
308
- ## ืฆื™ื˜ื•ื˜
309
 
310
  ```bibtex
311
  @misc{elyasi2026lawil,
@@ -318,10 +325,10 @@ Apache 2.0. ืžื•ืชืจ ืœื”ืฉืชืžืฉ, ืœืฉื ื•ืช, ืœื”ืคื™ืฅ ื•ืœืžื›ื•ืจ ื ื’ื–ืจ
318
  }
319
  ```
320
 
321
- ## ืžื™ ื‘ื ื” ืืช ื–ื”
322
 
323
- ื ื‘ื ื” ืขืœ ื™ื“ื™ [**ื ืชื ืืœ ืืœื™ืืกื™**](https://huggingface.co/BrainboxAI), ืžื™ื™ืกื“ [BrainboxAI](https://brainboxai.io) โ€” ืกื˜ื•ื“ื™ื• ื™ืฉืจืืœื™ ืœื‘ื™ื ื” ืžืœืื›ื•ืชื™ืช ื™ื™ืฉื•ืžื™ืช, ืฉื‘ื•ื ื” ืžื•ื“ืœื™ื ืงื˜ื ื™ื, ืคืจื˜ื™ื™ื ื•ืžืชืžื—ื™ื.
324
 
325
- ืœืื™ืžื•ืŸ ืžื•ืชืื, ื›ื•ื•ื ื•ืŸ ืขืœ ื—ื•ืžืจ ืฉืœ ื”ืžืฉืจื“, ืื• ื”ืชืงื ื” ืžืงื•ืžื™ืช: [netanele@brainboxai.io](mailto:netanele@brainboxai.io).
326
 
327
- *ื—ืœืง ืžืžืฉืคื—ืช ื”ืžื•ื“ืœื™ื ืฉืœ BrainboxAI ืฉืจืฆื™ื ืขืœ ื”ื—ื•ืžืจื” ืฉืœืš. ืจืื” ื’ื [`code-il-E4B`](https://huggingface.co/BrainboxAI/code-il-E4B) (ืงื•ื“) ื•-[`cyber-analyst-4B`](https://huggingface.co/BrainboxAI/cyber-analyst-4B) (ืกื™ื™ื‘ืจ).*
 
32
 
33
  # bx-legal-kochav
34
 
35
+ ### Repository id: `BrainboxAI/law-il-E2B`
36
 
37
+ **A small Hebrew-first model for Israeli law that runs entirely on your own machine. No question ever leaves it.**
38
 
39
  [![HF Model](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Model-yellow)](https://huggingface.co/BrainboxAI/law-il-E2B)
40
  [![Dataset](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Dataset-blue)](https://huggingface.co/datasets/BrainboxAI/legal-training-il)
41
  [![Safetensors](https://img.shields.io/badge/Format-Safetensors-green)](https://huggingface.co/BrainboxAI/law-il-E2B-safetensors)
42
  [![License](https://img.shields.io/badge/License-Apache_2.0-lightgrey)](https://www.apache.org/licenses/LICENSE-2.0)
43
 
44
+ > **About the name.** `bx-legal-kochav` is this model's name under the BrainboxAI naming convention: `bx` for the lab, `legal` for the domain, and `kochav` (Hebrew for "star") for the smallest size tier. **The repository id stays `BrainboxAI/law-il-E2B` and will not change.** Every link, script and pull command you already have keeps working exactly as before.
45
 
46
+ > **About version stability.** Retraining on the same task is pushed to the same repository and updates the weights in place. Someone who downloads today and again in two months may get different weights under the same name. If you need absolute stability, pin yourself to a specific commit rather than to the main branch.
 
 
47
 
48
  ---
49
 
50
+ ## What it is
51
 
52
+ A **small** language model trained on Israeli legal material. It answers legal questions in Hebrew in a fixed shape: which statute applies, what it says in plain language, a real-world example, case law if there is any, and a closing caveat.
53
 
54
+ It is built on Google's [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it) and fine-tuned on top of it with QLoRA on 17,613 curated legal examples.
55
 
56
+ **What "small" means here.** The whole thing fits in one file of about 3.4 GB. It runs on an ordinary laptop or a consumer GPU. It is not in the same league as GPT or Claude and it is not trying to be. It does one job, in one place: yours.
57
 
58
+ ## Why it exists
59
 
60
+ Most Hebrew legal work today flows through cloud models. For a law firm that is a real problem. Client material leaves the office, attorney-client privilege is exposed, and Amendment 13 to Israel's Protection of Privacy Law attached penalties to getting it wrong.
61
 
62
+ A model that runs on the machine itself removes the problem at the root. The weights sit on the user's own hardware. Nothing is transmitted and nothing is logged anywhere else.
63
 
64
+ ## What it is for
65
 
66
+ - Legal questions from ordinary citizens: employment, tenancy, family, consumer rights.
67
+ - A first research pass for a trainee or a junior associate, before the real check rather than instead of it.
68
+ - Reading and comparing contract clauses.
69
+ - Explaining rights pages (Kol-Zchut) for social-sector organisations.
70
+ - Deployment inside a firm that holds privileged material and cannot send it out.
71
 
72
+ ## What it is not, and what you must not do with it
73
 
74
+ This is the important part of the card. A small model presented as capable of everything is worthless. A model that says what it cannot do can be relied on.
75
 
76
+ - **It is not a lawyer, and its answers must not be used as legal advice.** Every answer needs a person to read it and check it before anyone acts on it.
77
+ - **It fabricates section numbers and case citations.** This is not a rare glitch. It is known behaviour in every language model, and it is more frequent at this size. **Verify every citation** against an authoritative source (Nevo, Psakdin, Takdin). The system prompt below reduces this. It does not eliminate it.
78
+ - **It knows Israeli law only.** Not US, not EU, not UK, and no international or comparative law.
79
+ - **It has a knowledge cutoff.** The material was collected in early 2026. A law that changed after that is unknown to it, and it does not know that it does not know.
80
+ - **It does not check anything against a live database.** It has no internet access and no connection to case-law repositories. It answers from memory alone.
81
+ - **It is weak on criminal and administrative law.** Most of the training material is civil, employment and family law. For complex criminal matters, do not use it at all.
82
+ - **It is not for live courtroom use**, or for any situation where a wrong answer costs something and nobody reads the answer first.
83
+ - **It has no score.** See the Evaluation section. There is no measured evidence that it is better than its base model at anything.
84
 
85
+ ## How to run it
86
 
87
+ ### Ollama
88
 
89
  ```bash
90
  ollama pull hf.co/BrainboxAI/law-il-E2B:Q4_K_M
 
93
 
94
  ### llama.cpp
95
 
96
+ The file inside the repository is named `gemma-4-E2B-it.Q4_K_M.gguf`. The name is left over from the build step. It is the **fine-tuned** model, not the base model.
97
+
98
+ The prompt below is in Hebrew because that is the language this model works in. The English gloss is for readers who do not read Hebrew.
99
 
100
  ```bash
101
+ # Prompt: "What is an employee entitled to when dismissed without notice?"
102
  ./llama-cli -m gemma-4-E2B-it.Q4_K_M.gguf \
103
  -p "ืžื”ืŸ ื–ื›ื•ื™ื•ืช ื”ืขื•ื‘ื“ ื‘ืคื™ื˜ื•ืจื™ื ืœืœื ื”ื•ื“ืขื” ืžื•ืงื“ืžืช?" \
104
  --temp 0.3 --top-p 0.9 -n 512
105
  ```
106
 
107
+ ### Python, through the safetensors repository
108
 
109
  ```python
110
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
117
  )
118
 
119
  messages = [
120
+ # "I was fired without notice. What am I entitled to?"
121
  {"role": "user", "content": "ืคื™ื˜ืจื• ืื•ืชื™ ื‘ืœื™ ื”ื•ื“ืขื” ืžื•ืงื“ืžืช. ืžื” ืžื’ื™ืข ืœื™?"},
122
  ]
123
  inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
 
125
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
126
  ```
127
 
128
+ ### Recommended generation parameters
129
 
130
+ | Parameter | Value | Why |
131
  |---|---|---|
132
+ | `temperature` | 0.3 | Low creativity. Legal work wants facts, not original phrasing |
133
+ | `top_p` | 0.9 | Standard nucleus sampling |
134
+ | `max_new_tokens` | 512 | Enough for a full five-step answer with citations |
135
+ | `repetition_penalty` | 1.05 | Stops the model looping on a citation |
136
 
137
+ > **A mismatch worth knowing about.** The `Modelfile` sitting in this repository sets `temperature 0.7` and `repeat_penalty 1.3`, which are not the values in the table. The table is the recommendation. If you run through the `Modelfile`, change them yourself.
138
 
139
+ ## The recommended system prompt, which matters more than anything else here
140
 
141
+ A model this size performs **much** better when it is given a structured reasoning template instead of an open question. The prompt below forces it through five explicit steps before it answers, and at each step tells it what is allowed and what is not.
142
 
143
+ **Why this matters.** A small model handed an open legal question tends to invent: a section number that sounds right, a case name that does not exist. A structured template makes it write "check the exact section in Nevo" instead of guessing a number, and makes a caveat mandatory at the end of every answer.
144
 
145
+ **And this is an impression, not a measurement.** No numerical comparison was run between the model with this prompt and without it.
146
 
147
+ **The prompt itself is written in Hebrew.** That is deliberate: the model answers in Hebrew, and instructions in the answer's own language hold better at this size. Copy it as it is. The section headings (`DEFINITIONS`, `PREMISES`, `REQUIREMENTS`, `EDGE_CASES`, `OUTPUT_FORMAT`, `VERIFICATION`) are in English and mark, in order: the vocabulary, the assumptions, the hard rules, the awkward cases, the shape of the answer, and the self-check.
148
+
149
+ ### The system prompt (copy as-is)
150
 
151
  ```text
152
  DEFINITIONS:
 
212
  - regression check: ืœื ืœื”ื—ื–ื™ืจ ืช๏ฟฝ๏ฟฝื•ื‘ื” ืœืœื 5 ื”ืฆืขื“ื™ื ื’ื ืื ื”ืฉืืœื” ืคืฉื•ื˜ื”.
213
  ```
214
 
215
+ **What the five steps are, in English:** (1) the applicable statute, (2) a plain-language explanation, (3) a realistic Israeli example, (4) relevant case law, and (5) a mandatory caveat saying this is not legal advice. Rule 2 forbids guessing a section number. Rule 7 forbids inventing a ruling. Rule 6 forbids telling the reader what to do, as opposed to what the law says.
216
+
217
+ ### Usage example with the system prompt
218
 
219
  ```python
220
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
226
  device_map="auto",
227
  )
228
 
229
+ # Paste the full prompt from the code block above.
230
  SYSTEM_PROMPT = """[paste the full prompt from the code block above]"""
231
 
232
  messages = [
233
  {"role": "system", "content": SYSTEM_PROMPT},
234
+ # "How many vacation days is an employee working a 4-day week entitled to?"
235
  {"role": "user", "content": "ื›ืžื” ื™ืžื™ ื—ื•ืคืฉื” ืžื’ื™ืขื™ื ืœืขื•ื‘ื“ ืฉืžื•ืขืกืง 4 ื™ืžื™ื ื‘ืฉื‘ื•ืข?"},
236
  ]
237
 
 
240
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
241
  ```
242
 
243
+ ### Customisation
244
 
245
+ - Want answers in English or Arabic? Change rule 9.
246
+ - Need JSON for an application? Replace the `OUTPUT_FORMAT` section with your schema.
247
+ - Building for lawyers rather than citizens? Drop rule 6, which forbids tactical recommendations.
248
 
249
+ ## Training details
250
 
251
+ | Attribute | Value |
252
  |---|---|
253
+ | **Base model** | [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it) |
254
+ | **Method** | QLoRA. The base model is loaded in 4 bits during training |
255
+ | **Framework** | Unsloth |
256
+ | **Training rows** | 17,613 |
257
+ | **Hyperparameters, hardware, wall time and cost** | Not stated here. See the note below |
258
 
259
+ > **Why numbers are missing.** The training records for this model survived in two versions that contradict each other. They disagree on the LoRA rank, on the number of epochs, and on which GPU the run happened on. Nothing in the surviving sources says which version describes the weights published here. So all of those rows were removed rather than left on the card looking like fact. When a number is unknown, this card says it is unknown instead of filling the gap.
260
 
261
+ ### Dataset composition
262
 
263
+ These figures appear both on the [`legal-training-il`](https://huggingface.co/datasets/BrainboxAI/legal-training-il) dataset card and on this model's previous card, and they sum to exactly 17,613.
264
 
265
+ | Source | Count | Content |
266
  |---|---|---|
267
+ | Israeli court rulings | 7,960 | Supreme Court, family, criminal, civil |
268
+ | Kol-Zchut rights pages | 2,353 | Labour, housing, insurance, disability, pension |
269
+ | Open Law Book (Wikisource) | 300 | Full text of Israeli statutes |
270
+ | Contract clauses | 7,000 | 41 categories, classified by hand |
271
+ | **Total** | **17,613** | |
272
 
273
+ Language mix, as reported on the dataset card: roughly 60% Hebrew, roughly 40% English.
274
 
275
+ The material was filtered on three conditions: a citation that can be verified, well-formed Hebrew, and no personally identifying information.
276
 
277
+ The dataset is published under **CC-BY-4.0**, a different licence from the model itself.
278
 
279
+ ## Evaluation
280
 
281
+ **No numerical evaluation was run on this model. There is no score here, and none will appear until a real measurement is made.**
282
 
283
+ What was done instead: qualitative checking during day-to-day use. Is the statute right, does the case law fit, is the Hebrew fluent, and does the model hedge on questions that have no settled answer.
284
 
285
+ **Why there is no score.** At the time of release no public benchmark existed for Hebrew legal question answering. Building one is an open research problem, and a score cannot be invented to fill a row in a table.
286
 
287
+ **What that means for you:** there is a good impression of this model, and there is no proof. Those are two different things, and a model card should say which one it is offering.
288
 
289
+ ## Limitations
290
 
291
+ - **It is a small model.** At this size there will be mistakes. That is a certainty, not a possibility.
292
+ - **It fabricates citations.** Always verify against Nevo, Psakdin or Takdin.
293
+ - **Knowledge cutoff.** The material was collected in early 2026. Later legislative changes are not in it.
294
+ - **Bias in the data.** The rulings lean towards employment and family law. Criminal and administrative law are much thinner.
295
+ - **No measurement.** See the Evaluation section.
296
+ - **It is a fine-tune of `unsloth/gemma-4-E2B-it`.** Every limit of that model, including its own training cutoff, is still here.
297
 
298
+ ## Files and repositories
299
 
300
+ | Repository | What is inside | Who wants it |
301
  |---|---|---|
302
+ | [`BrainboxAI/law-il-E2B`](https://huggingface.co/BrainboxAI/law-il-E2B) | `gemma-4-E2B-it.Q4_K_M.gguf` (3.4 GB) and this card | Ollama, llama.cpp, LM Studio |
303
+ | [`BrainboxAI/law-il-E2B-safetensors`](https://huggingface.co/BrainboxAI/law-il-E2B-safetensors) | Merged 16-bit weights (10.2 GB) | `transformers`, and continued training |
304
 
305
+ The repository also holds `gemma-4-E2B-it.BF16-mmproj.gguf` (0.99 GB). That is Gemma-4's vision component, needed only if you want to feed it images. Text questions do not need it.
306
 
307
+ ## License
308
 
309
+ Apache 2.0. You may use, modify, distribute and sell derivatives, including commercial products, with attribution.
310
 
311
+ This is a fine-tune of [`unsloth/gemma-4-E2B-it`](https://huggingface.co/unsloth/gemma-4-E2B-it), so the terms of that model apply to this one as well. The base model is published under Apache 2.0 and also points to the [Gemma 4 licence terms](https://ai.google.dev/gemma/docs/gemma_4_license). Read those before relying on this line commercially.
312
 
313
+ The dataset, [`legal-training-il`](https://huggingface.co/datasets/BrainboxAI/legal-training-il), is published under CC-BY-4.0.
314
 
315
+ ## Citation
316
 
317
  ```bibtex
318
  @misc{elyasi2026lawil,
 
325
  }
326
  ```
327
 
328
+ ## Author
329
 
330
+ Built by [**Netanel Elyasi**](https://huggingface.co/BrainboxAI), founder of [BrainboxAI](https://brainboxai.io), an Israeli applied-AI studio building small, private, domain-specialised models.
331
 
332
+ For custom training, tuning on a firm's own material, or on-premise deployment: [netanele@brainboxai.io](mailto:netanele@brainboxai.io).
333
 
334
+ *Part of the BrainboxAI family of on-device models. See also [`code-il-E4B`](https://huggingface.co/BrainboxAI/code-il-E4B) (code) and [`cyber-analyst-4B`](https://huggingface.co/BrainboxAI/cyber-analyst-4B) (security).*