ipex-llm icon indicating copy to clipboard operation
ipex-llm copied to clipboard

when using saved glm-4v-9b low bit model with pictures, error would ocurr.

Open wluo1007 opened this issue 1 year ago • 2 comments

Platform: MTL iGPU, 64G DDR5, ubuntu 22.04 test_glm-4v-9b.zip In the attachment, convert_ipex_model.py is for converting the glm-4v-9b model to low bit model and save to local dir. generate_glm4v_xpu.py is for inferencing.

after using the converted low bit model with picture, error would happen.

python generate_glm4v_xpu.py --model-path glm-4v-quantized/ --image-path 5602445367_3504763978_z.jpg --load-low-bit

1

when using the converted low bit model without picture, it can work. 3

when using the original model, it works fine. python generate_glm4v_xpu.py --model-path glm-4v-9b/ --image-path 5602445367_3504763978_z.jpg 2

Thanks!

wluo1007 avatar Sep 27 '24 08:09 wluo1007

We have reproduced your issue and are currently working on a fix.

qiuxin2012 avatar Sep 30 '24 00:09 qiuxin2012

It's a bug of tokenizer.save in transformers, the image_size is missing in the saved tokenizer_config.json, you can add a line "image_size": 1120 to [your int4 model path]/tokenizer_config.json. Or just load tokenizer from the origin model.

qiuxin2012 avatar Oct 08 '24 01:10 qiuxin2012