Copy of exBERT - Code ver.

exBERT at Github

  • ์Šคํƒ€๋Š” ๊ฒจ์šฐ 9๊ฐœ..
  • issue ์˜ฌ๋ผ์˜จ๊ฑฐ ์ฒ˜๋ฆฌ ์•ˆํ•ด์คŒ. (1๋‹ฌ ์ „์— ์˜ฌ๋ผ์˜จ๊ฑด๋ฐ.)

์‹คํ—˜๋กœ๊ทธ

๋‹ค์šด๋กœ๋“œ & ์ปค๋งจ๋“œ ์‹คํ–‰

git clone https://github.com/cgmhaicenter/exBERT

์ด์Šˆ1. ํŒจํ‚ค์ง€ ์„ค์น˜ ์•ˆ๋˜์–ด์žˆ์Œ

pip install torch transformers tqdm numpy

์ด์Šˆ2. Github์˜ ์ปค๋งจ๋“œ๋Š” ์—”ํ„ฐ \ ๊ฐ€ ์—†์Œ..

python Pretraining.py -e 1 -b 256 -sp path_to_storage -dv 0 1 2 3 -lr 1e-04 -str exBERT -config path_to_config_file_of_the_OFF_THE_SHELF_MODEL ./config_and_vocab/exBERT/bert_config_ex_s3.json -vocab ./config_and_vocab/exBERT/exBERT_vocab.txt -pm_p path_to_state_dict_of_the_OFF_THE_SHELF_MODEL -dp path_to_your_training_data -ls 128 -p 1

์ด์Šˆ3. path_to_config_file_of_the_OFF_THE_SHELF_MODEL ์—†์Œ

์•„๋ž˜์™€ ๊ฐ™์ด ๊ธฐ์กด ๋ชจ๋ธ์ธ beomi/kcbert-base ๋กœ ๊ต์ฒดํ•ด์ฃผ๋ ค๊ณ  ํ•จ.
python Pretraining.py -e 1 \ -b 256 \ -sp path_to_storage \ -dv 0 1 2 3 -lr 1e-04 \ -str exBERT \ -config beomi/kcbert-base ./config_and_vocab/exBERT/bert_config_ex_s3.json \ -vocab ./config_and_vocab/exBERT/exBERT_vocab.txt \ -pm_p beomi/kcbert-base \ -dp path_to_your_training_data \ -ls 128 \ -p 1
ย