Update README.md
Browse files
README.md
CHANGED
@@ -9,50 +9,60 @@ tags:
|
|
9 |
licence: license
|
10 |
---
|
11 |
|
12 |
-
# Model Card for mistral-bloom-finetune
|
13 |
|
14 |
-
|
15 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
-
|
20 |
-
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
```
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
|
|
|
34 |
|
35 |
-
|
36 |
|
37 |
-
|
38 |
-
- Transformers: 4.51.3
|
39 |
-
- Pytorch: 2.6.0+cu124
|
40 |
-
- Datasets: 3.6.0
|
41 |
-
- Tokenizers: 0.21.1
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
```bibtex
|
50 |
-
@misc{vonwerra2022trl,
|
51 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
52 |
-
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
53 |
-
year = 2020,
|
54 |
-
journal = {GitHub repository},
|
55 |
-
publisher = {GitHub},
|
56 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
57 |
-
}
|
58 |
-
```
|
|
|
9 |
licence: license
|
10 |
---
|
11 |
|
|
|
12 |
|
13 |
+
# 🤖 Thai-HomeworkGen — โมเดลสร้าง/แก้โจทย์คณิตศาสตร์ภาษาไทย
|
|
|
14 |
|
15 |
+
**Thai-HomeworkGen** เป็นโมเดลภาษาไทยขนาด 7B ที่ถูก fine-tune ด้วยเทคนิค **Supervised Fine-tuning (SFT)**
|
16 |
+
โดยใช้ไลบรารี [`trl`](https://github.com/huggingface/trl) ร่วมกับ **QLoRA** บนฐาน [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3)
|
17 |
|
18 |
+
---
|
19 |
+
|
20 |
+
## 🎯 จุดประสงค์ของโมเดล
|
21 |
|
22 |
+
- ✅ สร้างโจทย์คณิตศาสตร์ใหม่ในรูปแบบภาษาไทย
|
23 |
+
- ✅ แสดงวิธีทำและคำตอบที่ชัดเจน
|
24 |
+
- ✅ รองรับระดับความคิดตามแนวทาง **Bloom’s Taxonomy**
|
25 |
+
- ✅ ออกแบบมาเพื่อใช้ในบริบทการศึกษา การสอน และการวัดผล reasoning
|
|
|
26 |
|
27 |
+
---
|
28 |
|
29 |
+
## 🧠 ข้อมูลการฝึก (Training Details)
|
30 |
|
31 |
+
- **Base Model:** `mistralai/Mistral-7B-Instruct-v0.3`
|
32 |
+
- **Library:** [`trl`](https://github.com/huggingface/trl) (`SFTTrainer`)
|
33 |
+
- **Adapter:** QLoRA (`peft`)
|
34 |
+
- **Batch Size:** 2 × 4 (gradient_accumulation)
|
35 |
+
- **Epochs:** 3
|
36 |
+
- **Sequence Length:** 1024
|
37 |
+
- **Dataset:** Thai Math Dataset (~32K examples, translated + aligned)
|
38 |
|
39 |
+
โมเดลถูกฝึกด้วย QLoRA โดยใช้เทคนิค **low-rank adapter (LoRA)** ร่วมกับ quantization 4-bit
|
40 |
+
เพื่อให้สามารถฝึกบน GPU ขนาดกลาง เช่น A100 หรือ Colab Pro ได้อย่างมีประสิทธิภาพ
|
41 |
|
42 |
+
---
|
43 |
|
44 |
+
## 📦 Dataset ที่ใช้
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
ชื่อชุดข้อมูล: **Thai-HomeworkGen-32K**
|
47 |
+
เนื้อหา: โจทย์คณิตศาสตร์ภาษาไทยระดับมัธยมปลาย พร้อมวิธีทำ คำตอบ และระดับ Bloom Taxonomy
|
48 |
+
ต้นฉบับแปลจากชุดข้อมูลภาษาอังกฤษ
|
49 |
+
1. [MathQA (allenai)](https://huggingface.co/datasets/allenai/math_qa)
|
50 |
+
2. [MATH-500 (HuggingFaceH4)](https://huggingface.co/datasets/HuggingFaceH4/MATH-500)
|
51 |
+
3. [MATH-Algebra](https://huggingface.co/datasets/themanas021/MATH-Algebra)
|
52 |
+
4. [math-mixture: mix_intermediate_algebra97_algebra01_prealgebra00](https://huggingface.co/datasets/andrewsiah/math-mixture-mix_intermediate_algebra97_algebra01_prealgebra00)
|
53 |
+
5. [math-mixture: mix_algebra76_prealgebra12_number_theory08](https://huggingface.co/datasets/andrewsiah/math-mixture-mix_algebra76_prealgebra12_number_theory08)
|
54 |
+
6. [Math-algebra (datafreak)](https://huggingface.co/datasets/datafreak/Math-algebra)
|
55 |
+
7. [MATH Dataset (Hendrycks et al.)](https://github.com/hendrycks/math/)
|
56 |
+
8. [GSM8K (openai)](https://huggingface.co/datasets/openai/gsm8k)
|
57 |
+
9. [Math QSA Dataset (Kaggle)](https://www.kaggle.com/datasets/awsaf49/math-qsa-dataset)
|
58 |
+
10. [AQuA (DeepMind)](https://github.com/google-deepmind/AQuA)
|
59 |
|
60 |
+
ชุดข้อมูลถูกแปลและจัดโครงสร้างโดยใช้ LLM (Gemma 2 27B) พร้อมตรวจสอบโดยผู้เชี่ยวชาญจาก สวทช.
|
61 |
+
|
62 |
+
👉 [ดูรายละเอียดของ Dataset](https://huggingface.co/datasets/UpMath/Thai-HomeworkGen-32K)
|
63 |
+
|
64 |
+
---
|
65 |
|
66 |
+
## การอ้างอิง
|
67 |
|
68 |
+
หากคุณใช้งานโมเดลนี้ สามารถให้เครดิตโปรเจกต์นี้ได้ด้วย
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|