youjunhyeok commited on
Commit
21e8c9e
1 Parent(s): bf47ceb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -194
README.md CHANGED
@@ -1,201 +1,135 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  library_name: transformers
3
  license: apache-2.0
 
4
  tags:
5
  - llama-factory
6
  ---
7
 
8
- # Model Card for Model ID
9
-
10
- <!-- Provide a quick summary of what the model is/does. -->
11
-
12
-
13
-
14
- ## Model Details
15
-
16
- ### Model Description
17
-
18
- <!-- Provide a longer summary of what this model is. -->
19
-
20
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
21
-
22
- - **Developed by:** [More Information Needed]
23
- - **Funded by [optional]:** [More Information Needed]
24
- - **Shared by [optional]:** [More Information Needed]
25
- - **Model type:** [More Information Needed]
26
- - **Language(s) (NLP):** [More Information Needed]
27
- - **License:** [More Information Needed]
28
- - **Finetuned from model [optional]:** [More Information Needed]
29
-
30
- ### Model Sources [optional]
31
-
32
- <!-- Provide the basic links for the model. -->
33
-
34
- - **Repository:** [More Information Needed]
35
- - **Paper [optional]:** [More Information Needed]
36
- - **Demo [optional]:** [More Information Needed]
37
-
38
- ## Uses
39
-
40
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
41
-
42
- ### Direct Use
43
-
44
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
45
-
46
- [More Information Needed]
47
-
48
- ### Downstream Use [optional]
49
-
50
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
51
-
52
- [More Information Needed]
53
-
54
- ### Out-of-Scope Use
55
-
56
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
57
-
58
- [More Information Needed]
59
-
60
- ## Bias, Risks, and Limitations
61
-
62
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
63
-
64
- [More Information Needed]
65
-
66
- ### Recommendations
67
-
68
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
69
-
70
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
71
-
72
- ## How to Get Started with the Model
73
-
74
- Use the code below to get started with the model.
75
-
76
- [More Information Needed]
77
-
78
- ## Training Details
79
-
80
- ### Training Data
81
-
82
- <!-- 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. -->
83
-
84
- [More Information Needed]
85
-
86
- ### Training Procedure
87
-
88
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
89
-
90
- #### Preprocessing [optional]
91
-
92
- [More Information Needed]
93
-
94
-
95
- #### Training Hyperparameters
96
-
97
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
98
-
99
- #### Speeds, Sizes, Times [optional]
100
-
101
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
102
-
103
- [More Information Needed]
104
-
105
- ## Evaluation
106
-
107
- <!-- This section describes the evaluation protocols and provides the results. -->
108
-
109
- ### Testing Data, Factors & Metrics
110
-
111
- #### Testing Data
112
-
113
- <!-- This should link to a Dataset Card if possible. -->
114
-
115
- [More Information Needed]
116
-
117
- #### Factors
118
-
119
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
120
-
121
- [More Information Needed]
122
-
123
- #### Metrics
124
-
125
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
126
-
127
- [More Information Needed]
128
-
129
- ### Results
130
-
131
- [More Information Needed]
132
-
133
- #### Summary
134
-
135
-
136
-
137
- ## Model Examination [optional]
138
-
139
- <!-- Relevant interpretability work for the model goes here -->
140
-
141
- [More Information Needed]
142
-
143
- ## Environmental Impact
144
-
145
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
146
-
147
- 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).
148
-
149
- - **Hardware Type:** [More Information Needed]
150
- - **Hours used:** [More Information Needed]
151
- - **Cloud Provider:** [More Information Needed]
152
- - **Compute Region:** [More Information Needed]
153
- - **Carbon Emitted:** [More Information Needed]
154
-
155
- ## Technical Specifications [optional]
156
-
157
- ### Model Architecture and Objective
158
-
159
- [More Information Needed]
160
-
161
- ### Compute Infrastructure
162
-
163
- [More Information Needed]
164
-
165
- #### Hardware
166
-
167
- [More Information Needed]
168
-
169
- #### Software
170
-
171
- [More Information Needed]
172
-
173
- ## Citation [optional]
174
-
175
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
176
-
177
- **BibTeX:**
178
-
179
- [More Information Needed]
180
-
181
- **APA:**
182
-
183
- [More Information Needed]
184
-
185
- ## Glossary [optional]
186
-
187
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
188
-
189
- [More Information Needed]
190
-
191
- ## More Information [optional]
192
-
193
- [More Information Needed]
194
-
195
- ## Model Card Authors [optional]
196
-
197
- [More Information Needed]
198
-
199
- ## Model Card Contact
200
-
201
- [More Information Needed]
 
1
  ---
2
+ datasets:
3
+ - jojo0217/korean_rlhf_dataset
4
+ - jojo0217/korean_safe_conversation
5
+ - HAERAE-HUB/qarv-instruct-ko
6
+ - HAERAE-HUB/Korean-Human-Judgements
7
+ - HAERAE-HUB/K2-Feedback
8
+ - changpt/ko-lima-vicuna
9
+ - maywell/kiqu_samples
10
+ - CarrotAI/ko-instruction-dataset
11
+ - 4n3mone/vector_bench
12
+ - youjunhyeok/llama3_train
13
+ language:
14
+ - ko
15
  library_name: transformers
16
  license: apache-2.0
17
+ pipeline_tag: text-generation
18
  tags:
19
  - llama-factory
20
  ---
21
 
