Download MemGen-main/scripts/eval.sh from Ouzhang/low-high-reference: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/datasets/Ouzhang/low-high-reference/resolve/main/MemGen-main/scripts/eval.sh
- Command line
-
hf download hf://datasets/Ouzhang/low-high-reference/MemGen-main/scripts/eval.sh
-
curl -L -o eval.sh https://huggingface.co/datasets/Ouzhang/low-high-reference/resolve/main/MemGen-main/scripts/eval.sh
1.99 kB
| export DEBUG_MODE=true | |
| export LOG_PATH="./debug_log_2b.txt" | |
| export CUDA_VISIBLE_DEVICES=0 | |
| export MAIN_PROCESS_PORT=29508 | |
| NUM_GPUS=$(echo $CUDA_VISIBLE_DEVICES | tr ',' '\n' | wc -l) | |
| echo "Using $NUM_GPUS GPU(s): CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES" | |
| export NCCL_DEBUG=INFO | |
| export NCCL_IB_DISABLE=1 | |
| export NCCL_P2P_DISABLE=1 | |
| export NCCL_ASYNC_DISABLE=1 | |
| # options: | |
| # - Qwen/Qwen2.5-1.5B-Instruct | |
| # - HuggingFaceTB/SmolLM3-3B | |
| REASONER_MODEL="Qwen/Qwen2.5-1.5B-Instruct" | |
| WEAVER_MODEL="Qwen/Qwen2.5-1.5B-Instruct" | |
| TRIGGER_MODEL="Qwen/Qwen2.5-1.5B-Instruct" | |
| TRIGGER_ACTIVE=False | |
| # Dataset configs | |
| DATASET_NAME="kodcode" # gsm8k, gpqa, kodcode, triviaqa | |
| # MemGen configs | |
| # Augmentation configs: | |
| # - For gsm8k, gpqa, kodcode: MAX_PROMPT_AUG_NUM=1, MAX_INFERENCE_AUG_NUM=5 | |
| # - For triviaqa: MAX_PROMPT_AUG_NUM=8, MAX_INFERENCE_AUG_NUM=0 | |
| MAX_PROMPT_AUG_NUM=1 | |
| MAX_INFERENCE_AUG_NUM=0 | |
| PROMPT_LATENTS_LEN=16 | |
| INFERENCE_LATENTS_LEN=16 | |
| BATCH_SIZE=4 | |
| # Trained model path: | |
| # - Must point to a checkpoint file ending with .safetensors (e.g. <output_dir>/model.safetensors) | |
| # - Required when evaluating the model | |
| LOAD_MODEL_PATH="" | |
| # evaluate | |
| python -m accelerate.commands.launch \ | |
| --config_file=configs/zero2.yaml \ | |
| --num_processes=${NUM_GPUS} \ | |
| main.py \ | |
| --cfg-path configs/latent_memory/${DATASET_NAME}.yaml \ | |
| --options \ | |
| model.model_name ${REASONER_MODEL} \ | |
| model.load_model_path ${LOAD_MODEL_PATH} \ | |
| model.max_prompt_aug_num ${MAX_PROMPT_AUG_NUM} \ | |
| model.max_inference_aug_num ${MAX_INFERENCE_AUG_NUM} \ | |
| model.weaver.model_name ${WEAVER_MODEL} \ | |
| model.weaver.prompt_latents_len ${PROMPT_LATENTS_LEN} \ | |
| model.weaver.inference_latents_len ${INFERENCE_LATENTS_LEN} \ | |
| model.trigger.model_name ${TRIGGER_MODEL} \ | |
| model.trigger.active ${TRIGGER_ACTIVE} \ | |
| run.mode evaluate \ | |
| run.interaction.batch_size ${BATCH_SIZE} \ | |
| run.interaction.temperature 0.0 \ | |
| run.interaction.max_response_length 1024 \ |