Cartinoe5930 commited on
Commit
f6d72bd
Β·
1 Parent(s): df2c6b3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +115 -0
README.md CHANGED
@@ -1,3 +1,118 @@
1
  ---
2
  license: cc-by-nc-sa-4.0
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-nc-sa-4.0
3
+ datasets:
4
+ - Cartinoe5930/KoRAE_filtered_12k
5
+ language:
6
+ - ko
7
+ library_name: transformers
8
  ---
9
+
10
+ ## KoRAE
11
+
12
+ <p align="center"><img src="https://cdn-uploads.huggingface.co/production/uploads/63e087b6a98d931aa90c1b9c/XQ-pNzRDRccd7UFgYDOrx.png", width='300', height='300'></p>
13
+
14
+ We introduce **KoRAE** which finetuned with filtered high-quality Korean dataset.
15
+
16
+ The **KoRAE** is output of combination of high-quality data which filtered by special data filtering method and Korean Llama-2 that Korean vocabularis were added.
17
+ We utilized special data filtering methods which introduced in [AlpaGasus](https://arxiv.org/abs/2307.08701) to filter high-quality data from mixture of several Korean datasets(OpenOrca-KO, KOpen-Platypus, KoCoT_2000, databricks-dolly-15k-ko).
18
+ We finetuned [Korean Llama-2](https://huggingface.co/beomi/llama-2-koen-13b) that introduced by [@beomi](https://huggingface.co/beomi) on the filtered dataset.
19
+ The Flash-Attention2 and LoRA were utilized for efficient finetuning.
20
+
21
+ The KoRAE will be uploaded in [Open Ko-LLM Leaderboard](https://huggingface.co/spaces/upstage/open-ko-llm-leaderboard)!
22
+ In addition, the DPO trained version of KoRAE will be uploaded soon too!
23
+ Stay tuned for the update of KoRAE!
24
+
25
+ ## Model Details
26
+
27
+ - **Developed by:** [Cartinoe5930](https://huggingface.co/Cartinoe5930)
28
+ - **Base model:** [beomi/llama-2-koen-13b](https://huggingface.co/beomi/llama-2-koen-13b)
29
+ - **Repository:** [gauss5930/KoRAE](https://github.com/gauss5930/KoRAE)
30
+
31
+ For more details, please check the GitHub Repository!
32
+
33
+ ## Training Details
34
+
35
+ - **Hardward:** We utilized A100 80G for finetuning
36
+ - **Training factors:** The [Transformers Trainer](https://huggingface.co/docs/transformers/main_classes/trainer) and [Huggingface PEFT](https://huggingface.co/docs/peft/index) were utilized for finetuning.
37
+
38
+ For more details, please check the GitHub Repository!
39
+
40
+ ## Training Dataset
41
+
42
+ The KoRAE was finetuned with KoRAE dataset filtered high-quality dataset.
43
+ This dataset is a combination of the publicly available Koraen dataset and a filtering method was applied to the result of the combination dataset.
44
+ For more information, please refer to the [dataset card](https://huggingface.co/datasets/Cartinoe5930/KoRAE_filtered_12k) of KoRAE.
45
+
46
+ ## Open Ko-LLM Leaderboard
47
+
48
+ ## Prompt Template
49
+
50
+ ```
51
+ ### System:
52
+ {system_prompt}
53
+
54
+ ### User:
55
+ {instruction + input}
56
+
57
+ ### Assistant:
58
+ {output}
59
+ ```
60
+
61
+ ## Usage example
62
+
63
+ ```python
64
+ # Use a pipeline as a high-level helper
65
+ from transformers import pipeline
66
+ import torch
67
+
68
+ pipe = pipeline("text-generation", model="Cartinoe5930/KoRAE-13b", torch_dtype=torch.bfloat16, device_map="auto")
69
+ messages = [
70
+ {
71
+ "role": "system",
72
+ "content": "당신은 μœ μš©ν•œ 인곡지λŠ₯ λΉ„μ„œμž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ λͺ‡ 가지 μ§€μ‹œκ°€ ν¬ν•¨λœ μž‘μ—…μ„ μ œκ³΅ν•©λ‹ˆλ‹€. μš”μ²­μ„ 적절히 μ™„λ£Œν•˜λŠ” 응닡을 μž‘μ„±ν•˜μ„Έμš”.",
73
+ },
74
+ {"role": "user", "content": "슀트레슀λ₯Ό ν•΄μ†Œν•˜λŠ” 5가지 방법에 λŒ€ν•΄μ„œ μ„€λͺ…ν•΄μ€˜."}
75
+ ]
76
+
77
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
78
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
79
+ print(outputs[0]["generated_text"])
80
+ ```
81
+
82
+ ## Citation
83
+
84
+ - [KO-Platypus](https://github.com/Marker-Inc-Korea/KO-Platypus)
85
+ - [Korean-OpenOrca](https://github.com/Marker-Inc-Korea/Korean-OpenOrca)
86
+
87
+ ```
88
+ @inproceedings{lee2023kullm,
89
+ title={KULLM: Learning to Construct Korean Instruction-following Large Language Models},
90
+ author={Lee, SeungJun and Lee, Taemin and Lee, Jeongwoo and Jang, Yoona and Lim, Heuiseok},
91
+ booktitle={Annual Conference on Human and Language Technology},
92
+ pages={196--202},
93
+ year={2023},
94
+ organization={Human and Language Technology}
95
+ }
96
+ ```
97
+
98
+ ```
99
+ @misc{chen2023alpagasus,
100
+ title={AlpaGasus: Training A Better Alpaca with Fewer Data},
101
+ author={Lichang Chen and Shiyang Li and Jun Yan and Hai Wang and Kalpa Gunaratna and Vikas Yadav and Zheng Tang and Vijay Srinivasan and Tianyi Zhou and Heng Huang and Hongxia Jin},
102
+ year={2023},
103
+ eprint={2307.08701},
104
+ archivePrefix={arXiv},
105
+ primaryClass={cs.CL}
106
+ }
107
+ ```
108
+
109
+ ```
110
+ @misc {l._junbum_2023,
111
+ author = { {L. Junbum, Taekyoon Choi} },
112
+ title = { llama-2-koen-13b },
113
+ year = 2023,
114
+ url = { https://huggingface.co/beomi/llama-2-koen-13b },
115
+ doi = { 10.57967/hf/1280 },
116
+ publisher = { Hugging Face }
117
+ }
118
+ ```