#!/bin/bash set -e # Recreate the audiogen vLLM checkpoint as symlinks into the full checkpoint. # Resolves the model root from this script's location, so it is safe to run # from any working directory. ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # Alternative (copy instead of symlink): # cp -r "$ROOT"/checkpoint_folder_full/model-*-of-00002.safetensors "$ROOT"/checkpoint_folder_audiogen/ cd "$ROOT/checkpoint_folder_audiogen" for i in {01..02}; do ln -sfn ../checkpoint_folder_full/model-000${i}-of-00002.safetensors model-000${i}-of-00002.safetensors done echo "Linked 2 audiogen shards -> ../checkpoint_folder_full/ in $ROOT/checkpoint_folder_audiogen"