File tree Expand file tree Collapse file tree 7 files changed +47
-47
lines changed Expand file tree Collapse file tree 7 files changed +47
-47
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function convert_checkpoint() {
27
27
return 0
28
28
fi
29
29
echo " Convert Huggingface checkpoint for $MODEL_REPO "
30
- python scripts/convert_hf_checkpoint.py --checkpoint-dir " checkpoints/$MODEL_REPO "
30
+ python3 scripts/convert_hf_checkpoint.py --checkpoint-dir " checkpoints/$MODEL_REPO "
31
31
}
32
32
33
33
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
# Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
# All rights reserved.
4
4
#
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ set -exu
10
10
install_pip_dependencies () {
11
11
echo " Intalling common pip packages"
12
12
13
- pip install wheel
14
- pip install " cmake>=3.19"
15
- pip install ninja
16
- pip install zstd
13
+ pip3 install wheel
14
+ pip3 install " cmake>=3.19"
15
+ pip3 install ninja
16
+ pip3 install zstd
17
17
pushd ${TORCHCHAT_ROOT}
18
- pip install -r ./requirements.txt
18
+ pip3 install -r ./requirements.txt
19
19
popd
20
20
}
21
21
@@ -44,7 +44,7 @@ install_executorch() {
44
44
echo " Installing pybind"
45
45
bash ./install_requirements.sh --pybind xnnpack
46
46
fi
47
- pip list
47
+ pip3 list
48
48
49
49
echo " Building and installing C++ libraries"
50
50
echo " Inside: ${PWD} "
Original file line number Diff line number Diff line change 1
- python scripts/download.py --repo-id $1 && python scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
1
+ python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
Original file line number Diff line number Diff line change 1
1
export MODEL_REPO=meta-llama/Llama-2-7b-chat-hf
2
2
rm -r checkpoints/$MODEL_REPO
3
- python scripts/download.py --repo-id $MODEL_REPO
4
- python scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$MODEL_REPO
5
- python generate.py --compile --checkpoint-path checkpoints/$MODEL_REPO /model.pth --max-new-tokens 100
3
+ python3 scripts/download.py --repo-id $MODEL_REPO
4
+ python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$MODEL_REPO
5
+ python3 generate.py --compile --checkpoint-path checkpoints/$MODEL_REPO /model.pth --max-new-tokens 100
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ function download_checkpoint() {
51
51
if [ " $FORCE_DOWNLOAD " = true ] || [ ! -d " $CHECKPOINT_DIR " ] || [ -z " $( ls -A " $CHECKPOINT_DIR " ) " ]; then
52
52
echo " Download checkpoint for $MODEL_REPO "
53
53
rm -rf " $CHECKPOINT_DIR "
54
- python scripts/download.py --repo-id " $MODEL_REPO "
54
+ python3 scripts/download.py --repo-id " $MODEL_REPO "
55
55
else
56
56
echo " Checkpoint directory for $MODEL_REPO is not empty. Skipping download."
57
57
fi
You can’t perform that action at this time.
0 commit comments