Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
GLM-4V_pytorch
Commits
1bfbcff0
Commit
1bfbcff0
authored
Jun 13, 2024
by
wanglch
Browse files
Initial commit
parents
Pipeline
#1204
canceled with stages
Changes
707
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
441 additions
and
0 deletions
+441
-0
swift-main/examples/pytorch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/infer.sh
...torch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/sft.sh
...pytorch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/sft.sh
+40
-0
swift-main/examples/pytorch/llm/scripts/bluelm_7b_chat/lora/infer.sh
...examples/pytorch/llm/scripts/bluelm_7b_chat/lora/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/bluelm_7b_chat/lora/sft.sh
...n/examples/pytorch/llm/scripts/bluelm_7b_chat/lora/sft.sh
+31
-0
swift-main/examples/pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/infer.sh
.../pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/sft.sh
...es/pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/sft.sh
+31
-0
swift-main/examples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/infer.sh
...ples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/sft.sh
...amples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/sft.sh
+38
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora/infer.sh
...in/examples/pytorch/llm/scripts/chatglm3_6b/lora/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora/sft.sh
...main/examples/pytorch/llm/scripts/chatglm3_6b/lora/sft.sh
+31
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/infer.sh
...xamples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/infer.sh
+11
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/sft.sh
.../examples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/sft.sh
+35
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/infer.sh
...amples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/sft.sh
...examples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/sft.sh
+33
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/rome.sh
...main/examples/pytorch/llm/scripts/chatglm3_6b_32k/rome.sh
+13
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora/infer.sh
...amples/pytorch/llm/scripts/chatglm3_6b_base/lora/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora/sft.sh
...examples/pytorch/llm/scripts/chatglm3_6b_base/lora/sft.sh
+31
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/infer.sh
...pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/infer.sh
+12
-0
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/sft.sh
...s/pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/sft.sh
+38
-0
swift-main/examples/pytorch/llm/scripts/codefuse_codellama_34b/lora/infer.sh
.../pytorch/llm/scripts/codefuse_codellama_34b/lora/infer.sh
+13
-0
No files found.
Too many changes to show.
To preserve performance only
707 of 707+
files are displayed.
Plain diff
Email patch
swift-main/examples/pytorch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/baichuan-13b-chat/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/baichuan_13b_chat/qlora_ddp_ds/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 2 * A10
# 2 * 17GB GPU memory
nproc_per_node
=
2
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0,1
\
torchrun
\
--nproc_per_node
=
$nproc_per_node
\
--master_port
29500
\
llm_sft.py
\
--model_id_or_path
baichuan-inc/Baichuan-13B-Base
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--ddp_backend
nccl
\
--dataset
blossom-math-zh
\
--num_train_epochs
1
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--quantization_bit
4
\
--bnb_4bit_comp_dtype
AUTO
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
ALL
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
$(
expr
16 /
$nproc_per_node
)
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
--deepspeed
default-zero2
\
swift-main/examples/pytorch/llm/scripts/bluelm_7b_chat/lora/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10, 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/bluelm-7b-chat/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/bluelm_7b_chat/lora/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10, 3090
# 17GB GPU memory
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_sft.py
\
--model_id_or_path
vivo-ai/BlueLM-7B-Chat
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--dataset
blossom-math-zh
\
--num_train_epochs
1
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
16
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
swift-main/examples/pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 4*A100
# 4 * 55GB GPU memory
CUDA_VISIBLE_DEVICES
=
0,1,2,3
\
swift infer
\
--ckpt_dir
"output/c4ai-command-r-plus/vx-xxx/checkpoint-xx"
\
--load_dataset_config
true
\
--load_args_from_ckpt_dir
true
\
--temperature
0.3
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/c4ai_command_r_plus/lora_mp/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 4 * A100
# 4 * 60GB GPU memory
# Note: you have to install latest version of the transformers library.
# pip install git+https://github.com/huggingface/transformers
CUDA_VISIBLE_DEVICES
=
0,1,2,3
\
swift sft
\
--model_type
c4ai-command-r-plus
\
--sft_type
lora
\
--tuner_backend
swift
\
--dtype
AUTO
\
--output_dir
output
\
--dataset
alpaca-zh#10000 alpaca-en#10000
\
--num_train_epochs
2
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
16
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
--use_flash_attn
true
\
swift-main/examples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/chatglm2-6b/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/chatglm2_6b/lora_ddp_ds/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 2 * 3090
# 2 * 20GB GPU memory
nproc_per_node
=
2
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0,1
\
torchrun
\
--nproc_per_node
=
$nproc_per_node
\
--master_port
29500
\
llm_sft.py
\
--model_id_or_path
ZhipuAI/chatglm2-6b
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--ddp_backend
nccl
\
--dataset
leetcode-python-en
\
--num_train_epochs
1
\
--max_length
4096
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
$(
expr
16 /
$nproc_per_node
)
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
--deepspeed
default-zero2
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: V100, A10, 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/chatglm3-6b/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: V100, A10, 3090
# 16GB GPU memory
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_sft.py
\
--model_id_or_path
ZhipuAI/chatglm3-6b
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--dataset
blossom-math-zh
\
--num_train_epochs
1
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
16
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 3090
CUDA_VISIBLE_DEVICES
=
0
\
swift infer
\
--ckpt_dir
"output/chatglm3-6b/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b/lora_ddp/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 2 * 3090
# 2 * 24GB GPU memory
nproc_per_node
=
2
CUDA_VISIBLE_DEVICES
=
0,1
\
NPROC_PER_NODE
=
$nproc_per_node
\
MASTER_PORT
=
29500
\
swift sft
\
--model_id_or_path
ZhipuAI/chatglm3-6b
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--ddp_backend
nccl
\
--dataset
leetcode-python-en
\
--num_train_epochs
5
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
ALL
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
$(
expr
16 /
$nproc_per_node
)
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10, 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/chatglm3-6b-32k/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.1
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/qlora/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10, 3090
# 10GB GPU memory
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_sft.py
\
--model_id_or_path
ZhipuAI/chatglm3-6b-32k
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
AUTO
\
--dtype
AUTO
\
--output_dir
output
\
--dataset
agent-instruct-all-en
\
--num_train_epochs
1
\
--max_length
4096
\
--check_dataset_strategy
warning
\
--quantization_bit
4
\
--bnb_4bit_comp_dtype
AUTO
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
16
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_32k/rome.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: A10
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python rome_infer.py
\
--model_id_or_path
ZhipuAI/chatglm3-6b-32k
\
--model_revision
master
\
--template_type
AUTO
\
--dtype
AUTO
\
--max_new_tokens
128
\
--temperature
0.1
\
--top_p
0.7
\
--do_sample
true
\
--rome_request_file
rome_example/request.json
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: V100, A10, 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/chatglm3-6b-base/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.7
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: V100, A10, 3090
# 16GB GPU memory
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_sft.py
\
--model_id_or_path
ZhipuAI/chatglm3-6b-base
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
chatglm-generation
\
--dtype
AUTO
\
--output_dir
output
\
--dataset
dureader-robust-zh
\
--num_train_epochs
1
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
16
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/chatglm3-6b-base/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--max_new_tokens
2048
\
--temperature
0.7
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
swift-main/examples/pytorch/llm/scripts/chatglm3_6b_base/lora_ddp_ds/sft.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: 2 * 3090
# 2 * 17GB GPU memory
nproc_per_node
=
2
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0,1
\
torchrun
\
--nproc_per_node
=
$nproc_per_node
\
--master_port
29500
\
llm_sft.py
\
--model_id_or_path
ZhipuAI/chatglm3-6b-base
\
--model_revision
master
\
--sft_type
lora
\
--tuner_backend
peft
\
--template_type
chatglm-generation
\
--dtype
AUTO
\
--output_dir
output
\
--ddp_backend
nccl
\
--dataset
dureader-robust-zh
\
--num_train_epochs
1
\
--max_length
2048
\
--check_dataset_strategy
warning
\
--lora_rank
8
\
--lora_alpha
32
\
--lora_dropout_p
0.05
\
--lora_target_modules
DEFAULT
\
--gradient_checkpointing
true
\
--batch_size
1
\
--weight_decay
0.1
\
--learning_rate
1e-4
\
--gradient_accumulation_steps
$(
expr
16 /
$nproc_per_node
)
\
--max_grad_norm
0.5
\
--warmup_ratio
0.03
\
--eval_steps
100
\
--save_steps
100
\
--save_total_limit
2
\
--logging_steps
10
\
--deepspeed
default-zero2
\
swift-main/examples/pytorch/llm/scripts/codefuse_codellama_34b/lora/infer.sh
0 → 100644
View file @
1bfbcff0
# Experimental environment: V100, A10, 3090
PYTHONPATH
=
../../..
\
CUDA_VISIBLE_DEVICES
=
0
\
python llm_infer.py
\
--ckpt_dir
"output/codefuse-codellama-34b-chat/vx-xxx/checkpoint-xxx"
\
--load_dataset_config
true
\
--use_flash_attn
true
\
--max_new_tokens
2048
\
--temperature
0.3
\
--top_p
0.7
\
--repetition_penalty
1.
\
--do_sample
true
\
--merge_lora
false
\
Prev
1
…
12
13
14
15
16
17
18
19
20
…
36
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment