JetStream inference at TPU

Tags
NLP
MLDL Framework
PLM
GCP
TPU
Published

Reference

โ€ฃ
ย 

step-by-step

1. TPU ๋„์šฐ๊ธฐ

์ด๋ฒˆ๊ธ€์€ v4-8 ๊ธฐ์ค€

2. jetstream ๋ฐ›๊ณ  ์„ค์น˜

git clone https://github.com/google/jetstream-pytorch.git cd jetstream-pytorch git checkout jetstream-v0.2.3 source install_everything.sh
  • ์ถ”๊ฐ€๋กœ ์„ค์น˜ํ•˜๋ฉด ๋” ๋น ๋ฅธ ๋‹ค์šด๋กœ๋“œ
pip install hf_transfer echo 'export PATH=~/.local/bin:$PATH' >> ~/.bashrc echo 'export HF_HUB_ENABLE_HF_TRANSFER=1' >> ~/.bashrc source .bashrc

3. HF ๋กœ๊ทธ์ธ & ๋ชจ๋ธ ๋‹ค์šด๋กœ๋“œ

pip install -U "huggingface_hub[cli]" huggingface-cli login huggingface-cli download google/gemma-7b-pytorch --local-dir $input_ckpt_dir