forked from skypilot-org/skypilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
llama-7b-upload.yaml
31 lines (24 loc) · 910 Bytes
/
llama-7b-upload.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resources:
accelerators: A100:1
disk_size: 1024
file_mounts: # /remote/path: /local/path
~/sky_workdir/ckpt/tokenizer.model: /tmp/llama/tokenizer.model
~/sky_workdir/ckpt/7B: /tmp/llama/7B
setup: |
set -ex
conda create -n llama python=3.9 -y
conda activate llama
git clone https://github.com/skypilot-org/sky-llama.git || true
cd sky-llama
# Install ttyd for web serving
wget https://github.com/tsl0922/ttyd/releases/download/1.7.2/ttyd.x86_64
sudo mv ttyd.x86_64 /usr/local/bin/ttyd
sudo chmod +x /usr/local/bin/ttyd
# Install dependencies
pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
pip install -r requirements.txt
pip install -e .
run: |
conda activate llama
cd sky-llama
ttyd /bin/bash -c "torchrun --nproc_per_node 1 chat.py --ckpt_dir ~/sky_workdir/ckpt/7B/ --tokenizer_path ~/sky_workdir/ckpt/tokenizer.model"