temp_ss / script /run_replaceme_qwen.sh
LJYAI's picture
upload script
3738140 verified
raw
history blame contribute delete
942 Bytes
#!/usr/bin/env bash
set -euo pipefail
export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-3}"
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
workdir="$repo_root/compare_model/ReplaceMe"
default_config="$workdir/examples/qwen3_1.7b_replaceme_lstsq_skip14_common.yaml"
config_path="${CONFIG_PATH:-$default_config}"
mkdir -p "$repo_root/results/llama_7b_replaceme_common_14"
git_commit="unknown"
if git -C "$repo_root" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git_commit=$(git -C "$repo_root" rev-parse HEAD)
fi
{
echo "git_commit=$git_commit"
echo "config_path=$config_path"
echo "command:"
printf '%q ' python "$repo_root/compare_model/ReplaceMe/run_replaceme_qwen.py" --config "$config_path"
echo
} > "$repo_root/results/llama_7b_replaceme_common_14/run_args.txt"
cd "$workdir"
PYTHONPATH="$workdir:$repo_root${PYTHONPATH:+:$PYTHONPATH}" \
python run_replaceme_qwen.py --config "$config_path" "$@"