Update README.md
Browse files
README.md
CHANGED
@@ -1,80 +1,66 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
Covers a broad spectrum of mathematical topics
|
8 |
-
Ideal for educational applications and Arabic-language tutoring systems
|
9 |
-
Built on the robust Llama-3.2-3B-Instruct architecture
|
10 |
|
11 |
-
Model
|
12 |
|
13 |
-
|
14 |
-
Task: Text Generation (Instruction Following)
|
15 |
-
Language: Arabic
|
16 |
-
Base Model: meta-llama/Llama-3.2-3B-Instruct
|
17 |
-
Dataset: Arabic LLaMA Math Dataset
|
18 |
-
Number of Parameters: 3 billion
|
19 |
-
Fine-tuned by: Jr23xd23
|
20 |
|
21 |
-
|
22 |
-
The model was fine-tuned on the Arabic LLaMA Math Dataset, which comprises 12,496 diverse mathematical examples covering:
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
|
|
|
37 |
|
38 |
-
|
39 |
-
Powering educational applications for Arabic-speaking students
|
40 |
-
Enhancing Arabic-language tutoring systems
|
41 |
-
Facilitating mathematical reasoning tasks in Arabic
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
# Load model and tokenizer
|
48 |
tokenizer = AutoTokenizer.from_pretrained("Jr23xd23/Math_Arabic_Llama-3.2-3B-Instruct")
|
49 |
model = AutoModelForCausalLM.from_pretrained("Jr23xd23/Math_Arabic_Llama-3.2-3B-Instruct")
|
50 |
|
51 |
# Example: Solving a math problem in Arabic
|
52 |
input_text = "ู
ุง ูู ู
ุฌู
ูุน ุงูุฒูุงูุง ูู ู
ุซูุซุ" # What is the sum of angles in a triangle?
|
53 |
inputs = tokenizer(input_text, return_tensors="pt")
|
54 |
-
output = model.generate(**inputs
|
55 |
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
56 |
-
Limitations
|
57 |
-
|
58 |
-
The model is optimized for mathematical tasks in Arabic and may not perform well on general language tasks.
|
59 |
-
Performance may decrease for extremely complex mathematical problems that fall outside the scope of the training dataset.
|
60 |
-
The model's responses should be verified for critical applications.
|
61 |
-
|
62 |
-
Ethical Considerations
|
63 |
-
|
64 |
-
Users should be aware of potential biases in the training data.
|
65 |
-
The model should not be used as the sole decision-maker in high-stakes scenarios.
|
66 |
-
Implement appropriate safeguards when deploying this model in educational settings.
|
67 |
-
|
68 |
-
License
|
69 |
-
This model is licensed under the Apache 2.0 License.
|
70 |
-
Citation
|
71 |
-
If you use this model in your research or projects, please use the following citation:
|
72 |
-
bibtexCopy@model{Math_Arabic_Llama_3.2_3B_Instruct,
|
73 |
-
title={Math_Arabic_Llama-3.2-3B-Instruct},
|
74 |
-
author={Jr23xd23},
|
75 |
-
year={2024},
|
76 |
-
publisher={Hugging Face},
|
77 |
-
url={https://huggingface.co/Jr23xd23/Math_Arabic_Llama-3.2-3B-Instruct},
|
78 |
-
}
|
79 |
-
Acknowledgements
|
80 |
-
We extend our gratitude to the creators of the Arabic LLaMA Math Dataset for providing an invaluable resource that made this fine-tuning possible.
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- llama
|
5 |
+
- text-generation
|
6 |
+
- instruct
|
7 |
+
- arabic
|
8 |
+
- math
|
9 |
+
- fine-tuned
|
10 |
+
datasets:
|
11 |
+
- Jr23xd23/Arabic_LLaMA_Math_Dataset
|
12 |
+
base_model: meta-llama/Llama-3.2-3B-Instruct
|
13 |
+
inference: true
|
14 |
+
---
|
15 |
|
16 |
+
# Math_Arabic_Llama-3.2-3B-Instruct
|
|
|
|
|
|
|
17 |
|
18 |
+
## Model Description
|
19 |
|
20 |
+
**Math_Arabic_Llama-3.2-3B-Instruct** is a fine-tuned version of the **Llama-3.2-3B-Instruct** model, tailored for solving mathematical problems in Arabic. The model was trained using the **[Arabic LLaMA Math Dataset](https://github.com/jaberjaber23/Arabic-LLaMA-Math-Dataset)**, which includes a wide range of mathematical problems in natural language (Arabic). This model is ideal for educational applications, tutoring, and systems that require automatic math problem-solving in Arabic.
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
## Model Details
|
|
|
23 |
|
24 |
+
- **Model Type**: Transformer-based language model fine-tuned for text generation.
|
25 |
+
- **Languages**: Arabic
|
26 |
+
- **Base Model**: [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct)
|
27 |
+
- **Dataset**: [Arabic LLaMA Math Dataset](https://github.com/jaberjaber23/Arabic-LLaMA-Math-Dataset)
|
28 |
+
- **Number of Parameters**: 3 billion
|
29 |
+
- **Fine-tuned by**: [Jr23xd23](https://huggingface.co/Jr23xd23)
|
30 |
|
31 |
+
## Training Data
|
32 |
|
33 |
+
The model was fine-tuned on the **Arabic LLaMA Math Dataset**, which consists of 12,496 examples covering various mathematical topics, such as:
|
34 |
+
- Basic Arithmetic
|
35 |
+
- Algebra
|
36 |
+
- Geometry
|
37 |
+
- Probability
|
38 |
+
- Combinatorics
|
39 |
|
40 |
+
Each example in the dataset includes:
|
41 |
+
- **Instruction**: The problem statement in Arabic.
|
42 |
+
- **Solution**: The solution to the problem in Arabic.
|
43 |
|
44 |
+
## Intended Use
|
|
|
|
|
|
|
45 |
|
46 |
+
### Primary Use Cases:
|
47 |
+
- Solving mathematical problems in Arabic
|
48 |
+
- Educational applications
|
49 |
+
- Tutoring systems for Arabic-speaking students
|
50 |
+
- Mathematical reasoning tasks in Arabic
|
51 |
+
|
52 |
+
### How to Use
|
53 |
+
|
54 |
+
You can use the model in Python with the Hugging Face `transformers` library:
|
55 |
+
|
56 |
+
```python
|
57 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
58 |
|
|
|
59 |
tokenizer = AutoTokenizer.from_pretrained("Jr23xd23/Math_Arabic_Llama-3.2-3B-Instruct")
|
60 |
model = AutoModelForCausalLM.from_pretrained("Jr23xd23/Math_Arabic_Llama-3.2-3B-Instruct")
|
61 |
|
62 |
# Example: Solving a math problem in Arabic
|
63 |
input_text = "ู
ุง ูู ู
ุฌู
ูุน ุงูุฒูุงูุง ูู ู
ุซูุซุ" # What is the sum of angles in a triangle?
|
64 |
inputs = tokenizer(input_text, return_tensors="pt")
|
65 |
+
output = model.generate(**inputs)
|
66 |
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|