From 8ffed1c502265c0458718b8c38909f037a73d46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=83=81=ED=98=B8=20Sangho=20Park?= Date: Thu, 28 Aug 2025 10:47:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=96=91=EC=9E=90=ED=99=94=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=97=90=20=EB=94=B0=EB=9D=BC=20device=5Fmap=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=A0=84=ED=99=98=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AI_Web_Scraper/model_downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI_Web_Scraper/model_downloader.py b/AI_Web_Scraper/model_downloader.py index 9eddeba..c4e2d99 100644 --- a/AI_Web_Scraper/model_downloader.py +++ b/AI_Web_Scraper/model_downloader.py @@ -35,7 +35,7 @@ def download_model(config_path='./config.json'): model_name, cache_dir=local_path, quantization_config=quantization_config, - device_map="cpu", # 다운로드 시 CPU에 로드하여 메모리 절약 + device_map="auto" if quantization_config else "cpu", # 양자화 시 auto, 아니면 cpu torch_dtype="auto" ) tokenizer = AutoTokenizer.from_pretrained(