Skip to content

Commit

Permalink
tstesco/fix-setup (#85)
Browse files Browse the repository at this point in the history
* fix casing

* clean up HF setup venv before repacking
  • Loading branch information
tstescoTT authored Jan 31, 2025
1 parent 78dea02 commit 7909845
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,95 +121,95 @@ setup_model_environment() {
META_DIR_FILTER=""
REPACKED=1
;;
"llama-3.3-70b-instruct")
"Llama-3.3-70B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.3-70B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.3-70B-Instruct"
META_MODEL_NAME=""
META_DIR_FILTER=""
REPACKED=1
;;
"llama-3.2-11b-vision-instruct")
"Llama-3.2-11B-Vision-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.2-11B-Vision-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.2-11B-Vision-Instruct"
META_MODEL_NAME=""
META_DIR_FILTER=""
REPACKED=0
;;
"llama-3.2-3b-instruct")
"Llama-3.2-3B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.2-3B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.2-3B-Instruct"
META_MODEL_NAME=""
META_DIR_FILTER=""
REPACKED=0
;;
"llama-3.2-1b-instruct")
"Llama-3.2-1B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.2-1B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.2-1B-Instruct"
META_MODEL_NAME=""
META_DIR_FILTER=""
REPACKED=0
;;
"llama-3.1-70b-instruct")
"Llama-3.1-70B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.1-70B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.1-70B-Instruct"
META_MODEL_NAME="Meta-Llama-3.1-70B-Instruct"
META_DIR_FILTER="llama3_1"
REPACKED=1
;;
"llama-3.1-70b")
"Llama-3.1-70B")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.1-70B"
HF_MODEL_REPO_ID="meta-llama/Llama-3.1-70B"
META_MODEL_NAME="Meta-Llama-3.1-70B"
META_DIR_FILTER="llama3_1"
REPACKED=1
;;
"llama-3.1-8b-instruct")
"Llama-3.1-8B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.1-8B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3.1-8B-Instruct"
META_MODEL_NAME="Meta-Llama-3.1-8B-Instruct"
META_DIR_FILTER="llama3_1"
REPACKED=0
;;
"llama-3.1-8b")
"Llama-3.1-8B")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3.1-8B"
HF_MODEL_REPO_ID="meta-llama/Llama-3.1-8B"
META_MODEL_NAME="Meta-Llama-3.1-8B"
META_DIR_FILTER="llama3_1"
REPACKED=0
;;
"llama-3-70b-instruct")
"Llama-3-70B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3-70B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3-70B-Instruct"
META_MODEL_NAME="Meta-Llama-3-70B-Instruct"
META_DIR_FILTER="llama3"
REPACKED=1
;;
"llama-3-70b")
"Llama-3-70B")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3-70B"
HF_MODEL_REPO_ID="meta-llama/Llama-3-70B"
META_MODEL_NAME="Meta-Llama-3-70B"
META_DIR_FILTER="llama3"
REPACKED=1
;;
"llama-3-8b-instruct")
"Llama-3-8B-Instruct")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3-8B-Instruct"
HF_MODEL_REPO_ID="meta-llama/Llama-3-8B-Instruct"
META_MODEL_NAME="Meta-Llama-3-8B-Instruct"
META_DIR_FILTER="llama3"
REPACKED=0
;;
"llama-3-8b")
"Llama-3-8B")
IMPL_ID="tt-metal"
MODEL_NAME="Llama-3-8B"
HF_MODEL_REPO_ID="meta-llama/Llama-3-8B"
Expand Down Expand Up @@ -489,17 +489,17 @@ setup_weights_huggingface() {
mv "${WEIGHTS_DIR}/consolidated.pth" "${WEIGHTS_DIR}/consolidated.00.pth"
fi

# Step 6: Process and copy weights
# Step 6: Cleanup HF setup venv
deactivate
rm -rf ${VENV_NAME}

# Step 7: Process and copy weights
if [ "${REPACKED}" -eq 1 ]; then
REPACKED_WEIGHTS_DIR="${PERSISTENT_VOLUME}/model_weights/${REPACKED_STR}${MODEL_NAME}"
mkdir -p "${REPACKED_WEIGHTS_DIR}"
repack_weights "${WEIGHTS_DIR}" "${REPACKED_WEIGHTS_DIR}"
fi

# Step 7: Cleanup
deactivate
rm -rf ${VENV_NAME}

echo "using weights directory: ${PERSISTENT_VOLUME}/model_weights/${REPACKED_STR}${MODEL_NAME}"
echo "✅ setup_weights_huggingface completed!"
}
Expand Down

0 comments on commit 7909845

Please sign in to comment.