Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ptuning readme for pip install #1455

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ptuning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
## 使用方法

Expand Down
2 changes: 1 addition & 1 deletion ptuning/README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion ptuning/ds_train_finetune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down