diff --git a/ptuning/README.md b/ptuning/README.md index f92a328..d833d1d 100644 --- a/ptuning/README.md +++ b/ptuning/README.md @@ -8,7 +8,7 @@ ## 软件依赖 运行微调需要4.27.1版本的`transformers`。除 ChatGLM-6B 的依赖之外,还需要安装以下依赖 ``` -pip install rouge_chinese nltk jieba datasets +pip install rouge_chinese nltk jieba datasets cpm_kernels sentencepiece accelerate ``` ## 使用方法 diff --git a/ptuning/README_en.md b/ptuning/README_en.md index 34a68a6..7d0b2b1 100644 --- a/ptuning/README_en.md +++ b/ptuning/README_en.md @@ -6,7 +6,7 @@ The following uses the [ADGEN](https://aclanthology.org/D19-1321.pdf) (advertisi ## Software dependencies Running p-tuning requires version 4.27.1 of `transformers`. In addition to the dependencies of ChatGLM-6B, the following dependencies are required ``` -pip install rouge_chinese nltk jieba datasets +pip install rouge_chinese nltk jieba datasets cpm_kernels sentencepiece accelerate ``` ## Instructions diff --git a/ptuning/ds_train_finetune.sh b/ptuning/ds_train_finetune.sh index 531a800..c7e6baa 100644 --- a/ptuning/ds_train_finetune.sh +++ b/ptuning/ds_train_finetune.sh @@ -2,8 +2,9 @@ LR=1e-4 MASTER_PORT=$(shuf -n 1 -i 10000-65535) +NUM_GPUS=$(nvidia-smi --list-gpus | wc -l) -deepspeed --num_gpus=4 --master_port $MASTER_PORT main.py \ +deepspeed --num_gpus=$NUM_GPUS --master_port $MASTER_PORT main.py \ --deepspeed deepspeed.json \ --do_train \ --train_file AdvertiseGen/train.json \