PerRing commited on
Commit
85cd7bf
β€’
1 Parent(s): 1f92781

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -31
README.md CHANGED
@@ -1,55 +1,135 @@
1
  ---
2
- base_model: Bllossom/llama-3.2-Korean-Bllossom-3B
 
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
- ## Use with llama.cpp
18
- Install llama.cpp through brew (works on Mac and Linux)
 
19
 
20
- ```bash
21
- brew install llama.cpp
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
- ### Server:
 
32
  ```bash
33
- llama-server --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 -c 2048
34
- ```
 
 
 
 
 
 
35
 
36
- Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
37
 
38
- Step 1: Clone llama.cpp from GitHub.
39
- ```
40
- git clone https://github.com/ggerganov/llama.cpp
41
  ```
42
 
43
- Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  ```
45
- cd llama.cpp && LLAMA_CURL=1 make
46
  ```
 
47
 
48
- Step 3: Run inference through the main binary.
49
- ```
50
- ./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"
 
 
51
  ```
52
- or
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ```
54
- ./llama-server --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 -c 2048
 
 
 
 
 
 
 
 
 
 
 
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]