https://github.com/nakjun/llama-3.2-1b-instruct-korquad-finetune
Llama-3.2-1B-Instruct model and KorQuAD dataset Finetune project
https://github.com/nakjun/llama-3.2-1b-instruct-korquad-finetune
fine-tuning llama sllm
Last synced: 4 months ago
JSON representation
Llama-3.2-1B-Instruct model and KorQuAD dataset Finetune project
- Host: GitHub
- URL: https://github.com/nakjun/llama-3.2-1b-instruct-korquad-finetune
- Owner: nakjun
- Created: 2024-11-13T00:40:54.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-14T00:26:24.000Z (7 months ago)
- Last Synced: 2025-01-13T03:15:16.510Z (5 months ago)
- Topics: fine-tuning, llama, sllm
- Language: Python
- Homepage: https://huggingface.co/NakJun/Llama-3.2-1B-Instruct-korQuAD-v1
- Size: 4.71 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Llama-3.2-1B-Instruct-korQuAD-v1
๐ค [**Hugging Face**](https://huggingface.co/NakJun/Llama-3.2-1B-Instruct-korQuAD-v1) - **21.9K Downloads**
**Llama-3.2-1B-Instruct๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ๊ตญ์ด ์ง์์๋ต ํ์คํฌ๋ฅผ fine-tuning, inference, evaluation ํ๋ ํ๋ก์ ํธ**
## basic
- ๊ธฐ๋ณธ ๋ชจ๋ธ: Llama-3.2-1B-Instruct
- ํ์ต ๋ฐ์ดํฐ์ : KorQuAD v1.0
- ํ์ต ๋ฐฉ๋ฒ: LoRA (Low-Rank Adaptation)
- ์ฃผ์ ํ์คํฌ: ํ๊ตญ์ด ์ง์์๋ต## history
### v1.0.0(2024-10-02)
- ์ด๊ธฐ ๋ฒ์ ์ ๋ก๋
- KorQuAD v1.0 ๋ฐ์ดํฐ์ ํ์ธํ๋### v1.1.0(2024-10-30)
- ๋ชจ๋ธ ํ๋กฌํํธ ๋ฐ ํ์ต ๋ฐฉ๋ฒ ๊ฐ์
- KorQuAD evaluate ์ฝ๋ ์ ์ฉ## evaluation
| ๋ชจ๋ธ | Exact Match | F1 Score |
|------|-------------|----------|
| Llama-3.2-1B-Instruct-v1 | 18.86 | 37.2 |
| Llama-3.2-1B-Instruct-v2 | 36.07 | 59.03 |
โป https://korquad.github.io/category/1.0_KOR.html์ evaluation script ์ฌ์ฉ## code description
```
1. fine_tuning.py
- ๋ชจ๋ธ ํ์ธํ๋ ์ฝ๋
- training_params ๋ณ๊ฒฝํ์ฌ ํ์ต ํ์ดํผํ๋ผ๋ฏธํฐ ์์ ๊ฐ๋ฅ2. inference.py
- ๋ชจ๋ธ ์ธํผ๋ฐ์ค ์ฝ๋
- ๋ชจ๋ธ ๊ฒฝ๋ก ๋ณ๊ฒฝ ํ ์ฌ์ฉ ๊ฐ๋ฅ3. evaluation.py
- ๋ชจ๋ธ ์ด๋ฐธ๋ฅ์์ด์ ์ฝ๋
- KorQuAD evaluate๋ฅผ ์ํ json ์ ์ฅ4. evaluate-v1.0.py
- KorQuAD evaluate ์ฝ๋ ์ ์ฉ
- ํ๊ฐ ์งํ ์ถ๋ ฅ(Exact Match, F1 Score)
$python evaluate-v1.0.py [dataset_file] [prediction_file]
```## learning parameters
- step: 2000
- ๋ฐฐ์น ํฌ๊ธฐ: 1
- ํ์ต๋ฅ : 2e-4
- ์ตํฐ๋ง์ด์ : AdamW (32-bit)
- LoRA ์ค์ :
- r: 16
- lora_alpha: 16
- ๋์ ๋ชจ๋: ["q_proj", "v_proj", "k_proj", "o_proj", "gate_proj", "down_proj", "up_proj"]
- lora_dropout: 0.01## Contact
- [email protected]
- https://github.com/nakjun
- https://huggingface.co/NakJun/Llama-3.2-1B-Instruct-korQuAD-v1