Commit
·
2227ae5
1
Parent(s):
b5d0c05
Upload models
Browse files- .gitignore +1 -0
- added_tokens.json +3 -0
- arguments.json +69 -0
- arguments.pkl +3 -0
- config.json +51 -0
- environ.txt +118 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- script.sh +150 -0
- special_tokens_map.json +12 -0
- stderr.log +0 -0
- stdout.log +0 -0
- tokenizer.json +0 -0
- tokenizer_config.json +29 -0
- vocab.json +0 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*
|
added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<pad>": 50257
|
3 |
+
}
|
arguments.json
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_name_or_path": "/home/juntao/Projects/roo-dev-cty/models/proxy_model/gpt2-774m",
|
3 |
+
"max_length": 1024,
|
4 |
+
"trust_remote_code": true,
|
5 |
+
"train_datasets": [
|
6 |
+
[
|
7 |
+
"PrefOnlyRewardJSON01",
|
8 |
+
{
|
9 |
+
"proportion": 1.0,
|
10 |
+
"path": "/home/juntao/Projects/roo-dev-cty/data/roo/gold-generate-dataset-ultrafeedback/30k/train.json"
|
11 |
+
}
|
12 |
+
]
|
13 |
+
],
|
14 |
+
"eval_datasets": [
|
15 |
+
[
|
16 |
+
"PrefOnlyRewardJSON02",
|
17 |
+
{
|
18 |
+
"proportion": 1.0,
|
19 |
+
"path": "/home/juntao/Projects/roo-dev-cty/data/roo/gold-generate-dataset-ultrafeedback/30k/test.json"
|
20 |
+
}
|
21 |
+
]
|
22 |
+
],
|
23 |
+
"loss_type": "sequence-wise",
|
24 |
+
"epochs": 2,
|
25 |
+
"per_device_train_batch_size": 4,
|
26 |
+
"per_device_eval_batch_size": 4,
|
27 |
+
"gradient_accumulation_steps": 4,
|
28 |
+
"gradient_checkpointing": true,
|
29 |
+
"regularization": 0.001,
|
30 |
+
"normalize_score_during_training": false,
|
31 |
+
"normalizer_type": "ExponentialMovingAverage",
|
32 |
+
"normalizer_momentum": 0.9,
|
33 |
+
"lr": 2e-05,
|
34 |
+
"lr_scheduler_type": "cosine",
|
35 |
+
"lr_warmup_ratio": 0.03,
|
36 |
+
"weight_decay": 0.1,
|
37 |
+
"seed": 42,
|
38 |
+
"fp16": false,
|
39 |
+
"bf16": true,
|
40 |
+
"tf32": true,
|
41 |
+
"lm_coef": 0.01,
|
42 |
+
"freeze_transformer_layers": false,
|
43 |
+
"eval_strategy": "epoch",
|
44 |
+
"eval_interval": 1000000,
|
45 |
+
"need_eval": true,
|
46 |
+
"eval_split_ratio": null,
|
47 |
+
"output_dir": "/home/juntao/Projects/roo-dev-cty/experiments/outputs/score_lm/gpt2_774m_0910",
|
48 |
+
"log_type": "wandb",
|
49 |
+
"log_dir": "/home/juntao/Projects/roo-dev-cty/experiments/outputs/score_lm/gpt2_774m_0910",
|
50 |
+
"log_project": "score_lm",
|
51 |
+
"log_group": null,
|
52 |
+
"log_run_name": "gpt2_774m_0910",
|
53 |
+
"save_16bit": true,
|
54 |
+
"save_interval": 1000000,
|
55 |
+
"local_rank": 0,
|
56 |
+
"zero_stage": 3,
|
57 |
+
"offload": "none",
|
58 |
+
"deepspeed": false,
|
59 |
+
"deepspeed_config": null,
|
60 |
+
"deepscale": false,
|
61 |
+
"deepscale_config": null,
|
62 |
+
"global_rank": 0,
|
63 |
+
"device": {
|
64 |
+
"type": "torch.device",
|
65 |
+
"repr": "device(type='cuda', index=0)"
|
66 |
+
},
|
67 |
+
"num_update_steps_per_epoch": 211,
|
68 |
+
"total_training_steps": 422
|
69 |
+
}
|
arguments.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8da817dc4351324ea8d981d9d4f700ed8bc9be54b9227394bf2ce64e3695da9f
|
3 |
+
size 1555
|
config.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/home/juntao/Projects/roo-dev-cty/models/proxy_model/gpt2-774m",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2ForScoreLM"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 50256,
|
9 |
+
"do_normalize": false,
|
10 |
+
"embd_pdrop": 0.1,
|
11 |
+
"eos_token_id": 50256,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"layer_norm_epsilon": 1e-05,
|
14 |
+
"mean": [
|
15 |
+
0.16215750575065613
|
16 |
+
],
|
17 |
+
"model_type": "gpt2",
|
18 |
+
"momentum": 0.9,
|
19 |
+
"n_ctx": 1024,
|
20 |
+
"n_embd": 1280,
|
21 |
+
"n_head": 20,
|
22 |
+
"n_inner": null,
|
23 |
+
"n_layer": 36,
|
24 |
+
"n_positions": 1024,
|
25 |
+
"normalizer_type": "ExponentialMovingAverage",
|
26 |
+
"pad_token_id": 50257,
|
27 |
+
"reorder_and_upcast_attn": false,
|
28 |
+
"resid_pdrop": 0.1,
|
29 |
+
"scale_attn_by_inverse_layer_idx": false,
|
30 |
+
"scale_attn_weights": true,
|
31 |
+
"score_bias": true,
|
32 |
+
"score_dim": 1,
|
33 |
+
"score_type": "reward",
|
34 |
+
"summary_activation": null,
|
35 |
+
"summary_first_dropout": 0.1,
|
36 |
+
"summary_proj_to_labels": true,
|
37 |
+
"summary_type": "cls_index",
|
38 |
+
"summary_use_proj": true,
|
39 |
+
"task_specific_params": {
|
40 |
+
"text-generation": {
|
41 |
+
"do_sample": true,
|
42 |
+
"max_length": 50
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"transformers_version": "4.40.0",
|
46 |
+
"use_cache": true,
|
47 |
+
"var": [
|
48 |
+
4.382232189178467
|
49 |
+
],
|
50 |
+
"vocab_size": 50258
|
51 |
+
}
|
environ.txt
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BAT_THEME=Monokai Extended
|
2 |
+
BROWSER=/home/juntao/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/bin/helpers/browser.sh
|
3 |
+
CC=/usr/bin/gcc
|
4 |
+
COLORTERM=truecolor
|
5 |
+
CONDA_DEFAULT_ENV=roo
|
6 |
+
CONDA_EXE=/home/juntao/Miniconda3/bin/conda
|
7 |
+
CONDA_PREFIX=/home/juntao/Miniconda3/envs/roo
|
8 |
+
CONDA_PROMPT_MODIFIER=(roo)
|
9 |
+
CONDA_PYTHONBREAKPOINT=
|
10 |
+
CONDA_PYTHON_EXE=/home/juntao/Miniconda3/bin/python
|
11 |
+
CONDA_ROOT=/home/juntao/Miniconda3
|
12 |
+
CONDA_SHLVL=1
|
13 |
+
CPLUS_INCLUDE_PATH=/usr/local/cuda/include:/usr/local/cuda/extras/CUPTI/include
|
14 |
+
CROSS_RANK=0
|
15 |
+
CROSS_SIZE=1
|
16 |
+
CUDA_HOME=/usr/local/cuda
|
17 |
+
CUDA_MODULE_LOADING=LAZY
|
18 |
+
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
|
19 |
+
CXX=/usr/bin/g++
|
20 |
+
C_INCLUDE_PATH=/usr/local/cuda/include:/usr/local/cuda/extras/CUPTI/include
|
21 |
+
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1005/bus
|
22 |
+
FC=/usr/bin/gfortran
|
23 |
+
FPATH=/home/juntao/.local/share/gem/ruby/3.0.0/gems/colorls-1.4.6/zsh:/home/juntao/.oh-my-zsh/plugins/vscode:/home/juntao/.oh-my-zsh/plugins/brew:/home/juntao/.oh-my-zsh/plugins/tmux:/home/juntao/.oh-my-zsh/plugins/docker:/home/juntao/.oh-my-zsh/plugins/pylint:/home/juntao/.oh-my-zsh/plugins/pip:/home/juntao/.oh-my-zsh/plugins/python:/home/juntao/.oh-my-zsh/plugins/git-auto-fetch:/home/juntao/.oh-my-zsh/plugins/git:/home/juntao/.oh-my-zsh/plugins/alias-finder:/home/juntao/.oh-my-zsh/plugins/rsync:/home/juntao/.oh-my-zsh/plugins/cp:/home/juntao/.oh-my-zsh/plugins/copypath:/home/juntao/.oh-my-zsh/plugins/copyfile:/home/juntao/.oh-my-zsh/plugins/fzf:/home/juntao/.oh-my-zsh/plugins/colored-man-pages:/home/juntao/.oh-my-zsh/plugins/colorize:/home/juntao/.oh-my-zsh/custom/plugins/conda-zsh-completion:/home/juntao/.oh-my-zsh/custom/plugins/zsh-completions:/home/juntao/.oh-my-zsh/custom/plugins/zsh-autosuggestions:/home/juntao/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting:/home/juntao/.oh-my-zsh/plugins/ubuntu:/home/juntao/.oh-my-zsh/functions:/home/juntao/.oh-my-zsh/completions:/home/juntao/.oh-my-zsh/custom/functions:/home/juntao/.oh-my-zsh/custom/completions:/home/linuxbrew/.linuxbrew/share/zsh/site-functions:/home/juntao/.local/share/gem/ruby/3.0.0/gems/colorls-1.4.6/zsh:/home/juntao/.oh-my-zsh/plugins/vscode:/home/juntao/.oh-my-zsh/plugins/brew:/home/juntao/.oh-my-zsh/plugins/tmux:/home/juntao/.oh-my-zsh/plugins/docker:/home/juntao/.oh-my-zsh/plugins/pylint:/home/juntao/.oh-my-zsh/plugins/pip:/home/juntao/.oh-my-zsh/plugins/python:/home/juntao/.oh-my-zsh/plugins/git-auto-fetch:/home/juntao/.oh-my-zsh/plugins/git:/home/juntao/.oh-my-zsh/plugins/alias-finder:/home/juntao/.oh-my-zsh/plugins/rsync:/home/juntao/.oh-my-zsh/plugins/cp:/home/juntao/.oh-my-zsh/plugins/copypath:/home/juntao/.oh-my-zsh/plugins/copyfile:/home/juntao/.oh-my-zsh/plugins/fzf:/home/juntao/.oh-my-zsh/plugins/colored-man-pages:/home/juntao/.oh-my-zsh/plugins/colorize:/home/juntao/.oh-my-zsh/custom/plugins/conda-zsh-completion:/home/juntao/.oh-my-zsh/custom/plugins/zsh-completions:/home/juntao/.oh-my-zsh/custom/plugins/zsh-autosuggestions:/home/juntao/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting:/home/juntao/.oh-my-zsh/plugins/ubuntu:/home/juntao/.oh-my-zsh/functions:/home/juntao/.oh-my-zsh/completions:/home/juntao/.oh-my-zsh/custom/functions:/home/juntao/.oh-my-zsh/custom/completions:/home/juntao/.oh-my-zsh/cache/completions:/usr/local/share/zsh/site-functions:/usr/share/zsh/vendor-functions:/usr/share/zsh/vendor-completions:/usr/share/zsh/functions/Calendar:/usr/share/zsh/functions/Chpwd:/usr/share/zsh/functions/Completion:/usr/share/zsh/functions/Completion/AIX:/usr/share/zsh/functions/Completion/BSD:/usr/share/zsh/functions/Completion/Base:/usr/share/zsh/functions/Completion/Cygwin:/usr/share/zsh/functions/Completion/Darwin:/usr/share/zsh/functions/Completion/Debian:/usr/share/zsh/functions/Completion/Linux:/usr/share/zsh/functions/Completion/Mandriva:/usr/share/zsh/functions/Completion/Redhat:/usr/share/zsh/functions/Completion/Solaris:/usr/share/zsh/functions/Completion/Unix:/usr/share/zsh/functions/Completion/X:/usr/share/zsh/functions/Completion/Zsh:/usr/share/zsh/functions/Completion/openSUSE:/usr/share/zsh/functions/Exceptions:/usr/share/zsh/functions/MIME:/usr/share/zsh/functions/Math:/usr/share/zsh/functions/Misc:/usr/share/zsh/functions/Newuser:/usr/share/zsh/functions/Prompts:/usr/share/zsh/functions/TCP:/usr/share/zsh/functions/VCS_Info:/usr/share/zsh/functions/VCS_Info/Backends:/usr/share/zsh/functions/Zftp:/usr/share/zsh/functions/Zle:/home/linuxbrew/.linuxbrew/share/zsh/functions:/home/juntao/.oh-my-zsh/custom/plugins/zsh-completions/src:/home/juntao/.oh-my-zsh/custom/plugins/zsh-completions/src:/home/juntao/.oh-my-zsh/custom/plugins/conda-zsh-completion:/home/linuxbrew/.linuxbrew/share/zsh/site-functions
|
24 |
+
FZF_CTRL_T_COMMAND=fdfind --type file --follow --hidden --no-ignore-vcs --exclude '.git' --exclude '[Mm]iniconda3' --exclude '[Aa]naconda3' --color=always
|
25 |
+
FZF_DEFAULT_COMMAND=fdfind --type file --follow --hidden --no-ignore-vcs --exclude '.git' --exclude '[Mm]iniconda3' --exclude '[Aa]naconda3' --color=always
|
26 |
+
FZF_DEFAULT_OPTS=--height=40% --layout=reverse --ansi --preview='(batcat --color=always {} || highlight -O ansi {} || cat {}) 2>/dev/null | head -100'
|
27 |
+
GIT_ASKPASS=/home/juntao/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/extensions/git/dist/askpass.sh
|
28 |
+
GSETTINGS_SCHEMA_DIR=/home/juntao/Miniconda3/envs/roo/share/glib-2.0/schemas
|
29 |
+
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
|
30 |
+
HOME=/home/juntao
|
31 |
+
HOMEBREW_API_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api
|
32 |
+
HOMEBREW_BAT=true
|
33 |
+
HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
|
34 |
+
HOMEBREW_BREW_GIT_REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
|
35 |
+
HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
|
36 |
+
HOMEBREW_CORE_GIT_REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
37 |
+
HOMEBREW_EDITOR=vim
|
38 |
+
HOMEBREW_PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
39 |
+
HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
|
40 |
+
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
|
41 |
+
INFOPATH=/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info:
|
42 |
+
LANG=en_US.UTF-8
|
43 |
+
LC_ADDRESS=zh_CN.UTF-8
|
44 |
+
LC_ALL=en_US.utf8
|
45 |
+
LC_IDENTIFICATION=zh_CN.UTF-8
|
46 |
+
LC_MEASUREMENT=zh_CN.UTF-8
|
47 |
+
LC_MONETARY=zh_CN.UTF-8
|
48 |
+
LC_NAME=zh_CN.UTF-8
|
49 |
+
LC_NUMERIC=zh_CN.UTF-8
|
50 |
+
LC_PAPER=zh_CN.UTF-8
|
51 |
+
LC_TELEPHONE=zh_CN.UTF-8
|
52 |
+
LC_TIME=zh_CN.UTF-8
|
53 |
+
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
|
54 |
+
LESS=-R -M -i -j5
|
55 |
+
LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
|
56 |
+
LOCAL_RANK=0
|
57 |
+
LOCAL_SIZE=8
|
58 |
+
LOGLEVEL=DEBUG
|
59 |
+
LOGNAME=juntao
|
60 |
+
LSCOLORS=Gxfxcxdxbxegedabagacad
|
61 |
+
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
|
62 |
+
MASTER_ADDR=127.0.0.1
|
63 |
+
MASTER_PORT=21326
|
64 |
+
MOTD_SHOWN=pam
|
65 |
+
MPICH_CC=/usr/bin/gcc
|
66 |
+
MPICH_CXX=/usr/bin/g++
|
67 |
+
MPICH_FC=/usr/bin/gfortran
|
68 |
+
OLDPWD=/home/juntao/Projects/safe-rlhf
|
69 |
+
OMPI_CC=/usr/bin/gcc
|
70 |
+
OMPI_CXX=/usr/bin/g++
|
71 |
+
OMPI_FC=/usr/bin/gfortran
|
72 |
+
P9K_SSH=1
|
73 |
+
P9K_TTY=old
|
74 |
+
PAGER=less
|
75 |
+
PATH=/home/juntao/Miniconda3/envs/roo/bin:/home/juntao/Miniconda3/envs/roo/bin:/home/juntao/.local/share/gem/ruby/3.0.0/bin:/var/lib/gems/3.0.0/bin:/usr/local/cuda/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/juntao/.local/bin:/home/juntao/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/bin/remote-cli:/home/juntao/.perl/bin:/home/juntao/Miniconda3/condabin:/home/juntao/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/juntao/.fzf/bin
|
76 |
+
PERL5LIB=/home/juntao/.perl/lib/perl5
|
77 |
+
PERL_LOCAL_LIB_ROOT=/home/juntao/.perl
|
78 |
+
PERL_MB_OPT=--install_base "/home/juntao/.perl"
|
79 |
+
PERL_MM_OPT=INSTALL_BASE=/home/juntao/.perl
|
80 |
+
PWD=/home/juntao/Projects/roo-dev-cty
|
81 |
+
PYTHONBREAKPOINT=ipdb.set_trace
|
82 |
+
PYTHONHASHSEED=42
|
83 |
+
PYTHONPATH=/home/juntao/Projects/roo-dev-cty/experiments
|
84 |
+
RANK=0
|
85 |
+
RUBYOPT=-W0
|
86 |
+
SHELL=/usr/bin/zsh
|
87 |
+
SHLVL=3
|
88 |
+
SSH_CLIENT=127.0.0.1 44828 10700
|
89 |
+
SSH_CONNECTION=127.0.0.1 44828 127.0.0.1 10700
|
90 |
+
TERM=xterm-256color
|
91 |
+
TERM_PROGRAM=vscode
|
92 |
+
TERM_PROGRAM_VERSION=1.93.0
|
93 |
+
USER=juntao
|
94 |
+
USER_ZDOTDIR=/home/juntao
|
95 |
+
VSCODE_GIT_ASKPASS_EXTRA_ARGS=
|
96 |
+
VSCODE_GIT_ASKPASS_MAIN=/home/juntao/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/extensions/git/dist/askpass-main.js
|
97 |
+
VSCODE_GIT_ASKPASS_NODE=/home/juntao/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node
|
98 |
+
VSCODE_GIT_IPC_HANDLE=/run/user/1005/vscode-git-e07e4512e9.sock
|
99 |
+
VSCODE_INJECTION=1
|
100 |
+
VSCODE_IPC_HOOK_CLI=/run/user/1005/vscode-ipc-5cf7b2bd-b730-42c9-996a-1dc559ff1044.sock
|
101 |
+
VSCODE_NONCE=c0cf5b90-c623-436e-be99-1454798faae5
|
102 |
+
WANDB_SERVICE=2-3553582-tcp-localhost-58473
|
103 |
+
WORLD_SIZE=8
|
104 |
+
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
|
105 |
+
XDG_RUNTIME_DIR=/run/user/1005
|
106 |
+
XDG_SESSION_CLASS=user
|
107 |
+
XDG_SESSION_ID=7919
|
108 |
+
XDG_SESSION_TYPE=tty
|
109 |
+
ZDOTDIR=/home/juntao
|
110 |
+
ZSH=/home/juntao/.oh-my-zsh
|
111 |
+
ZSH_TMUX_CONFIG=/home/juntao/.tmux.conf
|
112 |
+
ZSH_TMUX_TERM=screen-256color
|
113 |
+
_=/home/juntao/Miniconda3/envs/roo/bin/deepspeed
|
114 |
+
_CE_CONDA=
|
115 |
+
_CE_M=
|
116 |
+
_P9K_SSH_TTY=/dev/pts/73
|
117 |
+
_P9K_TTY=/dev/pts/73
|
118 |
+
_ZSH_TMUX_FIXED_CONFIG=/home/juntao/.oh-my-zsh/plugins/tmux/tmux.extra.conf
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b95072d783b8b8aa0415047ce69c2b23d9ef864993969116e3d888213c323cb
|
3 |
+
size 1548203438
|
script.sh
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
#
|
3 |
+
# Copyright 2023-2024 PKU-Alignment Team. All Rights Reserved.
|
4 |
+
#
|
5 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
# you may not use this file except in compliance with the License.
|
7 |
+
# You may obtain a copy of the License at
|
8 |
+
#
|
9 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
#
|
11 |
+
# Unless required by applicable law or agreed to in writing, software
|
12 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
# See the License for the specific language governing permissions and
|
15 |
+
# limitations under the License.
|
16 |
+
# ==============================================================================
|
17 |
+
|
18 |
+
if [ -z "${BASH_VERSION}" ]; then
|
19 |
+
echo "Please use bash to run this script." >&2
|
20 |
+
exit 1
|
21 |
+
fi
|
22 |
+
|
23 |
+
set -x
|
24 |
+
|
25 |
+
SCRIPT_DIR="$(cd "$(dirname "$0")" &>/dev/null && pwd)"
|
26 |
+
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
|
27 |
+
export PYTHONPATH="${ROOT_DIR}${PYTHONPATH:+:${PYTHONPATH}}"
|
28 |
+
export LOGLEVEL="${LOGLEVEL:-DEBUG}"
|
29 |
+
|
30 |
+
MODEL_LOCAL_DIR="/data/juntao/Models"
|
31 |
+
MODEL_NAME_OR_PATH="TinyLlama/TinyLlama_v1.1"
|
32 |
+
MODEL_NAME_TO_SAVE="gpt2_774m_0910"
|
33 |
+
OUTPUT_DIR="${ROOT_DIR}/outputs/score_lm/${MODEL_NAME_TO_SAVE}"
|
34 |
+
unset HOSTFILE
|
35 |
+
ZERO_STAGE=3
|
36 |
+
OFFLOAD="none"
|
37 |
+
while [[ "$#" -gt 0 ]]; do
|
38 |
+
arg="$1"
|
39 |
+
shift
|
40 |
+
case "${arg}" in
|
41 |
+
--model_name_or_path)
|
42 |
+
MODEL_NAME_OR_PATH="$1"
|
43 |
+
shift
|
44 |
+
;;
|
45 |
+
--model_name_or_path=*)
|
46 |
+
MODEL_NAME_OR_PATH="${arg#*=}"
|
47 |
+
;;
|
48 |
+
--output_dir)
|
49 |
+
OUTPUT_DIR="$1"
|
50 |
+
shift
|
51 |
+
;;
|
52 |
+
--output_dir=*)
|
53 |
+
OUTPUT_DIR="${arg#*=}"
|
54 |
+
;;
|
55 |
+
--hostfile)
|
56 |
+
HOSTFILE="$1"
|
57 |
+
shift
|
58 |
+
;;
|
59 |
+
--hostfile=*)
|
60 |
+
HOSTFILE="${arg#*=}"
|
61 |
+
;;
|
62 |
+
--zero_stage)
|
63 |
+
ZERO_STAGE="$1"
|
64 |
+
shift
|
65 |
+
;;
|
66 |
+
--zero_stage=*)
|
67 |
+
ZERO_STAGE="${arg#*=}"
|
68 |
+
;;
|
69 |
+
--offload)
|
70 |
+
OFFLOAD="$1"
|
71 |
+
shift
|
72 |
+
;;
|
73 |
+
--offload=*)
|
74 |
+
OFFLOAD="${arg#*=}"
|
75 |
+
;;
|
76 |
+
*)
|
77 |
+
echo "Unknown parameter passed: '${arg}'" >&2
|
78 |
+
exit 1
|
79 |
+
;;
|
80 |
+
esac
|
81 |
+
done
|
82 |
+
|
83 |
+
MODEL_LOCAL_PATH="/home/juntao/Projects/roo-dev-cty/models/proxy_model/gpt2-774m"
|
84 |
+
|
85 |
+
mkdir -p "${OUTPUT_DIR}"
|
86 |
+
OUTPUT_DIR="$(cd "${OUTPUT_DIR}" &>/dev/null && pwd)"
|
87 |
+
if [[ ! -f "${OUTPUT_DIR}/.gitignore" ]]; then
|
88 |
+
echo '*' >"${OUTPUT_DIR}/.gitignore"
|
89 |
+
fi
|
90 |
+
|
91 |
+
cp -f "$0" "${OUTPUT_DIR}/script.sh"
|
92 |
+
|
93 |
+
WANDB_API_KEY="a198b7bd241afc7cc16f7fce0ef72122c21973c3"
|
94 |
+
|
95 |
+
if [[ -z "${WANDB_API_KEY}" ]]; then
|
96 |
+
export WANDB_MODE="offline"
|
97 |
+
fi
|
98 |
+
|
99 |
+
MASTER_PORT_START=10000
|
100 |
+
MASTER_PORT_END=65535
|
101 |
+
MASTER_PORT="$(
|
102 |
+
comm -23 \
|
103 |
+
<(seq "${MASTER_PORT_START}" "${MASTER_PORT_END}" | sort) \
|
104 |
+
<(ss -Htan | awk '{ print $4 }' | awk -F ':' '{ print $NF }' | sort -u) |
|
105 |
+
shuf | head -n 1
|
106 |
+
)"
|
107 |
+
|
108 |
+
DEEPSPEED_ARGS=()
|
109 |
+
if [[ -n "${HOSTFILE+x}" ]]; then
|
110 |
+
DEEPSPEED_ARGS+=("--hostfile" "${HOSTFILE}")
|
111 |
+
fi
|
112 |
+
DEEPSPEED_ARGS+=("--master_port" "${MASTER_PORT}")
|
113 |
+
|
114 |
+
exec 1> >(tee "${OUTPUT_DIR}/stdout.log" >&1) 2> >(tee "${OUTPUT_DIR}/stderr.log" >&2)
|
115 |
+
|
116 |
+
deepspeed "${DEEPSPEED_ARGS[@]}" \
|
117 |
+
--module safe_rlhf.values.score_lm \
|
118 |
+
--train_datasets PrefOnlyRewardJSON01::/home/juntao/Projects/roo-dev-cty/data/roo/gold-generate-dataset-ultrafeedback/30k/train.json \
|
119 |
+
--eval_datasets PrefOnlyRewardJSON02::/home/juntao/Projects/roo-dev-cty/data/roo/gold-generate-dataset-ultrafeedback/30k/test.json \
|
120 |
+
--model_name_or_path "${MODEL_LOCAL_PATH}" \
|
121 |
+
--max_length 1024 \
|
122 |
+
--trust_remote_code True \
|
123 |
+
--loss_type sequence-wise \
|
124 |
+
--epochs 2 \
|
125 |
+
--per_device_train_batch_size 4 \
|
126 |
+
--per_device_eval_batch_size 4 \
|
127 |
+
--gradient_accumulation_steps 4 \
|
128 |
+
--gradient_checkpointing \
|
129 |
+
--regularization 0.001 \
|
130 |
+
--normalize_score_during_training False \
|
131 |
+
--normalizer_type ExponentialMovingAverage \
|
132 |
+
--normalizer_momentum 0.9 \
|
133 |
+
--learning_rate 2e-5 \
|
134 |
+
--lr_scheduler_type cosine \
|
135 |
+
--lr_warmup_ratio 0.03 \
|
136 |
+
--weight_decay 0.1 \
|
137 |
+
--lm_coef 0.01 \
|
138 |
+
--seed 42 \
|
139 |
+
--need_eval \
|
140 |
+
--eval_strategy epoch \
|
141 |
+
--output_dir "${OUTPUT_DIR}" \
|
142 |
+
--log_type wandb \
|
143 |
+
--log_project score_lm \
|
144 |
+
--log_run_name "${MODEL_NAME_TO_SAVE}" \
|
145 |
+
--zero_stage "${ZERO_STAGE}" \
|
146 |
+
--offload "${OFFLOAD}" \
|
147 |
+
--bf16 True \
|
148 |
+
--tf32 True \
|
149 |
+
--save_16bit
|
150 |
+
# --freeze_transformer_layers \
|
special_tokens_map.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<|endoftext|>",
|
3 |
+
"eos_token": "<|endoftext|>",
|
4 |
+
"pad_token": {
|
5 |
+
"content": "<pad>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false
|
10 |
+
},
|
11 |
+
"unk_token": "<|endoftext|>"
|
12 |
+
}
|
stderr.log
ADDED
The diff for this file is too large to render.
See raw diff
|
|
stdout.log
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"50256": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"50257": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
}
|
20 |
+
},
|
21 |
+
"bos_token": "<|endoftext|>",
|
22 |
+
"clean_up_tokenization_spaces": true,
|
23 |
+
"eos_token": "<|endoftext|>",
|
24 |
+
"model_max_length": 1024,
|
25 |
+
"pad_token": "<pad>",
|
26 |
+
"padding_side": "right",
|
27 |
+
"tokenizer_class": "GPT2Tokenizer",
|
28 |
+
"unk_token": "<|endoftext|>"
|
29 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|