Files
experiments_codebase/baselines/agzo/run_fo_pangu-1b.sh
T
gloamxun e0feabec8f Initialize optimizer research workspace with official baselines and history-free coverage
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.
2026-11-12 23:32:33 +08:00

44 lines
1.3 KiB
Bash

#!/usr/bin/env bash
source /usr/local/Ascend/ascend-toolkit/set_env.sh
set -euo pipefail
TASK_NAME="WIC" # 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}_fo_${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=sgd \
--model_name=FreedomIntelligence/openPangu-Embedded-1B \
--task_name=${TASK_NAME} \
--train_as_classification \
--num_train_epochs=5 \
--per_device_train_batch_size=8 \
--learning_rate=5e-6 \
--weight_decay=0 \
--lr_scheduler_type=constant \
--eval_strategy=steps \
--eval_steps=25 \
--max_steps=1000 \
--logging_steps=10 \
--num_eval=638 \
--num_train=1000 \
--num_dev=500 \
--train_set_seed=0 \
--output_dir=result/${TASK_NAME}-fo-sgd-pangu-1b \
> "${LOG_FILE}" 2>&1 &
echo "已启动fo训练,日志存储于: ${LOG_FILE}"