Views
No views yet
1export MODEL_DIR = [local model checkpoint folder] or meta-llama/Meta-Llama-3.2-1B-Instruct-hf
2# single GPU
3python3 quantize_quark.py --model_dir $MODEL_DIR \
4 --data_type bfloat16 \
5 --quant_scheme w_uint4_per_group_asym \
6 --num_calib_data 128 \
7 --quant_algo awq \
8 --dataset pileval_for_awq_benchmark \
9 --seq_len 512 \
10 --output_dir $MODEL_NAME-awq-uint4-asym-g128-bf16-lmhead \
11 --exclude_layers \
12 --model_export quark_safetensors \
13 --custom_mode awq \
14# cpu
15python3 quantize_quark.py --model_dir $MODEL_DIR \
16 --data_type bfloat16 \
17 --quant_scheme w_uint4_per_group_asym \
18 --num_calib_data 128 \
19 --quant_algo awq \
20 --dataset pileval_for_awq_benchmark \
21 --seq_len 512 \
22 --output_dir $MODEL_NAME-awq-uint4-asym-g128-bf16-lmhead \
23 --exclude_layers \
24 --model_export quark_safetensors \
25 --custom_mode awq \
26 --device cpu| Benchmark | Meta-Llama-3.2-1B-Instruct-hf(Bfloat16) | Meta-Llama-3.2-1B-Instruct-awq-uint4-asym-g128-bf16(this model) |
| Perplexity-wikitext2 | 13.1586 | 14.8471 |
http://www.apache.org/licenses/LICENSE-2.0