kyujinpy commited on
Commit
0385ad7
1 Parent(s): 58a86bf

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +118 -0
  3. poly-platypus.png +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ poly-platypus.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,121 @@
1
  ---
 
 
 
 
 
 
2
  license: cc-by-nc-4.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - ko
4
+ datasets:
5
+ - kyujinpy/KOpen-platypus
6
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
  license: cc-by-nc-4.0
9
  ---
10
+
11
+ # **KoT-platypus2**
12
+ ![img](./poly-platypus.png)
13
+ **Polyglot-ko + KO-platypus2 = Poly-platypus-ko**
14
+
15
+ ## Model Details
16
+
17
+ **Model Developers** Kyujin Han (kyujinpy)
18
+
19
+ **Input** Models input text only.
20
+
21
+ **Output** Models generate text only.
22
+
23
+ **Model Architecture**
24
+ Poly-platypus-ko is an auto-regressive language model based on the LLaMA2 transformer architecture.
25
+
26
+ **Base Model**
27
+ [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b)
28
+
29
+ **Fine-tuning method**
30
+ Same as [KO-Platypus2](https://github.com/Marker-Inc-Korea/CoT-llama2).
31
+
32
+ **Training Dataset**
33
+ I use [KOpen-platypus dataset](https://huggingface.co/datasets/kyujinpy/KOpen-platypus).
34
+ I use A100 GPU 40GB and COLAB, when trianing.
35
+
36
+ # **Model Bechmark1**
37
+
38
+ ## [KO-LLM leaderboard](https://huggingface.co/spaces/upstage/open-ko-llm-leaderboard)
39
+ | Model | Ko-ARC | Ko-HellaSwag | Ko-MMLU | Ko-TruthfulQA | Ko-CommonGen V2 |
40
+ | --- | --- | --- | --- | --- | --- |
41
+ | Poly-platypus-ko-12.8b(ours) | NaN | NaN | NaN | NaN | NaN |
42
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 38.05 | 49.63 | 34.68 | 37.69 | 68.08 |
43
+ | [KO-platypus2-7B-EX](https://huggingface.co/kyujinpy/KO-Platypus2-7B-ex) | 39.08 | 50.86 | 34.60 | 37.94 | 64.55 |
44
+ | [42MARU/polyglot-ko-12.8b-instruct](https://huggingface.co/42MARU/polyglot-ko-12.8b-instruct) | 36.35 | 51.59 | 26.38 | 45.16 | 59.98 |
45
+ | 42MARU/llama-2-ko-7b-instruct-v2 | 39.51 | 51.67 | 32.54 | 38.30 | 57.39 |
46
+ | [FINDA-FIT/llama-p](https://huggingface.co/FINDA-FIT/llama-p) | 39.59 | 50.74 | 33.85 | 38.09 | 55.87 |
47
+ > Compare with Top 5 SOTA models. (update: 10/01)
48
+
49
+ ---
50
+ # **Model Benchmark2**
51
+
52
+ ## LM Eval Harness - Korean (polyglot branch)
53
+ - Used EleutherAI's [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/tree/polyglot)
54
+
55
+ > Question Answering (QA)
56
+ ### COPA (F1)
57
+ | Model | 0-shot | 5-shot | 10-shot | 50-shot |
58
+ | --- | --- | --- | --- | --- |
59
+ | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.7745 | 0.7676 | 0.7775 | 0.7887 |
60
+ | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.7937 | 0.8108 | 0.8037 | 0.8369 |
61
+ | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.7388 | 0.7626 | 0.7808 | 0.7979 |
62
+ | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.7436 | 0.7927 | 0.8037 | 0.8259 |
63
+ | [KO-platypus2-7B-EX](https://huggingface.co/kyujinpy/KO-Platypus2-7B-ex) | 0.7509 | 0.7899 | 0.8029 | 0.8290 |
64
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 0.7517 | 0.7868 | 0.8009 | 0.8239 |
65
+ | **Poly-platypus-ko-12.8b(ours)** | 0.7876 | NaN | NaN | NaN |
66
+
67
+ > Natural Language Inference (NLI; 자연어 추론 평가)
68
+ ### HellaSwag (F1)
69
+ | Model | 0-shot | 5-shot | 10-shot | 50-shot |
70
+ | --- | --- | --- | --- | --- |
71
+ | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.5976 | 0.5998 | 0.5979 | 0.6208 |
72
+ | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.5954 | 0.6306 | 0.6098 | 0.6118 |
73
+ | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4518 | 0.4668 | 0.4726 | 0.4828 |
74
+ | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4562 | 0.4657 | 0.4698 | 0.4774 |
75
+ | [KO-platypus2-7B-EX](https://huggingface.co/kyujinpy/KO-Platypus2-7B-ex) | 0.4571 | 0.4461 | 0.4371 | 0.4525 |
76
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 0.4432 | 0.4382 | 0.4550 | 0.4534 |
77
+ | **Poly-platypus-ko-12.8b(ours)** | 0.4838 | NaN | NaN | NaN |
78
+
79
+ > Question Answering (QA)
80
+ ### BoolQ (F1)
81
+ | Model | 0-shot | 5-shot | 10-shot | 50-shot |
82
+ | --- | --- | --- | --- | --- |
83
+ | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.4356 | 0.5698 | 0.5187 | 0.5236 |
84
+ | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.4818 | 0.6041 | 0.6289 | 0.6448 |
85
+ | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.3607 | 0.6797 | 0.6801 | 0.6622 |
86
+ | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.5786 | 0.6977 | 0.7084 | 0.7144 |
87
+ | [KO-platypus2-7B-EX](https://huggingface.co/kyujinpy/KO-Platypus2-7B-ex) | 0.6028 | 0.6979 | 0.7016 | 0.6988 |
88
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 0.6142 | 0.6757 | 0.6839 | 0.6878 |
89
+ | **Poly-platypus-ko-12.8b(ours)** | 0.4888 | NaN | NaN | NaN |
90
+
91
+ > Classification
92
+ ### SentiNeg (F1)
93
+ | Model | 0-shot | 5-shot | 10-shot | 50-shot |
94
+ | --- | --- | --- | --- | --- |
95
+ | [Polyglot-ko-5.8b](https://huggingface.co/EleutherAI/polyglot-ko-5.8b) | 0.3394 | 0.8841 | 0.8808 | 0.9521 |
96
+ | [Polyglot-ko-12.8b](https://huggingface.co/EleutherAI/polyglot-ko-12.8b) | 0.9117 | 0.9015 | 0.9345 | 0.9723 |
97
+ | [Llama-2-Ko-7b 20B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4855 | 0.8295 | 0.8711 | 0.8513 |
98
+ | [Llama-2-Ko-7b 40B](https://huggingface.co/beomi/llama-2-ko-7b) | 0.4594 | 0.7611 | 0.7276 | 0.9370 |
99
+ | [KO-platypus2-7B-EX](https://huggingface.co/kyujinpy/KO-Platypus2-7B-ex) | 0.5821 | 0.7653 | 0.7991 | 0.8643 |
100
+ | [KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B) | 0.6127 | 0.7199 | 0.7531 | 0.8381 |
101
+ | **Poly-platypus-ko-12.8b(ours)** | 0.8490 | NaN | NaN | NaN |
102
+
103
+ # Implementation Code
104
+ ```python
105
+ ### KO-Platypus
106
+ from transformers import AutoModelForCausalLM, AutoTokenizer
107
+ import torch
108
+
109
+ repo = "MarkrAI/kyujin-Poly-platypus-ko-12.8b"
110
+ CoT-llama = AutoModelForCausalLM.from_pretrained(
111
+ repo,
112
+ return_dict=True,
113
+ torch_dtype=torch.float16,
114
+ device_map='auto'
115
+ )
116
+ CoT-llama_tokenizer = AutoTokenizer.from_pretrained(repo)
117
+ ```
118
+
119
+ > Readme format: [kyujinpy/KoT-platypus2-7B](https://huggingface.co/kyujinpy/KoT-platypus2-7B)
120
+
121
+ ---
poly-platypus.png ADDED

Git LFS Details

  • SHA256: b524d9b319371721dd75baa4671bc154c635c5f4cf297991eef61ef65618f6c0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.09 MB