22
+ ## Model
23
+ - base model: [THUDM/glm-4v-9b](https://huggingface.co/THUDM/glm-4v-9b)
24
+
25
+ ## Dataset
26
+ - [jojo0217/korean_rlhf_dataset](https://huggingface.co/datasets/jojo0217/korean_rlhf_dataset)
27
+ - [jojo0217/korean_safe_conversation](https://huggingface.co/datasets/jojo0217/korean_safe_conversation)
28
+ - [HAERAE-HUB/qarv-instruct-ko](https://huggingface.co/datasets/HAERAE-HUB/qarv-instruct-ko)
29
+ - [HAERAE-HUB/Korean-Human-Judgements](https://huggingface.co/datasets/HAERAE-HUB/Korean-Human-Judgements)
30
+ - [HAERAE-HUB/K2-Feedback](https://huggingface.co/datasets/HAERAE-HUB/K2-Feedback)
31
+ - [changpt/ko-lima-vicuna](https://huggingface.co/datasets/changpt/ko-lima-vicuna)
32
+ - [maywell/kiqu_samples](https://huggingface.co/datasets/maywell/kiqu_samples)
33
+ - [CarrotAI/ko-instruction-dataset](https://huggingface.co/datasets/CarrotAI/ko-instruction-dataset)
34
+ - [4n3mone/vector_bench](https://huggingface.co/datasets/4n3mone/vector_bench)
35
+ - [youjunhyeok/llama3_train](https://huggingface.co/datasets/youjunhyeok/llama3_train)
36
+
37
+ ## Load Model
38
+
39
+ Use the following Python code to load the model:
40
+
41
+ ```python3
42
+ from transformers import AutoTokenizer, AutoModelForCausalLM
43
+
44
+ path = 'youjunhyeok/solar-ko-recovery-11b-chat-v1'
45
+
46
+ model = AutoModelForCausalLM.from_pretrained(path)
47
+ tokenizer = AutoTokenizer.from_pretrained(path)
48
+ model.to('cuda')
49
+ ```
50
+
51
+ ## Chat
52
+
53
+ ```python3
54
+ def chat(message):
55
+ messages = [
56
+ {"role": "system", "content": "당신은 인공지능 어시스턴트입니다. 친절하고 상세한 답변을 해주세요."},
57
+ {"role": "user", "content": message},
58
+ ]
59
+
60
+ input_ids = tokenizer.apply_chat_template(
61
+ messages,
62
+ add_generation_prompt=True,
63
+ tokenize=True,
64
+ return_tensors="pt"
65
+ ).to(model.device)
66
+
67
+ outputs = model.generate(
68
+ input_ids,
69
+ max_new_tokens=1024,
70
+ do_sample=True,
71
+ temperature=0.9,
72
+ top_p=0.95,
73
+ )
74
+ response = outputs[0][input_ids.shape[-1]:]
75
+ print(tokenizer.decode(response, skip_special_tokens=True))
76
+
77
+ chat('태양의 흑점 폭발에 대해 설명해줘.')
78
+
79
+ ```
80
+
81
+ ## Output
82
+
83
+ ```
84
+ 넵! 태양의 흑점 폭발에 대해 설명해드리겠습니다.
85
+ 태양의 흑점 폭발은 태양의 표면에 있는 흑점이 폭발하여 생기는 현상입니다.
86
+ 흑점은 태양의 자기장이 강한 부분으로, 부위의 자기장이 폭발하면서 에너지를 방출하는 것이지요.
87
+ 이 폭발은 태양의 에너지 변화로 이어져 지구에 다양한 영향을 미칠 수 있습니다.
88
+ 예를 들어, 지구의 통신 시스템에 교란을 일으키거나 GPS 등의 장비에 오류가 발생할 수 있습니다.
89
+ 또한, 태양에서 방출된 에너지가 지구에 도달하여 오로라를 발생시키기도 하지요.
90
+ 따라서, 태양의 흑점 폭발은 태양의 활동성과 관련이 깊으며, 태양의 자기장 변화를 연구하는 데에도 중요한 지표가 됩니다.
91
+ 더 궁금하신 점이 있으면 언제든지 말씀해 주세요!
92
+ ```
93
+
94
+
95
+ ## Llama_factory Train Config
96
+ {data_dir}, {dataset_name}, {output_dir} is variable
97
+ ```
98
+ bf16: true
99
+ cutoff_len: 2048
100
+ dataset: k2-feedback,kiqu_samples,ko_lima_vicuna,ko-instruction-data,korean-human-judgements,rlhf_dataset,safe_conversation,qarv-instruct-ko,vector_bench,llama3_train
101
+ dataset_dir: {data_dir}
102
+ ddp_timeout: 180000000
103
+ do_train: true
104
+ eval_steps: 250
105
+ eval_strategy: steps
106
+ finetuning_type: lora
107
+ flash_attn: auto
108
+ gradient_accumulation_steps: 4
109
+ include_num_input_tokens_seen: true
110
+ learning_rate: 1.0e-06
111
+ logging_steps: 5
112
+ lora_alpha: 16
113
+ lora_dropout: 0.05
114
+ lora_rank: 16
115
+ lora_target: all
116
+ lr_scheduler_type: inverse_sqrt
117
+ max_grad_norm: 1.0
118
+ max_samples: 100000
119
+ model_name_or_path: beomi/Solar-Ko-Recovery-11B
120
+ num_train_epochs: 2.0
121
+ optim: adamw_torch
122
+ output_dir: saves/SOLAR-10.7B/lora/solar-ko-recovery-instruct-v2
123
+ packing: false
124
+ per_device_eval_batch_size: 8
125
+ per_device_train_batch_size: 8
126
+ plot_loss: true
127
+ preprocessing_num_workers: 16
128
+ report_to: none
129
+ save_steps: 250
130
+ stage: sft
131
+ template: solar
132
+ val_size: 0.05
133
+ warmup_steps: 250
134
+
135
+ ```