Skip to content

Commit

Permalink
fix normalization, stop relying on bashisms
Browse files Browse the repository at this point in the history
Signed-off-by: Eli Uriegas <[email protected]>
  • Loading branch information
seemethere committed Apr 23, 2024
1 parent 9177df3 commit fd4e943
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .ci/scripts/download_llama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ download_checkpoint() {
local repo_name=$1
local include=$2
# basically just removes the org in <org>/<repo>
local local_dir=${repo_name##/*}
local local_dir="checkpoints/$(basename "${repo_name}")"

mkdir -p "${local_dir}"
huggingface-cli download \
Expand All @@ -21,11 +21,11 @@ download_checkpoint() {
--local-dir "${local_dir}"
}

normalize_llama_checpoint() {
normalize_llama_checkpoint() {
# normalizes the checkpoint file into something that the rest of
# the testing scripts understand
local repo_name=$1
local local_dir=${repo_name##/*}
local local_dir="checkpoints/$(basename "${repo_name}")"
mkdir -p "${local_dir}"
mv "${local_dir}/original/*" "${local_dir}"
mv "${local_dir}/consolidated.00.pth" "${local_dir}/model.pth"
Expand All @@ -40,4 +40,4 @@ fi
# TODO: Eventually you could extend this to download different models
# taking in some arguments similar to .ci/scripts/wget_checkpoint.sh
download_checkpoint "meta-llama/Meta-Llama-3-8B" "original/*"
normalize_llama_checpoint "meta-llama/Meta-Llama-3-8B"
normalize_llama_checkpoint "meta-llama/Meta-Llama-3-8B"

0 comments on commit fd4e943

Please sign in to comment.