danf commited on
Commit
e324aac
ยท
unverified ยท
1 Parent(s): d433933

Model card

Browse files

Assets need to be uploaded manually.

Files changed (1) hide show
  1. README.md +271 -3
README.md CHANGED
@@ -1,3 +1,271 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ license_link: https://huggingface.co/Intel/hebrew-math-tutor-v1/blob/main/LICENSE
5
+ pipeline_tag: text-generation
6
+ language:
7
+ - he
8
+ - en
9
+ tags:
10
+ - mathematics
11
+ - education
12
+ - hebrew
13
+ - reasoning
14
+ - math
15
+ - tutoring
16
+ ---
17
+
18
+ # Hebrew Math Tutor
19
+
20
+ <p align="center">
21
+ <img src="tutor-illustration.png" width="600"/>
22
+ </p>
23
+
24
+ **Hebrew Math Tutor** is a specialized mathematical reasoning model that provides step-by-step solutions to math problems in Hebrew. Built on Qwen3-4B-Thinking-2507, this model bridges the gap between advanced AI mathematical capabilities and Hebrew-language education.
25
+
26
+ - ๐ŸŽฏ **Model ID**: `Intel/hebrew-math-tutor-v1`
27
+ - ๐Ÿ—๏ธ **Base Model**: [Qwen3-4B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-4B-Thinking-2507)
28
+ - ๐Ÿ›๏ธ **Architecture**: Decoder-only causal language model (~4B parameters)
29
+ - ๐Ÿ—ฃ๏ธ **Primary Language**: Hebrew (retains multilingual capabilities)
30
+ - ๐Ÿ“„ **License**: Apache-2.0
31
+
32
+ ## Model Description
33
+
34
+ Hebrew Math Tutor is a supervised fine-tune of Qwen3-4B-Thinking, specifically optimized to:
35
+
36
+ - **Provide detailed mathematical reasoning in Hebrew** with clear step-by-step explanations
37
+ - **Maintain mathematical accuracy** while adapting to Hebrew language patterns
38
+ - **Preserve multilingual capabilities** for cross-language mathematical workflows
39
+ - **Support educational applications** with natural Hebrew mathematical discourse
40
+
41
+ The model excels at translating complex mathematical concepts into clear, pedagogically sound Hebrew explanations while maintaining the computational precision of its base model.
42
+
43
+ ## Intended Use Cases
44
+
45
+ ### โœ… **Primary Applications**
46
+
47
+ - **Educational Technology**: Hebrew-language math tutoring systems and learning platforms.
48
+ - **Research Tools**: Mathematical reasoning research in Hebrew educational contexts.
49
+ - **Prototype Development**: Building Hebrew-first educational AI applications.
50
+ - **Accessibility**: Providing advanced math AI assistance to Hebrew-speaking communities.
51
+
52
+ ### โœ… **Secondary Applications**
53
+
54
+ - Multilingual educational workflows requiring Hebrew mathematical explanations.
55
+ - Cross-cultural mathematics education research.
56
+ - Hebrew mathematical content generation for educational materials.
57
+
58
+ ### โŒ **Not Intended For**
59
+
60
+ - **High-stakes assessments**: Medical, legal, or financial decision-making.
61
+ - **Unsupervised grading**: Certification or evaluation without human verification.
62
+ - **Production systems**: Critical applications without proper validation and oversight.
63
+
64
+ ## Model Details
65
+
66
+ | **Specification** | **Details** |
67
+ |-----------------------|--------------------------------------------------|
68
+ | **Architecture** | Decoder-only transformer (causal language model) |
69
+ | **Parameters** | ~4 billion |
70
+ | **Context Length** | Inherited from Qwen3-4B-Thinking-2507 |
71
+ | **Tokenizer** | Qwen3-compatible tokenizer with Hebrew support |
72
+ | **Training Type** | Supervised Fine-Tuning (Hebrew SFT) |
73
+ | **Base Model** | Qwen3-4B-Thinking-2507 |
74
+ | **Fine-tuning Focus** | Mathematical reasoning in Hebrew |
75
+
76
+ ## Training Details
77
+
78
+ ### **Dataset**
79
+
80
+ - **Source**: ~10,000 selected problems from [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning).
81
+ - **Translation Approach**: Automated high-quality translation using internal LLMs.
82
+ - **Language Adaptation**: Questions and final answers translated to Hebrew; reasoning chains preserved.
83
+ - **Mathematical Notation**: Equations and formal math notation kept intact.
84
+ - **Internal Reasoning**: Model's `<think>...</think>` blocks intentionally remain in English (representing internal reasoning processes).
85
+
86
+ ### **Training Configuration**
87
+
88
+ - **Method**: Supervised Fine-Tuning (Hebrew SFT)
89
+ - **Epochs**: 3
90
+ - **Learning Rate**: 5e-6
91
+ - **Warmup**: 0.1
92
+ - **Scheduler**: Cosine learning rate decay
93
+ - **Objective**: Maintain mathematical accuracy while adapting output to Hebrew
94
+
95
+ ## Performance Evaluation
96
+
97
+ We evaluated Hebrew Math Tutor on three challenging mathematical benchmarks: **MATH500**, **AIME24**, and **AIME25**.
98
+
99
+ ### **Evaluation Metrics**
100
+
101
+ - **pass@16**: Percentage of problems where at least one of 16 generated samples is correct.
102
+ - **maj@16**: Majority-vote accuracy across 16 samples.
103
+ - **Hebrew Answers**: Percentage of responses generated in Hebrew.
104
+
105
+ ### **Hebrew Evaluation Results**
106
+
107
+ | Dataset | Metric | Base Model | Hebrew Math Tutor | Improvement |
108
+ |-------------|----------------|------------|-------------------|-------------|
109
+ | **MATH500** | pass@16 | 93% | **95%** | +2% |
110
+ | | maj@16 | 88% | **90%** | +2% |
111
+ | | Hebrew Answers | 75% | **100%** | +25% |
112
+ | **AIME24** | pass@16 | 76.7% | **80%** | +3.3% |
113
+ | | maj@16 | 76.7% | **76.7%** | No change |
114
+ | | Hebrew Answers | 35.2% | **96.7%** | +61.5% |
115
+ | **AIME25** | pass@16 | 80% | **83.3%** | +3.3% |
116
+ | | maj@16 | 70% | **60%** | -10% |
117
+ | | Hebrew Answers | 36% | **95.2%** | +59.2% |
118
+
119
+ ### **English/Original Language Results**
120
+
121
+ | Dataset | Metric | Base Model | Hebrew Math Tutor | Change |
122
+ |-------------|---------|------------|-------------------|-----------|
123
+ | **MATH500** | pass@16 | 99% | **98%** | -1% |
124
+ | | maj@16 | 98% | **98%** | No change |
125
+ | **AIME24** | pass@16 | 93.3% | **90%** | -3.3% |
126
+ | | maj@16 | 86.7% | **86.7%** | No change |
127
+ | **AIME25** | pass@16 | 83.3% | **90%** | +6.7% |
128
+ | | maj@16 | 73% | **80%** | +7% |
129
+
130
+ ### **Key Findings**
131
+
132
+ ๐ŸŽฏ **Dramatic Language Improvement**: Hebrew answer generation increased by 25-61.5% across all benchmarks, reaching 95-100% Hebrew output.
133
+
134
+ ๐Ÿ“ˆ **Maintained Technical Performance**: Consistent improvements in pass@16 on Hebrew evaluations while preserving competitive English performance.
135
+
136
+ ๐Ÿ” **Mixed Majority Vote Results**: Strong performance on MATH500, stable on AIME24, with one notable decrease on AIME25 requiring further investigation.
137
+
138
+ โœ… **Preserved Core Capabilities**: The fine-tuning successfully adapted language output without sacrificing fundamental mathematical reasoning abilities.
139
+
140
+ ## Usage
141
+
142
+ ### **Quick Start**
143
+
144
+ ```python
145
+ from transformers import pipeline
146
+
147
+ model = "Intel/hebrew-math-tutor-v1"
148
+ pipe = pipeline("text-generation", model)
149
+
150
+ messages = [
151
+ {
152
+ "role": "system",
153
+ "content": """You are a helpful AI assistant specialized in mathematics and problem-solving who can answer math questions with the correct answer.
154
+ Answer shortly, not more than 500 tokens, but outline the process step by step.
155
+ Answer ONLY in Hebrew!""",
156
+ },
157
+ {"role": "user", "content": "ืžื”ื• ืกื›ื•ื ื”ืกื“ืจื” ื”ื‘ืื”: 1 + 1/2 + 1/4 + 1/8 + ..."},
158
+ ]
159
+
160
+ out = pipe(
161
+ messages,
162
+ return_full_text=False,
163
+ max_new_tokens=1024,
164
+ temperature=0.6,
165
+ top_p=0.95,
166
+ top_k=20,
167
+ )
168
+ print(out[0]["generated_text"])
169
+ ```
170
+
171
+ ### **Recommended Parameters**
172
+
173
+ - **Temperature**: 0.6 (balanced creativity and accuracy)
174
+ - **Top-p**: 0.95 (diverse but focused sampling)
175
+ - **Top-k**: 20 (controlled vocabulary selection)
176
+ - **Max tokens**: 500-1024 (sufficient for detailed explanations)
177
+
178
+ ### **Best Practices**
179
+
180
+ - **Request explicit structure**: Ask for step-by-step reasoning and clearly marked final answers.
181
+ - **Use Hebrew formatting cues**: Include phrases like "ืชืฉื•ื‘ื” ืกื•ืคื™ืช:" or request `\boxed{}` formatting.
182
+ - **Specify language**: Explicitly request Hebrew-only responses for consistent output.
183
+ - **Verify solutions**: Always validate mathematical results, especially in educational contexts.
184
+
185
+ ## Demo Interface
186
+
187
+ <p align="center">
188
+ <img src="demo.png" width="600"/>
189
+ <br>
190
+ <em>Example Streamlit interface showing Hebrew Math Tutor providing step-by-step reasoning. The detailed reasoning can be collapsed for cleaner presentation.</em>
191
+ </p>
192
+
193
+ ## Limitations & Considerations
194
+
195
+ ### **Technical Limitations**
196
+
197
+ - **Potential errors**: May produce incorrect solutions or mathematical hallucinations.
198
+ - **Language mixing**: Occasional mixing of Hebrew and English or inconsistent number formatting.
199
+ - **Training biases**: May reflect biases present in the original training datasets.
200
+ - **Internal reasoning**: `<think>...</think>` blocks remain in English due to training scope.
201
+
202
+ ### **Usage Recommendations**
203
+
204
+ - **Human verification required**: Always validate outputs before use in educational settings
205
+ - **Not a replacement for educators**: Designed as an assistive tool, not a substitute for qualified instruction.
206
+ - **Appropriate context**: Best suited for educational prototyping and research applications.
207
+
208
+ ## Ethical Guidelines
209
+
210
+ ### **Responsible Deployment**
211
+
212
+ - Include clear disclaimers about AI-generated content in user-facing applications.
213
+ - Implement human oversight for any educational or assessment applications.
214
+ - Ensure compliance with relevant privacy laws when collecting user data.
215
+ - Provide transparency about model capabilities and limitations.
216
+
217
+ ### **Educational Impact**
218
+
219
+ - Designed to enhance, not replace, human mathematical instruction.
220
+ - Intended to increase accessibility of advanced math AI for Hebrew speakers.
221
+ - Should be used as part of comprehensive educational approaches with human guidance.
222
+
223
+ ## Technical Details
224
+
225
+ ### **Evaluation Methodology**
226
+
227
+ - **Correctness verification**: Solutions validated using Math-verify framework.
228
+ - **Statistical significance**: Results based on 16 samples per problem for robust evaluation.
229
+ - **Language detection**: Automated classification of response language for Hebrew Answers metric.
230
+ - **Benchmark diversity**: Evaluation across competition mathematics (AIME) and curriculum problems (MATH500).
231
+
232
+ ### **Reproducibility**
233
+
234
+ - All evaluation protocols follow standard mathematical reasoning assessment practices.
235
+ - Sampling parameters and evaluation metrics clearly documented.
236
+ - Training configuration and hyperparameters provided for reproduction.
237
+
238
+ ## Attribution & Licensing
239
+
240
+ - **Model License**: [Apache-2.0](https://huggingface.co/Intel/hebrew-math-tutor-v1/blob/main/LICENSE)
241
+ - **Base Model**: [Qwen3-4B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-4B-Thinking-2507) (Alibaba)
242
+ - **Training Dataset**: [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning) (NVIDIA)
243
+ - **Development**: Intel Labs
244
+
245
+ ## Citation
246
+
247
+ If you use Hebrew Math Tutor in your research or applications, please cite:
248
+
249
+ ```bibtex
250
+ @misc{hebrew-math-tutor-v1,
251
+ title={Hebrew Math Tutor: A Hebrew-focused Mathematical Reasoning Model},
252
+ author={Intel Labs},
253
+ year={2025},
254
+ url={https://huggingface.co/Intel/hebrew-math-tutor-v1},
255
+ note={Fine-tuned from Qwen3-4B-Thinking-2507}
256
+ }
257
+ ```
258
+
259
+ ## Community & Support
260
+
261
+ - **Model Repository**: [https://huggingface.co/Intel/hebrew-math-tutor-v1](https://huggingface.co/Intel/hebrew-math-tutor-v1)
262
+ - **Issues & Feedback**: Use the Hugging Face repository issues for bug reports and feature requests.
263
+ - **Community Discussions**: Join conversations in the repository discussions tab.
264
+
265
+ ## Changelog
266
+
267
+ - **v1.0** โ€” Initial public release with Hebrew mathematical reasoning capabilities.
268
+
269
+ ---
270
+
271
+ *Hebrew Math Tutor represents a step forward in making advanced mathematical AI accessible across languages. We encourage responsible use and welcome community feedback to improve multilingual mathematical reasoning capabilities.*