RichardErkhov commited on
Commit
21ca407
·
verified ·
1 Parent(s): 2d7153c

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +168 -0
README.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Llama-3-Alpha-Ko-8B-Instruct - GGUF
11
+ - Model creator: https://huggingface.co/allganize/
12
+ - Original model: https://huggingface.co/allganize/Llama-3-Alpha-Ko-8B-Instruct/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q2_K.gguf) | Q2_K | 2.96GB |
18
+ | [Llama-3-Alpha-Ko-8B-Instruct.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.IQ3_XS.gguf) | IQ3_XS | 3.28GB |
19
+ | [Llama-3-Alpha-Ko-8B-Instruct.IQ3_S.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.IQ3_S.gguf) | IQ3_S | 3.43GB |
20
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q3_K_S.gguf) | Q3_K_S | 3.41GB |
21
+ | [Llama-3-Alpha-Ko-8B-Instruct.IQ3_M.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.IQ3_M.gguf) | IQ3_M | 3.52GB |
22
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q3_K.gguf) | Q3_K | 3.74GB |
23
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q3_K_M.gguf) | Q3_K_M | 3.74GB |
24
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q3_K_L.gguf) | Q3_K_L | 4.03GB |
25
+ | [Llama-3-Alpha-Ko-8B-Instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.IQ4_XS.gguf) | IQ4_XS | 4.18GB |
26
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q4_0.gguf) | Q4_0 | 4.34GB |
27
+ | [Llama-3-Alpha-Ko-8B-Instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.IQ4_NL.gguf) | IQ4_NL | 4.38GB |
28
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q4_K_S.gguf) | Q4_K_S | 4.37GB |
29
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q4_K.gguf) | Q4_K | 4.58GB |
30
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q4_K_M.gguf) | Q4_K_M | 4.58GB |
31
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q4_1.gguf) | Q4_1 | 4.78GB |
32
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q5_0.gguf) | Q5_0 | 5.21GB |
33
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q5_K_S.gguf) | Q5_K_S | 5.21GB |
34
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q5_K.gguf) | Q5_K | 5.34GB |
35
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q5_K_M.gguf) | Q5_K_M | 5.34GB |
36
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q5_1.gguf) | Q5_1 | 5.65GB |
37
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q6_K.gguf) | Q6_K | 6.14GB |
38
+ | [Llama-3-Alpha-Ko-8B-Instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/allganize_-_Llama-3-Alpha-Ko-8B-Instruct-gguf/blob/main/Llama-3-Alpha-Ko-8B-Instruct.Q8_0.gguf) | Q8_0 | 7.95GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ license: other
46
+ license_name: llama3
47
+ language:
48
+ - ko
49
+ ---
50
+ ![Alpha-Instruct](./alpha-instruct.png)
51
+ We are thrilled to introduce **Alpha-Instruct**, our latest language model, which demonstrates exceptional capabilities in both Korean and English. Alpha-Instruct is developed using the **Evolutionary Model Merging** technique, enabling it to excel in complex language tasks and logical reasoning.
52
+
53
+ A key aspect of Alpha-Instruct's development is our **community-based approach**. We draw inspiration and ideas from various communities, shaping our datasets, methodologies, and the model itself. In return, we are committed to sharing our insights with the community, providing detailed information on the data, methods, and models used in Alpha-Instruct's creation.
54
+
55
+ Alpha-Instruct has achieved outstanding performance on the **LogicKor, scoring an impressive 6.62**. Remarkably, this performance rivals that of 70B models, showcasing the efficiency and power of our 8B model. This achievement highlights Alpha-Instruct's advanced computational and reasoning skills, making it a leading choice for diverse and demanding language tasks.
56
+
57
+ **For more information and technical details about Alpha-Instruct, stay tuned to our updates and visit our [website](https://allganize-alpha.github.io/) (Soon).**
58
+
59
+ ---
60
+ ## Overview
61
+ Alpha-Instruct is our latest language model, developed using 'Evolutionary Model Merging' technique. This method employs a 1:1 ratio of task-specific datasets from KoBEST and Haerae, resulting in a model with named 'Alpha-Ko-8B-Evo'. The following models were used for merging:
62
+ - [Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) (Base)
63
+ - [Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) (Instruct)
64
+ - [Llama-3-Open-Ko-8B](beomi/Llama-3-Open-Ko-8B) (Continual Pretrained)
65
+
66
+ To refine and enhance Alpha-Instruct, we utilized a carefully curated high-quality datasets aimed at 'healing' the model's output, significantly boosting its human preference scores. We use [ORPO](https://arxiv.org/abs/2403.07691) specifically for this "healing" (RLHF) phase. The datasets* used include:
67
+ - [Korean-Human-Judgements](https://huggingface.co/datasets/HAERAE-HUB/Korean-Human-Judgements)
68
+ - [Orca-Math](https://huggingface.co/datasets/kuotient/orca-math-word-problems-193k-korean)
69
+ - [dpo-mix-7k](https://huggingface.co/datasets/argilla/dpo-mix-7k)
70
+
71
+ *Some of these datasets were partially used and translated for training, and we ensured there was no contamination during the evaluation process.
72
+
73
+ This approach effectively balances human preferences with the model's capabilities, making Alpha-Instruct well-suited for real-life scenarios where user satisfaction and performance are equally important.
74
+
75
+ ## Benchmark Results
76
+ Results in [LogicKor](https://github.com/StableFluffy/LogicKor)* are as follows:
77
+
78
+ | Model | Single turn* | Multi turn* | Overall* |
79
+ |:------------------------------:|:------------:|:-----------:|:--------:|
80
+ | MLP-KTLim/llama-3-Korean-Bllossom-8B | 4.238 | 3.404 | 3.821 |
81
+ | Alpha-Ko-Evo | 5.143 | 5.238 | 5.190 |
82
+ | Alpha-Ko-Instruct (alt) | 7.095 | **6.571** | **6.833** |
83
+ | Alpha-Ko-Instruct | **7.143** | 6.065 | 6.620 |
84
+ | Alpha-Ko-Instruct-marlin (4bit) | 6.857 | 5.738 | 6.298 |
85
+
86
+ *Self report(Default settings with 'alpha' template, mean of 3).
87
+
88
+ Result in KoBEST(acc, num_shot=5) are as follows:
89
+
90
+ | Task | beomi/Llama-3-Open-Ko-8B-Instruct | maywell/Llama-3-Ko-8B-Instruct | **Alpha-Ko-Evo** | **Alpha-Ko-Instruct** |
91
+ | --- | --- | --- | --- | --- |
92
+ | kobest overall | 0.6220 | 0.6852 |0.7229|0.7055
93
+ | kobest_boolq| 0.6254 | 0.7208 | 0.8547 | 0.8369
94
+ | kobest_copa| 0.7110 | 0.7650 | 0.7420 | 0.7420
95
+ | kobest_hellaswag| 0.3840 | 0.4440 | 0.4220 | 0.4240
96
+ | kobest_sentineg| 0.8388 | 0.9194 |0.9471 | 0.9244
97
+ | kobest_wic| 0.5738| 0.6040 |0.6095 | 0.5730
98
+
99
+ *For reference, 'merged' models are chosen.
100
+
101
+ ## How to use
102
+
103
+ ```python
104
+ from transformers import AutoTokenizer, AutoModelForCausalLM
105
+ import torch
106
+
107
+ model_id = "allganize/Llama-3-Alpha-Ko-Instruct"
108
+
109
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
110
+ model = AutoModelForCausalLM.from_pretrained(
111
+ model_id,
112
+ torch_dtype="auto",
113
+ device_map="auto",
114
+ )
115
+
116
+ messages = [
117
+ {"role": "system", "content": "당신은 인공지능 어시스턴트입니다. 묻는 말에 친절하고 정확하게 답변하세요."},
118
+ {"role": "user", "content": "피보나치 수열이 뭐야? 그리고 피보나치 수열에 대해 파이썬 코드를 짜줘볼래?"},
119
+ ]
120
+
121
+ input_ids = tokenizer.apply_chat_template(
122
+ messages,
123
+ add_generation_prompt=True,
124
+ return_tensors="pt"
125
+ ).to(model.device)
126
+
127
+ terminators = [
128
+ tokenizer.eos_token_id,
129
+ tokenizer.convert_tokens_to_ids("<|eot_id|>")
130
+ ]
131
+
132
+ outputs = model.generate(
133
+ input_ids,
134
+ max_new_tokens=512,
135
+ eos_token_id=terminators,
136
+ do_sample=False,
137
+ repetition_penalty=1.05,
138
+ )
139
+ response = outputs[0][input_ids.shape[-1]:]
140
+ print(tokenizer.decode(response, skip_special_tokens=True))
141
+ ```
142
+
143
+ ## Correspondence to
144
+ - Ji soo Kim ([email protected])
145
+ - Contributors
146
+ - Sangmin Jeon ([email protected])
147
+ - Seungwoo Ryu ([email protected])
148
+
149
+ ## Special Thanks
150
+ - [@beomi](https://huggingface.co/beomi) for providing us with a great model!
151
+
152
+ ## License
153
+ The use of this model is governed by the [META LLAMA 3 COMMUNITY LICENSE AGREEMENT](https://llama.meta.com/llama3/license/)
154
+
155
+
156
+ ## Citation
157
+ If you use this model in your research, please cite it as follows:
158
+
159
+ ```bibtex
160
+ @misc{alpha-instruct,
161
+ author = {Ji soo Kim},
162
+ title = {Alpha-Instruct: Allganize Bilingual Model},
163
+ year = {2024},
164
+ publisher = {Hugging Face},
165
+ journal = {Hugging Face repository},
166
+ url = {https://huggingface.co/allganize/Llama-3-Alpha-Ko-8B-Instruct},
167
+ }
168
+