yuccaaa commited on
Commit
2f52fd7
·
verified ·
1 Parent(s): 102c514

Upload ms-swift/examples/export/quantize/bert/gptq.sh with huggingface_hub

Browse files
ms-swift/examples/export/quantize/bert/gptq.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # merge-lora
2
+ CUDA_VISIBLE_DEVICES=0 swift export \
3
+ --adapters swift/test_bert \
4
+ --output_dir output/swift_test_bert_merged \
5
+ --merge_lora true
6
+
7
+ # gptq quantize
8
+ CUDA_VISIBLE_DEVICES=0 swift export \
9
+ --model output/swift_test_bert_merged \
10
+ --load_data_args true \
11
+ --output_dir output/swift_test_bert_gptq_int4 \
12
+ --quant_bits 4 \
13
+ --quant_method gptq \
14
+ --max_length 512
15
+
16
+ # infer
17
+ CUDA_VISIBLE_DEVICES=0 swift infer \
18
+ --model output/swift_test_bert_gptq_int4