File size: 1,129 Bytes
55c92b3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | export HTTP_PROXY=http://sys-proxy-rd-relay.byted.org:8118
export http_proxy=http://sys-proxy-rd-relay.byted.org:8118
export https_proxy=http://sys-proxy-rd-relay.byted.org:8118
export no_proxy="$no_proxy,.byteintl.net"
export HF_ENDPOINT=https://hf-mirror.com
model_id=/mnt/bn/life-mllm/users/cxr/quantization/models/Qwen/Qwen2.5-7B
model_name=$(basename "$model_id")
model=/mnt/bn/life-mllm/users/cxr/quantization/models/${model_name}-quantization-fg
# output_dir=Alpha_values_mlp
# bit_layers_dir=/mnt/bn/life-mllm/users/cxr/quantization/quantization_metric/bit_layers
# result_dir=/mnt/bn/life-mllm/users/cxr/quantization/lm-evaluation-harness/results
start=$(date +%s.%N)
# rm -rf $model
cd ../quantization_metric
self_attn_layer_to_quant="4 1 2 8 23"
mlp_layer_to_quant="27 16 19 17 25"
python -u main_low.py --cuda_id 1 --bit_layers --save_dir ${model} --model_id $model_id --mlp_layer_to_quant "${mlp_layer_to_quant}"
cd ../lm-evaluation-harness
bash run_scripts/eval_base_fg.sh ${model} "fg"
rm -rf ${model}
end=$(date +%s.%N)
runtime=$(awk "BEGIN {print $end - $start}")
echo "Execution time: $runtime seconds"
|