Download annotations/annotation_104/LLM-Pruner/scripts/evaluate.sh from mcy98/RECODE-H: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_104/LLM-Pruner/scripts/evaluate.sh
- Command line
-
hf download hf://datasets/mcy98/RECODE-H/annotations/annotation_104/LLM-Pruner/scripts/evaluate.sh
-
curl -L -o evaluate.sh https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_104/LLM-Pruner/scripts/evaluate.sh
744 Bytes
| export PYTHONPATH='.' | |
| base_model=$1 # e.g., decapoda-research/llama-7b-hf | |
| tune_ckpt_name=$2 | |
| prune_ckpt=$3 | |
| epochs=("${@:4}") | |
| for epoch in "${epochs[@]}"; | |
| do | |
| cp $tune_ckpt_name/adapter_config.json $tune_ckpt_name/checkpoint-$epoch/ | |
| mv $tune_ckpt_name/checkpoint-$epoch/pytorch_model.bin $tune_ckpt_name/checkpoint-$epoch/adapter_model.bin | |
| tune_id="${tune_ckpt_name##*/}" | |
| python lm-evaluation-harness/main.py --model hf-causal-experimental --model_args checkpoint=$prune_ckpt/pytorch_model.bin,peft=$tune_ckpt_name/checkpoint-$epoch,config_pretrained=$base_model --tasks openbookqa,arc_easy,winogrande,hellaswag,arc_challenge,piqa,boolq --device cuda:0 --output_path results/${tune_id}_$epoch.json --no_cache | |
| done | |