@@ -206,11 +206,16 @@ function main() {
206
206
quant_script=" ./build/bin/quant_llama"
207
207
convert_script=" ${convert_script} /convert_llama.py"
208
208
infer_cmd=" ./build/bin/run_llama"
209
+ precision_list+=(" q5_j_i8_g128" " q3_j_i8_g128" " q5_j_i8_g128_asym" " q3_j_i8_g128_asym"
210
+ " q3_j_i8_pc_asym" " q5_j_i8_pc_asym"
211
+ )
209
212
elif [[ " ${model} " == " gptj-6b" ]]; then
210
213
quant_script=" ./build/bin/quant_gptj"
211
214
convert_script=" ${convert_script} /convert_gptj.py"
212
215
infer_cmd=" ./build/bin/run_gptj"
213
- precision_list+=(" q4_j1_i8_g128" " q4_j1_bf16_pc" )
216
+ precision_list+=(" q4_j1_i8_g128" " q4_j1_bf16_pc" " q5_j_i8_g128" " q3_j_i8_g128" " q5_j_i8_g128_asym" " q3_j_i8_g128_asym"
217
+ " q3_j_i8_pc_asym" " q5_j_i8_pc_asym"
218
+ )
214
219
elif [[ " ${model} " == " gpt-neox-20b" ]]; then
215
220
quant_script=" ./build/bin/quant_gptneox"
216
221
convert_script=" ${convert_script} /convert_gptneox.py"
@@ -421,6 +426,18 @@ function main() {
421
426
eval " $quant_script_prologue --weight_dtype int4 --group_size 32 --compute_dtype int8 --scale_dtype fp32 --alg sym"
422
427
elif [[ ${precision} == " q4_j_f32_g128" ]]; then
423
428
eval " $quant_script_prologue --weight_dtype int4 --group_size 128 --compute_dtype fp32 --scale_dtype fp32 --alg sym"
429
+ elif [[ ${precision} == " q3_j_i8_g128" ]]; then
430
+ eval " $quant_script_prologue --weight_dtype int3 --group_size 128 --compute_dtype int8 --scale_dtype fp32 --alg sym"
431
+ elif [[ ${precision} == " q5_j_i8_g128" ]]; then
432
+ eval " $quant_script_prologue --weight_dtype int5 --group_size 128 --compute_dtype int8 --scale_dtype fp32 --alg sym"
433
+ elif [[ ${precision} == " q3_j_i8_g128_asym" ]]; then
434
+ eval " $quant_script_prologue --weight_dtype int3 --group_size 128 --compute_dtype int8 --scale_dtype fp32 --alg asym"
435
+ elif [[ ${precision} == " q5_j_i8_g128_asym" ]]; then
436
+ eval " $quant_script_prologue --weight_dtype int5 --group_size 128 --compute_dtype int8 --scale_dtype fp32 --alg asym"
437
+ elif [[ ${precision} == " q3_j_i8_pc_asym" ]]; then
438
+ eval " $quant_script_prologue --weight_dtype int3 --group_size -1 --compute_dtype int8 --scale_dtype fp32 --alg asym"
439
+ elif [[ ${precision} == " q5_j_i8_pc_asym" ]]; then
440
+ eval " $quant_script_prologue --weight_dtype int5 --group_size -1 --compute_dtype int8 --scale_dtype fp32 --alg asym"
424
441
elif [[ ${precision} == " q4_j1_i8_g128" ]]; then
425
442
eval " $quant_script_prologue --weight_dtype int4 --group_size 128 --compute_dtype int8 --scale_dtype fp32 --alg asym"
426
443
elif [[ ${precision} == " q4_j1_bf16_pc" ]]; then
0 commit comments