jujbob commited on
Commit
89e7018
·
verified ·
1 Parent(s): 49510e1

update the model card

Browse files
Files changed (1) hide show
  1. README.md +98 -179
README.md CHANGED
@@ -1,199 +1,118 @@
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
+ license: mit
3
+ language:
4
+ - ko
5
+ - en
6
+ base_model:
7
+ - deepseek-ai/DeepSeek-R1-Distill-Llama-8B
8
  library_name: transformers
 
9
  ---
10
+ # DeepSeek-llama3.1-Bllossom-8B
11
 
12
+ DeepSeek-Bllossom Series는 기존 DeepSeek-R1-Distill Series 모델의 language mixing, 다국어 성능 저하 문제를 해결하기 위해 추가로 학습된 모델입니다.
13
 
14
+ DeepSeek-llama3.1-Bllossom-8B는 DeepSeek-R1-distill-Llama-8B 모델을 베이스로 구축된 모델로, 한국어 환경에서의 추론 성능 향상을 목표로 개발되었습니다.
15
 
16
+ 본 모델은 UNIVA와 Bllossom팀이 합작으로 제작한 첫 번째 모델입니다.
17
 
18
+ <div align="center">
19
 
20
+ | **Model** | **Base Model** | **Download** |
21
+ | :------------: | :------------: | :------------: |
22
+ | DeepSeek-qwen-Bllossom-1.5B | [DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) | 공개예정 |
23
+ | DeepSeek-qwen-Bllossom-7B | [DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B) | 공개예정 |
24
+ | DeepSeek-llama3.1-Bllossom-8B | [DeepSeek-R1-Distill-Llama-8B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B) | [🤗 HuggingFace](https://huggingface.co/UNIVA-Bllossom/DeepSeek-llama3.1-Bllossom-8B) |
25
+ | DeepSeek-qwen-Bllossom-14B | [DeepSeek-R1-Distill-Qwen-14B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B) | 공개예정 |
26
+ | DeepSeek-qwen-Bllossom-32B | [DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) | 공개예정 |
27
+ | DeepSeek-llama3.3-Bllossom-70B | [DeepSeek-R1-Distill-Llama-70B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B) | [🤗 HuggingFace](https://huggingface.co/UNIVA-Bllossom/DeepSeek-llama3.3-Bllossom-70B ) |
28
 
29
+ </div>
30
 
 
31
 
 
32
 
 
 
 
 
 
 
 
33
 
34
+ ## 1. Introduction
35
 
36
+ DeepSeek-llama3.1-Bllossom-8B은 DeepSeek-R1-distill-Llama-8B 모델을 베이스로 구축된 모델로, 기존 베이스 모델이 영어와 중국어 위주의 데이터로 학습된 한계를 극복하고자 개발되었습니다. 특히, 기존 DeepSeek-R1-distill-Llama-8B의 경우 한국어로 추론 시 모델 성능이 크게 하락하는 문제가 있었는데, DeepSeek-Bllossom은 이 문제를 해결하기 위해 내부 사고 과정은 영어로 수행하고 최종 사용자에게 제공되는 응답은 입력 언어에 따라 출력되도록 추가로 학습되었습니다. 이를 통해 한국어 환경에서의 추론 성능이 크게 개선되었습니다.
37
 
38
+ 학습에는 한국어, 영어 reasoning 데이터를 사용하였으며, 기존 DeepSeek-R1 모델 학습에 주로 사용된 STEM 분야 데이터 외에도 다양한 분야의 데이터가 포함되었습니다. 데이터셋 설계와 모델 학습 과정에서 DeepSeek-llama3.1-Bllossom-8B는 한국어 사용 환경에서 더 정확하고 신뢰할 수 있는 추론 결과를 제공하는 것을 주된 목표로 개발되었습니다.
 
 
39
 
40
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ ## 2. Post-training
43
 
44
+ DeepSeek-llama3.1-Bllossom-8B는 자체적으로 제작한 다양한 reasoning 데이터를 활용하여 post-training 과정을 진행하였습니다. 이 과정에서는 대규모 모델이 보유한 우수한 reasoning 능력과 한국어 처리 능력을 DeepSeek-R1-distill-Llama-8B 모델에 효과적으로 distillation하는 방법을 적용하였습니다. 이를 통해 기존 모델의 성능을 보완하고, 복합적인 추론 문제에 대해 더 정확하며 신뢰할 수 있는 응답을 생성할 수 있도록 최적화하였습니다.
45
 
46
+ ---
47
 
48
+ ## 3. inference
49
+
50
+ ```python
51
+ from transformers import AutoModelForCausalLM, AutoTokenizer
52
+ import torch
53
+
54
+ model = AutoModelForCausalLM.from_pretrained(
55
+ "UNIVA-Bllossom/DeepSeek-llama3.1-Bllossom-8B",
56
+ torch_dtype="auto",
57
+ device_map="auto"
58
+ )
59
+ tokenizer = AutoTokenizer.from_pretrained("UNIVA-Bllossom/DeepSeek-llama3.3-Bllossom-70B")
60
+
61
+ system='''
62
+ You are a highly capable assistant. For every user question, follow these instructions exactly:
63
+ 1. First, think through the problem step-by-step in English. Enclose all of your internal reasoning between <think> and </think> tags. This chain-of-thought should detail your reasoning process.
64
+ 2. After the closing </think> tag, provide your final answer.
65
+ 3. Do not include any additional text or commentary outside of this format.
66
+ 4. Your output should strictly follow this structure:
67
+
68
+ <think>
69
+ [Your detailed step-by-step reasoning in English]
70
+ </think>
71
+ [Your final answer]
72
+ '''
73
+
74
+ text="철수, 영희, 민수가 3회의 게임에서 점수를 받았습니다. 영희의 점수는 민수의 점수의 두 배이며, 민수의 점수는 철수의 4배입니다. 철수가 10점을 받았다면 이 3명의 평균 점수를 계산하세요."
75
+ chat = [
76
+ {"role": "system", "content": system},
77
+ {"role": "user", "content": text}
78
+ ]
79
+
80
+ prompt=tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
81
+ model_inputs = tokenizer(
82
+ prompt,
83
+ return_tensors="pt",
84
+ add_special_tokens=True
85
+ )
86
+
87
+ if "token_type_ids" in model_inputs:
88
+ del model_inputs["token_type_ids"]
89
+
90
+ model_inputs = {k: v.to(model.device) for k, v in model_inputs.items()}
91
+
92
+ generated_ids = model.generate(
93
+ **model_inputs,
94
+ max_new_tokens=8192,
95
+ )
96
+
97
+ ```
98
+
99
+ ## 4. 모델 응답 비교
100
+
101
+ | 입력 (Prompt) | DeepSeek-R1-distill-Llama-70B | DeepSeek-llama3.3-Bllossom-70B |
102
+ | ------------- | ----------------------------- | -------------------------- |
103
+ | **Alice, Bob, Charlie가 3회의 게임에서 점수를 받았습니다.<br>Alice의 점수는 Bob의 점수의 두 배이며, Bob의 점수는 Charlie의 4배입니다.<br>Charlie가 10점을 받았다면 이 3명의 평균 점수를 계산하세요.** |<br>Charlie의 점수는 10점입니다.<br>Bob의 점수는 Charlie의 4배이므로, Bob의 점수는 <br>$$<br>4 \\times 10 = 40<br>$$<br>점입니다.<br>Alice의 점수는 Bob의 점수의 두 배이므로, Alice의 점수는 <br>$$<br>2 \\times 40 = 80<br>$$<br>점입니다.<br>세人的 총 점수는 <br>$$<br>10 + 40 + 80 = 130<br>$$<br>점입니다.<br>평균 점수는 <br>$$<br>\\frac{130}{3} \\approx 43.33$점입니다.<br>$$<br>\\boxed{43.33}<br>$$<br>Charlie의 점수는 10점입니다. | <br>Charlie의 점수는 10점으로 주어졌습니다. Bob의 점수는 Charlie의 점수의 4배이며, 이는 다음과 같이 계산됩니다:<br>$$<br>4 \times 10 = 40<br>$$<br>Alice의 점수는 Bob의 점수의 두 배이며, 이는 다음과 같습니다:<br>$$<br>2 \times 40 = 80<br>$$<br>세 사람의 총 점수는 다음과 같습니다:<br>$$<br>10 + 40 + 80 = 130<br>$$<br>이 세 사람의 평균 점수는 총 점수를 사람 수로 나누어 계산됩니다:<br>$$<br>\frac{130}{3}<br>$$<br>따라서, 이 세 사람의 평균 점수는 <br>$$<br>\boxed{\dfrac{130}{3}}<br>$$<br>입니다. |
104
+ | **소수가 무한하다는 사실을 3가지 방법으로 증명하시오.** | <br>以下是用三种方法证明素数无限的详细步骤:<br>### 方法一:欧几里得的反证法<br>1. **假设**:假设素数是有限的,且所有素数为 $ p_1, p_2, p_3, \\ldots, p_n $。<br>2. **构造数**:构造一个新数 $ N = (p_1 \\times p_2 \\times p_3 \\times \\ldots \\times p_n) + 1 $。<br>3. **分析N的性质**:<br> - 如果N是素数,则N不在原假设的素数列表中,与假设矛盾。<br> - 如果N是合数,则存在某个素数 $ p $ 整除N。但由于N除以任何 $ p_i $ 都余1,故 $ p $ 不在原列表中,同样矛盾。<br>4. **结论**:因此,素数必须是无限的。<br>### 方法二:费马数的性质<br>1. **定义**:费马数形如 $ F_k = 2^{2^k} + 1 $,其中 $ k $ 为非负整数。<br>2. **假设**:假设素数是有限的,且所有素数为 $ p_1, p_2, \\ldots, p_n $。<br>3. **构造费马数**:对于每个 $ k $,构造 $ F_k $。如果 $ F_k $ 是素数,则不在原列表中;如果是合数,其素因数不在原列表中。<br>4. **结论**:因此,素数必须是无限的。<br>### 方法三:欧拉函数与素数无限性<br>1. **欧拉函数**:欧拉函数 $ \\phi(n) $ 表示小于 $ n $ 且与 $ n $ 互质的数的个数。<br>2. **假设**:假设素数有限,记为 $ p_1, p_2, \\ldots, p_n $。<br>3. **构造数**:考虑形如 $ N = p_1^{k_1} p_2^{k_2} \\ldots p_n^{k_n} $ 的数,其欧拉函数为 $ \\phi(N) = N \\prod_{i=1}^{n} \\left(1 - \\frac{1}{p_i}\\right) $。<br>4. **分析**:如果素数有限,$ \\prod_{p \\text{素数}} \\left(1 - \\frac{1}{p}\\right) $ 收敛,但实际上该积发散,导致矛盾。<br>5. **结论**:因此,素数必须是无限的。<br>这三种方法各自从不同的角度证明了素数的无限性,展示了数论中素数无限性的深刻性。 | <br>소수가 무한하다는 것을 3가지 방법으로 증명하기 위해, 우리는 다음과 같은 접근 방식을 사용할 수 있습니다:<br>1. **유클리드의 모순 증명**:<br> - **가정**: 소수는 유한한 개수 $ p_1, p_2, \\dots, p_n $이라고 가정합니다.<br> - **구성**: $ P = p_1 \\times p_2 \\times \\dots \\times p_n + 1 $으로 정의합니다.<br> - **결론**: $ P $가 소수이면, 그것은 목록에 없는 새로운 소수입니다. 만약 $ P $가 합성수이면, 그것은 목록에 없는 소수를 포함해야 합니다. 두 경우 모두 가정에 모순됩니다. 따라서, 소수는 무한합니다.<br>2. **팩토리얼 접근법**:<br> - **가정**: 소수는 유한한 개수 $ p_1, p_2, \\dots, p_n $이라고 가정합니다.<br> - **구성**: $ n! + 1 $을 고려하십시오, 여기서 $ n $은 가장 큰 소수입니다.<br> - **결론**: $ n! $은 모든 $ p_i $로 나누어 떨어지므로, $ n! + 1 $은 $ p_i $ 중 어느 것도 포함하지 않습니다. 만약 $ n! + 1 $이 소수이면, 그것은 $ n $보다 큰 새로운 소수입니다. 만약 $ n! + 1 $이 합성수이면, 그것은 $ n $보�� 큰 소수를 포함해야 합니다. 두 경우 모두 가정에 모순됩니다. 따라서, 소수는 무한합니다.<br>3. **오일러의 제타 함수 증명**:<br> - **개념**: 오일러는 제타 함수 $ \\zeta(s) = \\sum_{k=1}^\\infty \\frac{1}{k^s} $가 소수에 대한 곱으로 표현될 수 있음을 보였습니다: $ \\zeta(s) = \\prod_{p \\text{ 소수}} \\frac{1}{1 - \\frac{1}{p^s}} $.<br> - **결론**: 만약 소수가 유한하면, 곱은 유한해야 할 것입니다. 그러나 $ s $가 1보다 큰 값을 향해 접근할 때, $ \\zeta(s) $는 무한대로 발산합니다. 이것은 곱이 발산해야 함을 요구하며, 따라서 소수는 무한해야 합니다.<br>각 방법은 소수가 무한하다는 것을 확증하며, 서로 다른 수학적 원칙에 기반을 둡니다. 유클리드의 증명은 모순을 사용합니다, 팩토리얼 접근법은 간단한 수론을 사용하며, 오일러의 증명은 해석적 수론의 도구를 사용합니다. 세 방법 모두 소수 무한성에 대한 이해를 강화합니다. |
105
+ ## 5. License
106
+
107
+ This code repository and the model weights are licensed under the MIT License.
108
+ DeepSeek-Bllossom series support commercial use, allow for any modifications and derivative works, including, but not limited to, distillation for training other LLMs. Please note that:
109
+ - **DeepSeek-R1-Distill-Llama-70B** is derived from Llama3.3-70B-Instruct and is originally licensed under llama3.3 license.
110
+ - **DeepSeek-llama3.3-Bllossom-70B** is derived from DeepSeek-R1-Distill-Llama-70B and is originally licensed under llama3.3 license.
111
+
112
+ ## 6. Contributor
113
+ - **UNIVA AI Team** ([UNIVA](https://univa.co.kr), Main contributor)
114
+ - 최창수 (서울과학기술대학교, [MLP연구실](https://sites.google.com/view/aailab) 석사과정)
115
+ - **임경태** (KAIST, [MLP연구실](https://sites.google.com/view/aailab) 교수)
116
+
117
+ ## 7. Contact
118
+ If you have any questions, please raise an issue or contact us at [[email protected]]([email protected]) or [[email protected]]([email protected]).