Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/scripts/convert_checkpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function convert_checkpoint() {
return 0
fi
echo "Convert Huggingface checkpoint for $MODEL_REPO"
python scripts/convert_hf_checkpoint.py --checkpoint-dir "checkpoints/$MODEL_REPO"
python3 scripts/convert_hf_checkpoint.py --checkpoint-dir "checkpoints/$MODEL_REPO"
}


Expand Down
2 changes: 1 addition & 1 deletion .ci/scripts/gather_test_models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
Expand Down
68 changes: 34 additions & 34 deletions .ci/scripts/validate.sh

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions scripts/install_et.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ set -exu
install_pip_dependencies() {
echo "Intalling common pip packages"

pip install wheel
pip install "cmake>=3.19"
pip install ninja
pip install zstd
pip3 install wheel
pip3 install "cmake>=3.19"
pip3 install ninja
pip3 install zstd
pushd ${TORCHCHAT_ROOT}
pip install -r ./requirements.txt
pip3 install -r ./requirements.txt
popd
}

Expand Down Expand Up @@ -44,7 +44,7 @@ install_executorch() {
echo "Installing pybind"
bash ./install_requirements.sh --pybind xnnpack
fi
pip list
pip3 list

echo "Building and installing C++ libraries"
echo "Inside: ${PWD}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python scripts/download.py --repo-id $1 && python scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
6 changes: 3 additions & 3 deletions scripts/test_flow.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export MODEL_REPO=meta-llama/Llama-2-7b-chat-hf
rm -r checkpoints/$MODEL_REPO
python scripts/download.py --repo-id $MODEL_REPO
python scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$MODEL_REPO
python generate.py --compile --checkpoint-path checkpoints/$MODEL_REPO/model.pth --max-new-tokens 100
python3 scripts/download.py --repo-id $MODEL_REPO
python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$MODEL_REPO
python3 generate.py --compile --checkpoint-path checkpoints/$MODEL_REPO/model.pth --max-new-tokens 100
2 changes: 1 addition & 1 deletion scripts/workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function download_checkpoint() {
if [ "$FORCE_DOWNLOAD" = true ] || [ ! -d "$CHECKPOINT_DIR" ] || [ -z "$(ls -A "$CHECKPOINT_DIR")" ]; then
echo "Download checkpoint for $MODEL_REPO"
rm -rf "$CHECKPOINT_DIR"
python scripts/download.py --repo-id "$MODEL_REPO"
python3 scripts/download.py --repo-id "$MODEL_REPO"
else
echo "Checkpoint directory for $MODEL_REPO is not empty. Skipping download."
fi
Expand Down