jujbob commited on
Commit
7b297ee
1 Parent(s): 70b4236

first update

Browse files
Files changed (1) hide show
  1. README.md +169 -194
README.md CHANGED
@@ -1,199 +1,174 @@
1
  ---
 
 
 
 
2
  library_name: transformers
3
- tags: []
 
4
  ---
5
 
6
- # Model Card for Model ID
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
+ language:
3
+ - en
4
+ - ko
5
+ license: llama3.1
6
  library_name: transformers
7
+ base_model:
8
+ - meta-llama/Meta-Llama-3.1-8B
9
  ---
10
 
11
+ <a href="https://github.com/MLP-Lab/Bllossom">
12
+ <img src="https://github.com/teddysum/bllossom/blob/main//bllossom_icon.png?raw=true" width="30%" height="30%">
13
+ </a>
14
+
15
+ # Update!
16
+ * [2024.09.04] Bllossom의 시각-언어모델 preview 모델이 최초 업데이트 되었습니다.
17
+
18
+
19
+ # Bllossom | [Demo]() | [Homepage](https://www.bllossom.ai/) | [Github](https://github.com/MLP-Lab/Bllossom) |
20
+
21
+ <!-- [GPU용 Colab 코드예제](https://colab.research.google.com/drive/1fBOzUVZ6NRKk_ugeoTbAOokWKqSN47IG?usp=sharing) | -->
22
+ <!-- [CPU용 Colab 양자화모델 코드예제](https://colab.research.google.com/drive/129ZNVg5R2NPghUEFHKF0BRdxsZxinQcJ?usp=drive_link) -->
23
+
24
+ ```bash
25
+ 저희 Bllossom 팀에서 llama3.1 기반의 한국어-영어 이중 언어모델 Bllossom-405B를 공개합니다.
26
+ 이번 Bllossom3.1-405B는 preview 버전으로 다음과 같은 특징을 보입니다.
27
+ - Llama3.1-405B-Inst 대비 5~10% 한국어 성능이 향상 되었습니다 (single turn 기준).
28
+ - Llama3.1의 영어 성능을 전혀 손상시키지 않은 완전한 Bilingual 모델입니다.
29
+ - 기존 모델 대비 자연스럽고 친절한 한국어 문장을 생성합니다.
30
+ - 인간평가, GPT평가(MT-Bench, LogicKor 9점 등) 결과 GPT4와 유사하거나 약간 낮은 성능을 보여줍니다.
31
 
32
+ 해당 모델은 다음과 같은 협업을 토대로 구축 되었습니다!
33
+ - 서울과기대 MLP연구실의 경량화 사전 학습기법이 적용되었습니다.
34
+ - 테디썸의 정교한 Instruction Tuning과 RAG 기술이 적용되었습니다.
35
+ - HP의 computing 지원이 있었습니다.
36
+ - Common Crawl 재단의 Oscar팀에서 적극적인 데이터 지원이 있었습니다
37
+
38
+ 언제나 그랬듯 해당 모델은 상업적 이용이 가능합니다. A100 6대만 준비되면 Bllossom을 이용해 여러분만의 모델을 만들어보세요 GPT4가 더이상 필요 없습니다.
39
+ GPU자원이 부족하면 A100 3개 혹은 A6000 4개로 양자화 모델을 이용해 보세요. [양자화모델](https://huggingface.co/MLP-KTLim/llama-3.1-Korean-Bllossom-405B-gguf-Q4_K_M)
40
+
41
+ 1. Bllossom-8B는 서울과기대, 테디썸, 연세대 언어자원 연구실의 언어학자와 협업해 만든 실용주의기반 무료 언어모델로 2023년부터 지속적인 업데이트를 통해 관리해 오고있습니다. 많이 활용해주세요 🙂
42
+ 2. 강력한 Advanced-Bllossom 모델, 시각-언어 모델을 보유하고 있습니다! (궁금하신분은 개별 연락주세요!!)
43
+ 3. Bllossom은 NAACL2024, LREC-COLING2024 (구두) 발표되었습니다.
44
+ 4. 좋은 언어모델 계속 업데이트 하겠습니다!! 한국어 강화를위해 공동 연구하실분(특히논문) 언제든 환영합니다!!
45
+ 그리고 소량의 GPU라도 대여 가능한팀은 언제든 연락주세요! 만들고 싶은거 도와드려요.
46
+ ```
47
+
48
+ ```bash
49
+ The Bllossom language model is a Korean-English bilingual language model based on the open-source LLama3.1. It enhances the connection of knowledge between Korean and English. It has the following features:
50
+ - Korean performance improved by 5-10% compared to Llama 3.1-405B-Inst (on Single Turn Eval).
51
+ - A complete bilingual model that does not compromise the English performance of Llama 3.1.
52
+ - Generates more natural and friendly Korean sentences compared to existing models.
53
+ - Human evaluations and GPT evaluations (MT-Bench, LogicKor scoring 9, etc.) show performance similar to or slightly lower than GPT-4.
54
+ ```
55
+
56
+ **This model developed by [MLPLab at Seoultech](http://mlp.seoultech.ac.kr), [Teddysum](http://teddysum.ai/) and [Yonsei Univ](https://sites.google.com/view/hansaemkim/hansaem-kim)**
57
+
58
+ ## Example code
59
+
60
+ ### Colab Tutorial
61
+ - [Inference-Code-Link](https://colab.research.google.com/drive/1fBOzUVZ6NRKk_ugeoTbAOokWKqSN47IG?usp=sharing)
62
+
63
+ ### Install Dependencies
64
+ ```bash
65
+ pip install torch transformers==4.40.0 accelerate
66
+ ```
67
+
68
+ ### Python code with Pipeline
69
+ ```python
70
+ import transformers
71
+ import torch
72
+
73
+ model_id = "Bllossom/llama-3.1-Korean-Bllossom-405B"
74
+
75
+ pipeline = transformers.pipeline(
76
+ "text-generation",
77
+ model=model_id,
78
+ model_kwargs={"torch_dtype": torch.bfloat16},
79
+ device_map="auto",
80
+ )
81
+
82
+ pipeline.model.eval()
83
+
84
+ PROMPT = '''You are a helpful AI assistant. Please answer the user's questions kindly. 당신은 유능한 AI 어시스턴트 입니다. 사용자의 질문에 대해 친절하게 답변해주세요.'''
85
+ instruction = "서울의 유명한 관광 코스를 만들어줄래?"
86
+
87
+ messages = [
88
+ {"role": "system", "content": f"{PROMPT}"},
89
+ {"role": "user", "content": f"{instruction}"}
90
+ ]
91
+
92
+ prompt = pipeline.tokenizer.apply_chat_template(
93
+ messages,
94
+ tokenize=False,
95
+ add_generation_prompt=True
96
+ )
97
+
98
+ terminators = [
99
+ pipeline.tokenizer.eos_token_id,
100
+ pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
101
+ ]
102
+
103
+ outputs = pipeline(
104
+ prompt,
105
+ max_new_tokens=2048,
106
+ eos_token_id=terminators,
107
+ do_sample=True,
108
+ temperature=0.6,
109
+ top_p=0.9
110
+ )
111
+
112
+ print(outputs[0]["generated_text"][len(prompt):])
113
+ ```
114
+ ```
115
+ # 물론이죠! 서울은 다양한 문화와 역사, 자연을 겸비한 도시로, 많은 관광 명소를 자랑합니다. 여기 서울의 유명한 관광 코스를 소개해 드릴게요.
116
+
117
+ ### 코스 1: 역사와 문화 탐방
118
+
119
+ 1. **경복궁**
120
+ - 서울의 대표적인 궁궐로, 조선 왕조의 역사와 문화를 체험할 수 있는 곳입니다.
121
+
122
+ 2. **북촌 한옥마을**
123
+ - 전통 한옥이 보존된 마을로, 조선시대의 생활상을 느낄 있습니다.
124
+
125
+ ...
126
+ ```
127
+
128
+ ## Supported by
129
+
130
+ - Hewlett Packard (HP) Enterprise <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Hewlett_Packard_Enterprise_logo.svg/2880px-Hewlett_Packard_Enterprise_logo.svg.png" width="20%" height="20%">
131
+ - Common Crawl <img src="https://cdn.prod.website-files.com/6479b8d98bf5dcb4a69c4f31/649b5869af56f6df617cfb1f_CC_Logo_Blue_Auto.svg" width="20%" height="20%">
132
+ - AICA
133
+
134
+ ## Citation
135
+ **Language Model**
136
+ ```text
137
+ @misc{bllossom,
138
+ 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},
139
+ title = {Optimizing Language Augmentation for Multilingual Large Language Models: A Case Study on Korean},
140
+ year = {2024},
141
+ journal = {LREC-COLING 2024},
142
+ paperLink = {\url{https://arxiv.org/pdf/2403.10882}},
143
+ },
144
+ }
145
+ ```
146
+
147
+ **Vision-Language Model**
148
+ ```text
149
+ @misc{bllossom-V,
150
+ author = {Dongjae Shin, Hyunseok Lim, Inho Won, Changsu Choi, Minjun Kim, Seungwoo Song, Hangyeol Yoo, Sangmin Kim, Kyungtae Lim},
151
+ title = {X-LLaVA: Optimizing Bilingual Large Vision-Language Alignment},
152
+ year = {2024},
153
+ publisher = {GitHub},
154
+ journal = {NAACL 2024 findings},
155
+ paperLink = {\url{https://arxiv.org/pdf/2403.11399}},
156
+ },
157
+ }
158
+ ```
159
+
160
+ ## Contact
161
+ - 임경태(KyungTae Lim), Professor at Seoultech. `[email protected]`
162
+ - 함영균(Younggyun Hahm), CEO of Teddysum. `[email protected]`
163
+ - 김한샘(Hansaem Kim), Professor at Yonsei. `[email protected]`
164
+
165
+ ## Contributor
166
+ - **신동재(Dongjae Shin)**, [email protected]
167
+ - **임현석(Hyeonseok Lim)**, gustjrantk@seoultech.ac.kr
168
+ - 원인호(Inho Won), [email protected]
169
+ - 김민준(Minjun Kim), mjkmain@seoultech.ac.kr
170
+ - 유한결(Hangyeol Yoo), [email protected]
171
+ - 송승우(Seungwoo Song), [email protected]
172
+ - 육정훈(Jeonghun Yuk), [email protected]
173
+ - 최창수(Chansu Choi), [email protected]
174
+ - 송서현(Seohyun Song), [email protected]