Update README.md
Browse files
README.md
CHANGED
@@ -1,55 +1,135 @@
|
|
1 |
---
|
2 |
-
base_model:
|
|
|
3 |
language:
|
4 |
- en
|
5 |
- ko
|
6 |
library_name: transformers
|
7 |
license: llama3.2
|
8 |
-
tags:
|
9 |
-
- llama-cpp
|
10 |
-
- gguf-my-repo
|
11 |
---
|
12 |
|
13 |
-
# PerRing/llama-3.2-Korean-Bllossom-3B-Q4_K_M-GGUF
|
14 |
-
This model was converted to GGUF format from [`Bllossom/llama-3.2-Korean-Bllossom-3B`](https://huggingface.co/Bllossom/llama-3.2-Korean-Bllossom-3B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
15 |
-
Refer to the [original model card](https://huggingface.co/Bllossom/llama-3.2-Korean-Bllossom-3B) for more details on the model.
|
16 |
|
17 |
-
|
18 |
-
|
|
|
19 |
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
```
|
24 |
-
Invoke the llama.cpp server or the CLI.
|
25 |
|
26 |
-
### CLI:
|
27 |
-
```bash
|
28 |
-
llama-cli --hf-repo PerRing/llama-3.2-Korean-Bllossom-3B-Q4_K_M-GGUF --hf-file llama-3.2-korean-bllossom-3b-q4_k_m.gguf -p "The meaning to life and the universe is"
|
29 |
-
```
|
30 |
|
31 |
-
|
|
|
32 |
```bash
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
git clone https://github.com/ggerganov/llama.cpp
|
41 |
```
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
```
|
45 |
-
cd llama.cpp && LLAMA_CURL=1 make
|
46 |
```
|
|
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
51 |
```
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
```
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model:
|
3 |
+
- meta-llama/Meta-Llama-3.2-3B
|
4 |
language:
|
5 |
- en
|
6 |
- ko
|
7 |
library_name: transformers
|
8 |
license: llama3.2
|
|
|
|
|
|
|
9 |
---
|
10 |
|
|
|
|
|
|
|
11 |
|
12 |
+
<a href="https://github.com/MLP-Lab/Bllossom">
|
13 |
+
<img src="https://github.com/teddysum/bllossom/blob/main//bllossom_icon.png?raw=true" width="30%" height="30%">
|
14 |
+
</a>
|
15 |
|
16 |
+
# Update!
|
17 |
+
* [2024.10.08] Bllossom-3B λͺ¨λΈμ΄ μ΅μ΄ μ
λ°μ΄νΈ λμμ΅λλ€.
|
18 |
|
|
|
|
|
19 |
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
# Bllossom | [Demo]() | [Homepage](https://www.bllossom.ai/) | [Github](https://github.com/MLP-Lab/Bllossom) |
|
22 |
+
|
23 |
```bash
|
24 |
+
μ ν¬ Bllossom νμμ Bllossom-3B λͺ¨λΈμ 곡κ°ν©λλ€.
|
25 |
+
llama3.2-3Bκ° λμλλ° νκ΅μ΄κ° ν¬ν¨ μλμλ€κ΅¬?? μ΄λ² Bllossom-3Bλ νκ΅μ΄κ° μ§μλμ§ μλ κΈ°λ³Έ λͺ¨λΈμ νκ΅μ΄-μμ΄λ‘ κ°νλͺ¨λΈμ
λλ€.
|
26 |
+
- 100% full-tuningμΌλ‘ 150GBμ μ μ λ νκ΅μ΄λ‘ μΆκ° μ¬μ νμ΅ λμμ΅λλ€. (GPUλ§μ΄ νμ μ΅λλ€)
|
27 |
+
- κ΅μ₯ν μ μ λ Instruction Tuningμ μ§ννμ΅λλ€.
|
28 |
+
- μμ΄ μ±λ₯μ μ ν μμμν€μ§ μμ μμ ν Bilingual λͺ¨λΈμ
λλ€.
|
29 |
+
- LogicKor κΈ°μ€ 5Bμ΄ν μ΅κ³ μ μλ₯Ό κΈ°λ‘νκ³ 6μ μ΄λ°λ μ μλ₯Ό 보μ
λλ€.
|
30 |
+
- Instruction tuningλ§ μ§ννμ΅λλ€. DPO λ± μ±λ₯ μ¬λ¦΄ λ°©λ²μΌλ‘ νλν΄λ³΄μΈμ.
|
31 |
+
- MT-Bench, LogicKor λ± λ²€μΉλ§ν¬ μ μλ₯Ό μλ°κΈ° μν΄ μ λ΅λ°μ΄ν°λ₯Ό νμ©νκ±°λ νΉμ λ²€μΉλ§ν¬λ₯Ό νκ²ν
ν΄μ νμ΅νμ§ μμμ΅λλ€. (ν΄λΉ λ²€μΉλ§ν¬ νκ²ν
ν΄μ νμ΅νλ©΄ 8μ λ λμ΅λλ€...)
|
32 |
|
33 |
+
μΈμ λ κ·Έλ¬λ― ν΄λΉ λͺ¨λΈμ μμ
μ μ΄μ©μ΄ κ°λ₯ν©λλ€.
|
34 |
|
35 |
+
1. Bllossomμ AAAI2024, NAACL2024, LREC-COLING2024 (ꡬλ) λ°νλμμ΅λλ€.
|
36 |
+
2. μ’μ μΈμ΄λͺ¨λΈ κ³μ μ
λ°μ΄νΈ νκ² μ΅λλ€!! νκ΅μ΄ κ°νλ₯Όμν΄ κ³΅λ μ°κ΅¬νμ€λΆ(νΉνλ
Όλ¬Έ) μΈμ λ νμν©λλ€!!
|
|
|
37 |
```
|
38 |
|
39 |
+
|
40 |
+
|
41 |
+
```python
|
42 |
+
import torch
|
43 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
44 |
+
|
45 |
+
model_id = 'Bllossom/llama-3.2-Korean-Bllossom-3B'
|
46 |
+
|
47 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
48 |
+
model = AutoModelForCausalLM.from_pretrained(
|
49 |
+
model_id,
|
50 |
+
torch_dtype=torch.bfloat16,
|
51 |
+
device_map="auto",
|
52 |
+
)
|
53 |
+
instruction = "μ² μκ° 20κ°μ μ°νμ κ°μ§κ³ μμλλ° μν¬κ° μ λ°μ κ°μ Έκ°κ³ λ―Όμκ° λ¨μ 5κ°λ₯Ό κ°μ Έκ°μΌλ©΄ μ² μμκ² λ¨μ μ°νμ κ°―μλ λͺκ°μΈκ°μ?"
|
54 |
+
|
55 |
+
messages = [
|
56 |
+
{"role": "user", "content": f"{instruction}"}
|
57 |
+
]
|
58 |
+
|
59 |
+
input_ids = tokenizer.apply_chat_template(
|
60 |
+
messages,
|
61 |
+
add_generation_prompt=True,
|
62 |
+
return_tensors="pt"
|
63 |
+
).to(model.device)
|
64 |
+
|
65 |
+
terminators = [
|
66 |
+
tokenizer.convert_tokens_to_ids("<|end_of_text|>"),
|
67 |
+
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
68 |
+
]
|
69 |
+
|
70 |
+
outputs = model.generate(
|
71 |
+
input_ids,
|
72 |
+
max_new_tokens=1024,
|
73 |
+
eos_token_id=terminators,
|
74 |
+
do_sample=True,
|
75 |
+
temperature=0.6,
|
76 |
+
top_p=0.9
|
77 |
+
)
|
78 |
+
|
79 |
+
print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True))
|
80 |
```
|
|
|
81 |
```
|
82 |
+
μ² μκ° 20κ°μ μ°νμ κ°μ§κ³ μμκ³ μν¬κ° μ λ°μ κ°μ Έκ°λ©΄, μν¬κ° κ°μ Έκ° μ°νμ κ°―μλ 20 / 2 = 10κ°μ
λλ€.
|
83 |
|
84 |
+
μ΄μ μ² μκ° λ¨μ μ°νμ κ°―μλ₯Ό κ³μ°ν΄λ³΄κ² μ΅λλ€. μν¬κ° 10κ°λ₯Ό κ°μ Έκ° ν μ² μκ° λ¨μ μ°νμ κ°―μλ 20 - 10 = 10κ°μ
λλ€.
|
85 |
+
|
86 |
+
λ―Όμκ° λ¨μ 5κ°λ₯Ό κ°μ Έκ°μΌλ―λ‘, μ² μκ° λ¨μ μ°νμ κ°―μλ 10 - 5 = 5κ°μ
λλ€.
|
87 |
+
|
88 |
+
λ°λΌμ μ² μκ° λ¨μ μ°νμ κ°―μλ 5κ°μ
λλ€.
|
89 |
```
|
90 |
+
|
91 |
+
## Supported by
|
92 |
+
|
93 |
+
- AICA <img src="https://aica-gj.kr/images/logo.png" width="20%" height="20%">
|
94 |
+
|
95 |
+
## Citation
|
96 |
+
**Language Model**
|
97 |
+
```text
|
98 |
+
@misc{bllossom,
|
99 |
+
author = {ChangSu Choi, Yongbin Jeong, Seoyoon Park, InHo Won, HyeonSeok Lim, SangMin Kim, Yejee Kang, Chanhyuk Yoon, Jaewan Park, Yiseul Lee, HyeJin Lee, Younggyun Hahm, Hansaem Kim, KyungTae Lim},
|
100 |
+
title = {Optimizing Language Augmentation for Multilingual Large Language Models: A Case Study on Korean},
|
101 |
+
year = {2024},
|
102 |
+
journal = {LREC-COLING 2024},
|
103 |
+
paperLink = {\url{https://arxiv.org/pdf/2403.10882}},
|
104 |
+
},
|
105 |
+
}
|
106 |
```
|
107 |
+
|
108 |
+
**Vision-Language Model**
|
109 |
+
```text
|
110 |
+
@misc{bllossom-V,
|
111 |
+
author = {Dongjae Shin, Hyunseok Lim, Inho Won, Changsu Choi, Minjun Kim, Seungwoo Song, Hangyeol Yoo, Sangmin Kim, Kyungtae Lim},
|
112 |
+
title = {X-LLaVA: Optimizing Bilingual Large Vision-Language Alignment},
|
113 |
+
year = {2024},
|
114 |
+
publisher = {GitHub},
|
115 |
+
journal = {NAACL 2024 findings},
|
116 |
+
paperLink = {\url{https://arxiv.org/pdf/2403.11399}},
|
117 |
+
},
|
118 |
+
}
|
119 |
```
|
120 |
+
|
121 |
+
## Contact
|
122 |
+
- μκ²½ν(KyungTae Lim), Professor at Seoultech. `[email protected]`
|
123 |
+
- ν¨μκ· (Younggyun Hahm), CEO of Teddysum. `[email protected]`
|
124 |
+
- κΉνμ(Hansaem Kim), Professor at Yonsei. `[email protected]`
|
125 |
+
|
126 |
+
## Contributor
|
127 |
+
- **μ νκ²°(Hangyeol Yoo)**, [email protected]
|
128 |
+
- μ λμ¬(Dongjae Shin), [email protected]
|
129 |
+
- μνμ(Hyeonseok Lim), [email protected]
|
130 |
+
- μμΈνΈ(Inho Won), [email protected]
|
131 |
+
- κΉλ―Όμ€(Minjun Kim), [email protected]
|
132 |
+
- μ‘μΉμ°(Seungwoo Song), [email protected]
|
133 |
+
- μ‘μ ν(Jeonghun Yuk), [email protected]
|
134 |
+
- μ΅μ°½μ(Chansu Choi), [email protected]
|
135 |
+
- μ‘μν(Seohyun Song), [email protected]
|