kyujinpy commited on
Commit
4fcc3f7
·
1 Parent(s): 14f27fe

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -175
README.md CHANGED
@@ -23,13 +23,11 @@ license: cc-by-nc-4.0
23
  **Output** Models generate text only.
24
 
25
  **Model Architecture**
26
-
27
  KO-Platypus2-13B is an auto-regressive language model based on the LLaMA2 transformer architecture.
28
 
29
- **Base Model** [llama-2-13b](https://huggingface.co/meta-llama/Llama-2-13b-hf)
30
 
31
  **Training Dataset**
32
-
33
  I use [KOpen-platypus](https://huggingface.co/datasets/kyujinpy/KOpen-platypus).
34
  It is high-quality korean translation dataset about [open-platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
35
 
@@ -37,61 +35,20 @@ I use A100 GPU 40GB and COLAB, when trianing.
37
 
38
  # **Model Benchmark**
39
 
40
- ## LM Eval Harness - Korean (polyglot branch)
41
- - Used EleutherAI's [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/tree/polyglot)
42
-
43
- > Question Answering (QA)
44
- ### COPA (F1)
45
-
46
- | Model | 0-shot | 5-shot | 10-shot | 50-shot |
47
- | --- | --- | --- | --- | --- |
48
- | [Polyglot-ko-1.3b](https://huggingface.co/EleutherAI/polyglot-ko-1.3b) | 0.7196 | 0.7193 | 0.7204 | 0.7206 |
49
- | [Polyglot-ko-3.8b](https://huggingface.co/EleutherAI/polyglot-ko-3.8b) | 0.7595 | 0.7608 | 0.7638 | 0.7788 |
50
- | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.7745 | 0.7676 | 0.7775 | 0.7887 |
51
- | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.7937 | 0.8108 | 0.8037 | 0.8369 |
52
- | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.7388 | 0.7626 | 0.7808 | 0.7979 |
53
- | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.7436 | 0.7927 | 0.8037 | 0.8259 |
54
- | **KO-platypus2-13B(ours)** | 0.5820 | 0.6269 | 0.6267 | 0.6527 |
55
-
56
- > Natural Language Inference (NLI; 자연어 추론 평가)
57
- ### HellaSwag (F1)
58
-
59
- | Model | 0-shot | 5-shot | 10-shot | 50-shot |
60
- | --- | --- | --- | --- | --- |
61
- | [Polyglot-ko-1.3b](https://huggingface.co/EleutherAI/polyglot-ko-1.3b) | 0.5247 | 0.5260 | 0.5278 | 0.5427 |
62
- | [Polyglot-ko-3.8b](https://huggingface.co/EleutherAI/polyglot-ko-3.8b) | 0.5707 | 0.5830 | 0.5670 | 0.5787 |
63
- | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.5976 | 0.5998 | 0.5979 | 0.6208 |
64
- | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.5954 | 0.6306 | 0.6098 | 0.6118 |
65
- | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4518 | 0.4668 | 0.4726 | 0.4828 |
66
- | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4562 | 0.4657 | 0.4698 | 0.4774 |
67
- | **KO-platypus2-13B(ours)** | 0.3912 | 0.4129 | 0.4144 | 0.4330 |
68
-
69
- > Question Answering (QA)
70
- ### BoolQ (F1)
71
-
72
- | Model | 0-shot | 5-shot | 10-shot | 50-shot |
73
- | --- | --- | --- | --- | --- |
74
- | [Polyglot-ko-1.3b](https://huggingface.co/EleutherAI/polyglot-ko-1.3b) | 0.3552 | 0.4751 | 0.4109 | 0.4038 |
75
- | [Polyglot-ko-3.8b](https://huggingface.co/EleutherAI/polyglot-ko-3.8b) | 0.4320 | 0.5263 | 0.4930 | 0.4038 |
76
- | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.4356 | 0.5698 | 0.5187 | 0.5236 |
77
- | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.4818 | 0.6041 | 0.6289 | 0.6448 |
78
- | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.3607 | 0.6797 | 0.6801 | 0.6622 |
79
- | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.5786 | 0.6977 | 0.7084 | 0.7144 |
80
- | **KO-platypus2-13B(ours)** | 0.3539 | 0.7168 | 0.7328 | 0.7172 |
81
-
82
- > Classification
83
- ### SentiNeg (F1)
84
-
85
- | Model | 0-shot | 5-shot | 10-shot | 50-shot |
86
- | --- | --- | --- | --- | --- |
87
- | [Polyglot-ko-1.3b](https://huggingface.co/EleutherAI/polyglot-ko-1.3b) | 0.6790 | 0.6257 | 0.5514 | 0.7851 |
88
- | [Polyglot-ko-3.8b](https://huggingface.co/EleutherAI/polyglot-ko-3.8b) | 0.4858 | 0.7950 | 0.7320 | 0.7851 |
89
- | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.3394 | 0.8841 | 0.8808 | 0.9521 |
90
- | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.9117 | 0.9015 | 0.9345 | 0.9723 |
91
- | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4855 | 0.8295 | 0.8711 | 0.8513 |
92
- | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4594 | 0.7611 | 0.7276 | 0.9370 |
93
- | **KO-platypus2-13B(ours)** | 0.5216 | 0.8236 | 0.8487 | 0.8789 |
94
 
 
 
 
 
 
 
 
 
 
 
 
95
  # Implementation Code
96
  ```python
97
  ### KO-Platypus
@@ -99,129 +56,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
99
  import torch
100
 
101
  repo = "kyujinpy/KO-Platypus2-13B"
102
- ko_platypus = AutoModelForCausalLM.from_pretrained(
103
  repo,
104
  return_dict=True,
105
  torch_dtype=torch.float16,
106
  device_map='auto'
107
  )
108
- ko_platypus_tokenizer = AutoTokenizer.from_pretrained(repo)
109
- ```
110
-
111
- > Readme format: [beomi/llama-2-ko-7b](https://huggingface.co/beomi/llama-2-ko-7b)
112
-
113
- ---
114
-
115
- > Below is the original model card of the Platypus2-13B model.
116
-
117
- # Platypus2-13B
118
-
119
- Platypus-13B is an instruction fine-tuned model based on the LLaMA2-13B transformer architecture.
120
-
121
- ![Platty](./Best_Platty_small.jpeg)
122
-
123
- ### Benchmark Metrics
124
-
125
- | Metric | Value |
126
- |-----------------------|-------|
127
- | MMLU (5-shot) | 56.70 |
128
- | ARC (25-shot) | 61.26 |
129
- | HellaSwag (10-shot) | 82.56 |
130
- | TruthfulQA (0-shot) | 44.86 |
131
- | Avg. | 61.35 |
132
-
133
- We use state-of-the-art [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard. Please see below for detailed instructions on reproducing benchmark results.
134
-
135
- ### Model Details
136
-
137
- * **Trained by**: Cole Hunter & Ariel Lee
138
- * **Model type:** **Platypus2-13B** is an auto-regressive language model based on the LLaMA2 transformer architecture.
139
- * **Language(s)**: English
140
- * **License for base weights**: Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/))
141
-
142
- ### Prompt Template
143
- ```
144
- ### Instruction:
145
-
146
- <prompt> (without the <>)
147
-
148
- ### Response:
149
  ```
150
 
151
- ### Training Dataset
152
-
153
- `garage-bAInd/Platypus2-13B` trained using STEM and logic based dataset [`garage-bAInd/Open-Platypus`](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
154
 
155
- Please see our [paper](https://arxiv.org/abs/2308.07317) and [project webpage](https://platypus-llm.github.io) for additional information.
156
-
157
- ### Training Procedure
158
-
159
- `garage-bAInd/Platypus2-13B` was instruction fine-tuned using LoRA on 1 A100 80GB. For training details and inference instructions please see the [Platypus2](https://github.com/arielnlee/Platypus) GitHub repo.
160
-
161
- ### Reproducing Evaluation Results
162
-
163
- Install LM Evaluation Harness:
164
- ```
165
- # clone repository
166
- git clone https://github.com/EleutherAI/lm-evaluation-harness.git
167
- # check out the correct commit
168
- git checkout b281b0921b636bc36ad05c0b0b0763bd6dd43463
169
- # change to repo directory
170
- cd lm-evaluation-harness
171
- # install
172
- pip install -e .
173
- ```
174
- Each task was evaluated on 1 A100 80GB GPU.
175
-
176
- ARC:
177
- ```
178
- python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-13B --tasks arc_challenge --batch_size 1 --no_cache --write_out --output_path results/Platypus2-13B/arc_challenge_25shot.json --device cuda --num_fewshot 25
179
- ```
180
-
181
- HellaSwag:
182
- ```
183
- python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-13B --tasks hellaswag --batch_size 1 --no_cache --write_out --output_path results/Platypus2-13B/hellaswag_10shot.json --device cuda --num_fewshot 10
184
- ```
185
-
186
- MMLU:
187
- ```
188
- python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-13B --tasks hendrycksTest-* --batch_size 1 --no_cache --write_out --output_path results/Platypus2-13B/mmlu_5shot.json --device cuda --num_fewshot 5
189
- ```
190
-
191
- TruthfulQA:
192
- ```
193
- python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-13B --tasks truthfulqa_mc --batch_size 1 --no_cache --write_out --output_path results/Platypus2-13B/truthfulqa_0shot.json --device cuda
194
- ```
195
- ### Limitations and bias
196
-
197
- Llama 2 and fine-tuned variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2 and any fine-tuned varient's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model.
198
-
199
- Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/
200
-
201
- ### Citations
202
- ```bibtex
203
- @article{platypus2023,
204
- title={Platypus: Quick, Cheap, and Powerful Refinement of LLMs},
205
- author={Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz},
206
- booktitle={arXiv preprint arxiv:2308.07317},
207
- year={2023}
208
- }
209
- ```
210
- ```bibtex
211
- @misc{touvron2023llama,
212
- title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
213
- author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov year={2023},
214
- eprint={2307.09288},
215
- archivePrefix={arXiv},
216
- }
217
- ```
218
- ```bibtex
219
- @inproceedings{
220
- hu2022lora,
221
- title={Lo{RA}: Low-Rank Adaptation of Large Language Models},
222
- author={Edward J Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen},
223
- booktitle={International Conference on Learning Representations},
224
- year={2022},
225
- url={https://openreview.net/forum?id=nZeVKeeFYf9}
226
- }
227
- ```
 
23
  **Output** Models generate text only.
24
 
25
  **Model Architecture**
 
26
  KO-Platypus2-13B is an auto-regressive language model based on the LLaMA2 transformer architecture.
27
 
28
+ **Base Model** [hyunseoki/ko-en-llama2-13b](https://huggingface.co/hyunseoki/ko-en-llama2-13b)
29
 
30
  **Training Dataset**
 
31
  I use [KOpen-platypus](https://huggingface.co/datasets/kyujinpy/KOpen-platypus).
32
  It is high-quality korean translation dataset about [open-platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
33
 
 
35
 
36
  # **Model Benchmark**
37
 
38
+ ## KO-LLM leaderboard
39
+ - Follow up as [Open KO-LLM LeaderBoard](https://huggingface.co/spaces/upstage/open-ko-llm-leaderboard).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ ![img](./leaderboard.png)
42
+ | Model | Average |Ko-ARC | Ko-HellaSwag | Ko-MMLU | Ko-TruthfulQA | Ko-CommonGen V2 |
43
+ | --- | --- | --- | --- | --- | --- | --- |
44
+ | KO-Platypus2-13B(ours) | NaN | NaN | NaN | NaN | NaN | NaN |
45
+ | [hyunseoki/ko-en-llama2-13b](https://huggingface.co/hyunseoki/ko-en-llama2-13b) | 46.68 | 42.15 | 54.23 | 38.90 | 40.74 | 57.39 |
46
+ | [momo/polyglot-ko-12.8b-Chat-QLoRA-Merge](https://huggingface.co/momo/polyglot-ko-12.8b-Chat-QLoRA-Merge) | 45.71 | 35.49 | 49.93 | 25.97 | 39.43 | 77.70 |
47
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 45.62 | 38.05 | 49.63 | 34.68 | 37.69 | 68.08 |
48
+ | [DopeorNope/COLA3-7B](https://huggingface.co/DopeorNope/COLA3-7B) | 45.61 | 39.16 | 50.98 | 35.21 | 37.81 | 64.91 |
49
+ > Compare with Top 4 SOTA models. (update: 10/03)
50
+
51
+ ---
52
  # Implementation Code
53
  ```python
54
  ### KO-Platypus
 
56
  import torch
57
 
58
  repo = "kyujinpy/KO-Platypus2-13B"
59
+ CoT-llama = AutoModelForCausalLM.from_pretrained(
60
  repo,
61
  return_dict=True,
62
  torch_dtype=torch.float16,
63
  device_map='auto'
64
  )
65
+ CoT-llama_tokenizer = AutoTokenizer.from_pretrained(repo)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ```
67
 
68
+ > Readme format: [kyujinpy/KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B)
 
 
69
 
70
+ ---