Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,191 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
|
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
11 |
|
12 |
-
##
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
|
20 |
-
-
|
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 |
-
|
31 |
|
32 |
-
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
|
|
|
|
|
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
### Downstream Use [optional]
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
|
|
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
-
|
|
|
|
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
|
|
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
|
|
|
|
77 |
|
78 |
-
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
-
|
|
|
|
|
|
|
87 |
|
88 |
-
|
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: apache-2.0
|
3 |
+
base_model:
|
4 |
+
- mistralai/Mistral-Nemo-Base-2407
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
- ko
|
8 |
+
- ja
|
9 |
+
- zh
|
10 |
+
datasets:
|
11 |
+
- 4DR1455/finance_questions
|
12 |
+
- Aratako/Synthetic-JP-Conversations-Magpie-Nemotron-4-10k
|
13 |
+
- Aratako/Synthetic-JP-EN-Coding-Dataset-Magpie-69k
|
14 |
+
- Aratako/Synthetic-Japanese-Roleplay-NSFW-Claude-3.5s-10.5k-formatted
|
15 |
+
- BCCard/BCCard-Finance-Kor-QnA
|
16 |
+
- CarrotAI/ko-code-alpaca-QA
|
17 |
+
- ChuGyouk/AI_healthcare_QA_samples_Sonnet3.5
|
18 |
+
- DavidLanz/medical_instruction
|
19 |
+
- Dusker/lawyer-llama
|
20 |
+
- Gryphe/Sonnet3.5-Charcard-Roleplay
|
21 |
+
- HAERAE-HUB/qarv-instruct-ko
|
22 |
+
- HachiML/alpaca_jp_math
|
23 |
+
- Magpie-Align/Magpie-Llama-3.1-Pro-MT-300K-v0.1
|
24 |
+
- Magpie-Align/Magpie-Qwen2-Pro-200K-Chinese
|
25 |
+
- beomi/KoAlpaca-v1.1a
|
26 |
+
- codefuse-ai/Evol-instruction-66k
|
27 |
+
- frankminors123/belle-math-zh
|
28 |
+
- gbharti/wealth-alpaca_lora
|
29 |
+
- iam-ajaymeena/Self-Instruct-Japanese-Elzya-13B
|
30 |
+
- jihye-moon/LawQA-Ko
|
31 |
+
- jondurbin/gutenberg-dpo-v0.1
|
32 |
+
- junyeong-nero/kin_med_100K_edited
|
33 |
+
- kyujinpy/KOR-OpenOrca-Platypus-v3
|
34 |
+
- lavita/medical-qa-datasets
|
35 |
+
- microsoft/orca-math-word-problems-200k
|
36 |
+
- neural-bridge/rag-dataset-12000
|
37 |
+
- p1atdev/ichikara-instruction
|
38 |
+
- qiaojin/PubMedQA
|
39 |
+
- shibing624/roleplay-zh-sharegpt-gpt4-data
|
40 |
+
- team-hatakeyama-phase2/AutoMultiTurnByCalm3-22B-Corrected-reformatted
|
41 |
+
- ymoslem/Law-StackExchange
|
42 |
+
- zzunyang/LawQA_LawSee
|
43 |
---
|
44 |
+
# Mistral-Nemo-NT-Ko-12B-sft
|
45 |
|
46 |
+
## Description
|
47 |
|
48 |
+
**Mistral-Nemo-NT-Ko-12B-sft** is an instruction-tuned version of [*mistralai/Mistral-Nemo-Base-2407*](https://huggingface.co/mistralai/Mistral-Nemo-Base-2407), fine-tuned across four languages: English, Korean, Chinese, and Japanese.
|
49 |
|
50 |
+
The primary goals of this model are **language alignment** and **ChatML formatting**. This is an intermediate version since preference optimization has not yet been applied.
|
51 |
|
52 |
|
53 |
+
## Features
|
54 |
|
55 |
+
- The base model supports a context length of 128K, while I fine-tuned this model with an 8K context size.
|
56 |
|
57 |
+
- The model follows to the input language unless the user explicitly specifies an output language (If the language is set by a system role, it may be ignored).
|
58 |
|
59 |
+
- Answer length tends to vary by language: English responses are generally longer than average, while Korean responses tend to be shorter. The behavior for Japanese and Chinese is still under observation.
|
60 |
|
61 |
+
- Recommended temperature settings: 0.3 to 0.7.
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
|
|
63 |
|
64 |
+
# Evaluation
|
65 |
|
66 |
+
## LogicKor
|
|
|
|
|
67 |
|
68 |
+
| 모델 | 방법 | 추론 | 수학 | 글쓰기 | 코딩 | 이해 | 문법 | 싱글턴 | 멀티턴 | 총점 |
|
69 |
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
70 |
+
|Mistral-Nemo-NT-Ko-12B-sft| cot-1-shot | 6.57 | 7.36 | 8.57 | 8.71 | 9.57 | 6.43 | 7.81 | 7.93 |**7.87**|
|
71 |
+
|Mistral-Nemo-NT-Ko-12B-sft| 1-shot | 8.29 | 5.71 | 7.93 | 9.00 | 7.93 | 5.21 | 7.29 | 7.40 |7.35|
|
72 |
+
| Mistral Nemo | 1-shot | 5.00, | 6.50 | 6.86 | 8.07 | 7.64 | 8.43 | 7.60 | 6.57 |7.08|
|
73 |
+
|Mistral-Nemo-NT-Ko-12B-sft| default | 4.93 | 6.00 | 7.14 | 5.43 | 9.71 | 4.00 | 6.45 | 5.95 |6.20|
|
74 |
+
| Mistral Nemo | cot-1-shot | 5.43, | 6.86 | 6.07 | 7.57 | 5.86 | 7.57 | 7.50 | 5.62 |6.56|
|
75 |
+
| Mistral Nemo | default | 0.43, | 7.64 | 6.21 | 7.14 | 6.79 | 7.21 | 6.26 | 5.55 |5.90|
|
76 |
|
77 |
+
## MT-Bench
|
78 |
|
79 |
+
| Model | First | Second | Average |
|
80 |
+
| --- | --- | --- | --- |
|
81 |
+
|Mistral-Nemo-NT-Ko-12B-sft| 8.39 | 7.99 | 8.19 |
|
82 |
+
\* ```judge-model: GPT-4```
|
83 |
|
84 |
+
## Language-Confusion(Korean Only)
|
85 |
|
86 |
+
| Model | Monolingual-LPR | Monolingual-WPR | Crosslingual-LPR | Crosslingual-WPR |
|
87 |
+
| --- | --- | --- | --- | --- |
|
88 |
+
|Mistral-Nemo-NT-Ko-12B-sft| 100.00% | 99.00% | 87.51% | 96.96% |
|
89 |
+
|Mistral-Nemo-Instruct-2407 | 90.72% | 93.18% | 46.75% | 92.84% |
|
90 |
+
|Meta-Llama-3.1-8B-Instruct | 99.00% | 96.97% | 91.45% | 93.01% |
|
91 |
+
|gemma-2-9b-it | 100.00% | 98.00% | 87.93% | 95.58% |
|
92 |
|
|
|
93 |
|
94 |
+
example:
|
95 |
|
96 |
+
```
|
97 |
+
<|im_start|>system
|
98 |
+
You are a helpful AI assistant.<|im_end|>
|
99 |
+
<|im_start|>user
|
100 |
+
{prompt}<|im_end|>
|
101 |
+
<|im_start|>assistant
|
102 |
+
```
|
103 |
|
104 |
+
*I trained Mistral-Nemo-NineTail with various system prompt from dozens of dataset. You can chat with/without your system prompt.*
|
105 |
|
|
|
106 |
|
107 |
+
# Dataset
|
108 |
|
109 |
+
[werty1248/multilingual-instruct-balanced](https://huggingface.co/datasets/werty1248/multilingual-instruct-balanced)
|
110 |
|
111 |
+
# Training Details
|
112 |
|
113 |
+
- GPU: 8xA40
|
114 |
+
- epoch: 3
|
115 |
+
- total batch size: 8
|
116 |
+
- learning rate: 7e-6
|
117 |
+
- weight decay: 0.01
|
118 |
|
119 |
+
[<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
|
120 |
+
<details><summary>See axolotl config</summary>
|
121 |
|
122 |
+
axolotl version: `0.4.1`
|
123 |
+
```yaml
|
124 |
+
base_model: mistralai/Mistral-Nemo-Base-2407
|
125 |
+
model_type: MistralForCausalLM
|
126 |
+
tokenizer_config: nothingiisreal/MN-12B-Celeste-V1.9 ##axolotl-ai-co/Mistral-Nemo-Base-2407-chatml makes error, why?
|
127 |
+
tokenizer_type: AutoTokenizer
|
128 |
|
129 |
+
load_in_8bit: false
|
130 |
+
load_in_4bit: false
|
131 |
+
strict: false
|
132 |
|
133 |
+
chat_template: chatml
|
134 |
+
datasets:
|
135 |
+
- path: werty1248/multilingual-instruct-balanced
|
136 |
+
type: sharegpt
|
137 |
+
chat_template: chatml
|
138 |
|
139 |
+
dataset_prepared_path: ./data_preparation
|
140 |
+
output_dir: /workspace/data
|
141 |
|
142 |
+
hf_use_auth_token: true
|
143 |
|
144 |
+
sequence_len: 8192
|
145 |
+
sample_packing: true
|
146 |
+
pad_to_sequence_len: true
|
147 |
|
148 |
+
wandb_project: mistral-nine-tail
|
149 |
+
#wandb_entity:
|
150 |
+
#wandb_watch:
|
151 |
+
wandb_name: 8xA40-dsz3bf16_padw
|
152 |
+
#wandb_log_model:
|
153 |
|
154 |
+
gradient_accumulation_steps: 1 ## total_batch = 8
|
155 |
+
micro_batch_size: 1
|
156 |
+
num_epochs: 3
|
157 |
+
optimizer: paged_adamw_32bit
|
158 |
+
lr_scheduler: cosine
|
159 |
+
learning_rate: 0.000007
|
160 |
|
161 |
+
train_on_inputs: false
|
162 |
+
group_by_length: false
|
163 |
+
bf16: auto
|
164 |
+
fp16:
|
165 |
+
tf32: false
|
166 |
+
|
167 |
+
gradient_checkpointing: true
|
168 |
+
early_stopping_patience:
|
169 |
+
resume_from_checkpoint:
|
170 |
+
local_rank:
|
171 |
+
logging_steps: 1
|
172 |
+
xformers_attention:
|
173 |
+
flash_attention: true
|
174 |
|
175 |
+
warmup_steps: 1000
|
176 |
+
evals_per_epoch: 1
|
177 |
+
eval_table_size:
|
178 |
+
save_steps: 1000
|
179 |
+
debug:
|
180 |
+
deepspeed: deepspeed_configs/zero3_bf16.json
|
181 |
+
weight_decay: 0.01
|
182 |
+
special_tokens:
|
183 |
+
pad_token: <pad>
|
184 |
+
```
|
185 |
|
186 |
+
</details><br>
|
187 |
+
|
188 |
+
|
189 |
+
- Training loss
|
190 |
|
191 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6629154d55d7c289634b8c5d/Xcat10ejYX1nU4cH94vJF.png)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|