Skip to content

Commit

Permalink
fix shell (#2764)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang authored Dec 25, 2024
1 parent dbeec0f commit 6488cba
Show file tree
Hide file tree
Showing 55 changed files with 73 additions and 73 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
6 changes: 3 additions & 3 deletions docs/source/GetStarted/快速开始.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
6 changes: 3 additions & 3 deletions docs/source/Instruction/导出.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CUDA_VISIBLE_DEVICES=0 swift infer \
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method bnb \
--quant_bits 4 \
--torch_dtype bfloat16
Expand All @@ -86,15 +86,15 @@ CUDA_VISIBLE_DEVICES=0 swift sft \
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method hqq \
--quant_bits 4

# eetq
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method eetq \
--torch_dtype float16
```
Expand Down
6 changes: 3 additions & 3 deletions docs/source_en/GetStarted/Quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
6 changes: 3 additions & 3 deletions docs/source_en/Instruction/Export.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ CUDA_VISIBLE_DEVICES=0 swift infer \
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method bnb \
--quant_bits 4 \
--torch_dtype bfloat16
Expand All @@ -87,15 +87,15 @@ CUDA_VISIBLE_DEVICES=0 swift sft \
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method hqq \
--quant_bits 4

# eetq
CUDA_VISIBLE_DEVICES=0 swift sft \
--model Qwen/Qwen2-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#5000 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#5000' \
--quant_method eetq \
--torch_dtype float16
```
Expand Down
4 changes: 2 additions & 2 deletions examples/export/quantize/awq.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CUDA_VISIBLE_DEVICES=0 \
swift export \
--model Qwen/Qwen2.5-1.5B-Instruct \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
--quant_n_samples 128 \
--quant_batch_size 1 \
--max_length 2048 \
Expand Down
4 changes: 2 additions & 2 deletions examples/export/quantize/gptq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ OMP_NUM_THREADS=14 \
CUDA_VISIBLE_DEVICES=0 \
swift export \
--model Qwen/Qwen2.5-1.5B-Instruct \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
--quant_n_samples 128 \
--quant_batch_size 1 \
--max_length 2048 \
Expand Down
6 changes: 3 additions & 3 deletions examples/notebook/qwen2.5-self-cognition/sft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-3B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/all_to_all/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image_area=518400 \
swift sft \
--model BAAI/Emu3-Gen \
--train_type lora \
--dataset swift/TextCaps#40 \
--dataset 'swift/TextCaps#40' \
--loss_scale react \
--tools_prompt react_zh \
--torch_dtype bfloat16 \
Expand Down
6 changes: 3 additions & 3 deletions examples/train/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/alpaca-gpt4-data-zh#500 \
AI-ModelScope/alpaca-gpt4-data-en#500 \
swift/self-cognition#500 \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
'AI-ModelScope/alpaca-gpt4-data-en#500' \
'swift/self-cognition#500' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/full/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type full \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-5 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/lazy_tokenize/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-gpu/ddp/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--lora_rank 8 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-gpu/ddp_device_map/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NPROC_PER_NODE=$nproc_per_node \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-gpu/deepspeed/train_zero2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NPROC_PER_NODE=$nproc_per_node \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-gpu/deepspeed/train_zero3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NPROC_PER_NODE=$nproc_per_node \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--lora_rank 8 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-gpu/fsdp_qlora/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ accelerate launch --config_file "./examples/train/fsdp_qlora/fsdp_offload.json"
swift/cli/sft.py \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--max_length 2048 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/accelerate/train_node1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate launch --config_file ./examples/train/multi-node/accelerate/multi_nod
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/accelerate/train_node2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate launch --config_file ./examples/train/multi-node/accelerate/multi_nod
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/deepspeed/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deepspeed --hostfile=./examples/train/multi-node-deepspeed/host.txt \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/dlc/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NODE_RANK=$RANK \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--lora_rank 8 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/swift/train_node1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/swift/train_node2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/torchrun/train_node1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ torchrun --master_port 29500 --nproc_per_node=4 --nnodes=2 --node_rank=0 --maste
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multi-node/torchrun/train_node2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ torchrun --master_port 29500 --nproc_per_node=4 --nnodes=2 --node_rank=1 --maste
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--torch_dtype bfloat16 \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--lora_rank 8 \
--lora_alpha 32 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multimodal/grounding.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MAX_PIXELS=1003520 \
swift sft \
--model Qwen/Qwen2-VL-7B-Instruct \
--train_type lora \
--dataset swift/refcoco:grounding#1000 \
--dataset 'swift/refcoco:grounding#1000' \
--num_train_epochs 1 \
--learning_rate 1e-4 \
--lora_rank 8 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multimodal/ocr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=0,1 \
MAX_PIXELS=1003520 \
swift sft \
--model Qwen/QVQ-72B-Preview \
--dataset AI-ModelScope/LaTeX_OCR:human_handwrite#20000 \
--dataset 'AI-ModelScope/LaTeX_OCR:human_handwrite#20000' \
--train_type lora \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/multimodal/vqa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAX_PIXELS=1003520 \
swift sft \
--model Qwen/Qwen2-VL-7B-Instruct \
--train_type lora \
--dataset swift/OK-VQA_train#1000 \
--dataset 'swift/OK-VQA_train#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/packing/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swift sft \
--packing true \
--max_length 8192 \
--max_steps 100 \
--dataset swift/self-cognition#5000 \
--dataset 'swift/self-cognition#5000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/plugins/train_loss_scale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/rlhf/kto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ swift rlhf \
--rlhf_type kto \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/ultrafeedback-binarized-preferences-cleaned-kto#10000 \
--dataset 'AI-ModelScope/ultrafeedback-binarized-preferences-cleaned-kto#10000' \
--num_train_epochs 2 \
--learning_rate 1e-4 \
--lora_rank 8 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/seq_cls/sft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B \
--train_type lora \
--dataset DAMO_NLP/jd:cls#2000 \
--dataset 'DAMO_NLP/jd:cls#2000' \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/sequence_parallel/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NPROC_PER_NODE=$nproc_per_node \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset AI-ModelScope/LongAlpaca-12k#5000 \
--dataset 'AI-ModelScope/LongAlpaca-12k#5000' \
--num_train_epochs 1 \
--sequence_parallel_size 2 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/streaming/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type lora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--streaming true \
--max_steps 1000 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/tuners/adalora/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type adalora \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
2 changes: 1 addition & 1 deletion examples/train/tuners/adapter/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type adapter \
--dataset swift/self-cognition#1000 \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--learning_rate 1e-4 \
Expand Down
Loading

0 comments on commit 6488cba

Please sign in to comment.