Vendor pinned MeZO, AGZO, LOZO and LoREN sources with independent environments. Add direct in-place fix/adjust/node training, derived history-free basis gradients, development-best checkpoints and experiment tooling. Keep models, datasets, caches and credentials outside Git. Validation: 93 project tests passed; 521 vendored author files verified.
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
|
set -euo pipefail
|
|
|
|
TASK_NAME="Copa" # can be changed to other tasks, e.g., BoolQ, RTE, SST2, Copa, CB, RTE.
|
|
SCRIPT_DIR="" # where the ZOLLM-npu repo is located
|
|
LOG_DIR="${SCRIPT_DIR}/log"
|
|
TIMESTAMP="$(date +%Y%m%d_%H%M%S)"
|
|
LOG_FILE="${LOG_DIR}/${TIMESTAMP}_zeroshot_${TASK_NAME}_pangu-1b.log"
|
|
export NPU_ID=0 # the NPU ID to use
|
|
export ASCEND_DEVICE_ID=${NPU_ID}
|
|
export ASCEND_VISIBLE_DEVICES=${NPU_ID}
|
|
export ASCEND_RT_VISIBLE_DEVICES=${NPU_ID}
|
|
export NPU_VISIBLE_DEVICES=${NPU_ID}
|
|
|
|
mkdir -p "${LOG_DIR}"
|
|
|
|
source /home/xxx/anaconda3/etc/profile.d/conda.sh # change to your anaconda path or miniconda path
|
|
conda activate zollm
|
|
|
|
cd "${SCRIPT_DIR}"
|
|
|
|
nohup python zo-bench/run.py \
|
|
--trainer=none \
|
|
--model_name=FreedomIntelligence/openPangu-Embedded-1B \
|
|
--task_name=${TASK_NAME} \
|
|
--train_as_classification \
|
|
--num_train=0 \
|
|
--num_eval=1000 \
|
|
--train_set_seed=0 \
|
|
--output_dir=result/${TASK_NAME}-zeroshot-pangu-1b \
|
|
> "${LOG_FILE}" 2>&1 &
|
|
|
|
echo "已启动 zero-shot 评测,日志存储于: ${LOG_FILE}"
|
|
|
|
|