JoshuaChak's picture
Upload folder using huggingface_hub
7c071a8 verified
|
raw
history blame
No virus
481 Bytes

Command

Export onnx

python export_onnx.py --model_path your_torch_path --device cpu

Compile bmodel

pushd /path_to/tpu-mlir
source envsetup.sh
popd

compile basic bmodel

./compile.sh --name chatglm3-6b

若想进行INT8或INT4量化,则执行以下命令,最终生成chatglm3-6b_int8_1dev.bmodelchatglm3-6b_int4_1dev.bmodel文件,如下命令:

./compile.sh --mode int8 --name chatglm3-6b # or int4