You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CUDA_VISIBLE_DEVICES=0 swift sft --model_id_or_path qwen/Qwen-7B-Chat --dataset blossom-math-zh
125
+
CUDA_VISIBLE_DEVICES=0 \
126
+
swift sft \
127
+
--model_id_or_path qwen/Qwen-7B-Chat \
128
+
--dataset blossom-math-zh \
129
+
--output_dir output \
126
130
127
131
# Using DDP
128
132
# Experimental environment: 2 * 3090
@@ -132,18 +136,31 @@ NPROC_PER_NODE=2 \
132
136
swift sft \
133
137
--model_id_or_path qwen/Qwen-7B-Chat \
134
138
--dataset blossom-math-zh \
139
+
--output_dir output \
135
140
136
141
# Using custom dataset
137
-
CUDA_VISIBLE_DEVICES=0 swift sft --model_id_or_path qwen/Qwen-7B-Chat --custom_train_dataset_path chatml.jsonl
142
+
CUDA_VISIBLE_DEVICES=0 \
143
+
swift sft \
144
+
--model_id_or_path qwen/Qwen-7B-Chat \
145
+
--custom_train_dataset_path chatml.jsonl \
146
+
--output_dir output \
138
147
```
139
148
140
149
**Inference**:
141
150
```bash
151
+
# Original Model
152
+
CUDA_VISIBLE_DEVICES=0 swift infer --model_id_or_path qwen/Qwen-7B-Chat --dataset blossom-math-zh
153
+
154
+
# Fine-tuned Model
142
155
CUDA_VISIBLE_DEVICES=0 swift infer --ckpt_dir 'xxx/vx_xxx/checkpoint-xxx'
143
156
```
144
157
145
158
**Web-UI**:
146
159
```bash
160
+
# Original Model
161
+
CUDA_VISIBLE_DEVICES=0 swift web-ui --model_id_or_path qwen/Qwen-7B-Chat
162
+
163
+
# Fine-tuned Model
147
164
CUDA_VISIBLE_DEVICES=0 swift web-ui --ckpt_dir 'xxx/vx_xxx/checkpoint-xxx'
148
165
```
149
166
@@ -574,9 +591,9 @@ The template initialization function retrieves the complete chat template based
574
591
-- `check_model_is_latest`: Check if the model is the latest, default is `True`. If you need to train without internet connection, please set this parameter to `False`.
575
592
-`--max_new_tokens`: The maximum number of new tokens to generate. The default value is `2048`. This parameter only takes effect when `predict_with_generate` is set to True.
576
593
-`--do_sample`: Whether to use sampling during generation. The default value is `True`. This parameter only takes effect when `predict_with_generate` is set to True.
577
-
-`--temperature`: The temperature value for sampling during generation. The default value is `0.9`. This parameter only takes effect when `predict_with_generate` is set to True.
594
+
-`--temperature`: The temperature value for sampling during generation. The default value is `0.3`. This parameter only takes effect when `predict_with_generate` is set to True.
578
595
-`--top_k`: The value of k for top-k sampling during generation. The default value is `20`. This parameter only takes effect when `predict_with_generate` is set to True.
579
-
-`--top_p`: The cumulative probability threshold for top-p sampling during generation. The default value is `0.9`. This parameter only takes effect when `predict_with_generate` is set to True.
596
+
-`--top_p`: The cumulative probability threshold for top-p sampling during generation. The default value is `0.7`. This parameter only takes effect when `predict_with_generate` is set to True.
580
597
-`--repetition_penalty`: The repetition penalty applied during generation. The default value is `1.05`. This parameter only takes effect when `predict_with_generate` is set to True.
581
598
582
599
@@ -606,9 +623,9 @@ The template initialization function retrieves the complete chat template based
606
623
-`--bnb_4bit_use_double_quant`: Default value is `True`. For specific parameter details, please refer to the `sft.sh Command Line Arguments`. This parameter is not effective if `quantization_bit` is set to 0.
607
624
-`--max_new_tokens`: Maximum number of new tokens to generate. Default value is `2048`.
608
625
-`--do_sample`: Whether to use greedy decoding or sampling for generation. Default value is `True`.
609
-
-`--temperature`: Default value is `0.9`. This parameter only takes effect when `do_sample` is set to True.
626
+
-`--temperature`: Default value is `0.3`. This parameter only takes effect when `do_sample` is set to True.
610
627
-`--top_k`: Default value is `20`. This parameter only takes effect when `do_sample` is set to True.
611
-
-`--top_p`: Default value is `0.9`. This parameter only takes effect when `do_sample` is set to True.
628
+
-`--top_p`: Default value is `0.7`. This parameter only takes effect when `do_sample` is set to True.
612
629
-`--repetition_penalty`: Default value is `1.05`.
613
630
-`--use_flash_attn`: Default value is `None`, which means 'auto'. For specific parameter details, please refer to the `sft.sh Command Line Arguments`. The models that support 'flash_attn' include: qwen series, qwen-vl series, llama series, openbuddy series, mistral series, yi series, ziya series.
614
631
-`--ignore_args_error`: Default value is `False`. For specific parameter details, please refer to the `sft.sh Command Line Arguments`.
0 commit comments