From 28b91ce6b38066ffa59a140df8c3ed2dc74d4dc8 Mon Sep 17 00:00:00 2001 From: root <403644786@qq.com> Date: Tue, 30 Jul 2024 14:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quantize/bnb_quantize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantize/bnb_quantize.py b/quantize/bnb_quantize.py index 643f213..205cd28 100644 --- a/quantize/bnb_quantize.py +++ b/quantize/bnb_quantize.py @@ -19,9 +19,9 @@ import GPUtil import os model_path = '/root/ld/ld_model_pretrained/MiniCPM-Llama3-V-2_5' # Model download path -device = 'cpu' # # Select GPU if available, otherwise CPU +device = 'cuda' # Select GPU if available, otherwise CPU save_path = '/root/ld/ld_model_pretrain/MiniCPM-Llama3-V-2_5_int4' # Quantized model save path -image_path = '/root/ld/ld_project/pull_request/MiniCPM-V/assets/airplane.jpeg' +image_path = './assets/airplane.jpeg' # Create a configuration object to specify quantization parameters quantization_config = BitsAndBytesConfig(