From 1f9fdd661f2dc9aa2ab258c35151fa13d6c992eb Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Mon, 16 Dec 2024 14:04:12 +0100 Subject: [PATCH] test --- optimum_benchmark/backends/py_txi/backend.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/optimum_benchmark/backends/py_txi/backend.py b/optimum_benchmark/backends/py_txi/backend.py index a4c085eb..7ee11b7e 100644 --- a/optimum_benchmark/backends/py_txi/backend.py +++ b/optimum_benchmark/backends/py_txi/backend.py @@ -38,7 +38,7 @@ def load(self) -> None: self.tmpdir.cleanup() def download_pretrained_model(self) -> None: - model_snapshot_folder = snapshot_download(self.config.model, self.config.model_kwargs) + model_snapshot_folder = snapshot_download(self.config.model, **self.config.model_kwargs) if self.config.task in TEXT_GENERATION_TASKS: self.generation_config.eos_token_id = None @@ -68,11 +68,8 @@ def create_no_weights_model(self) -> None: self.generation_config.save_pretrained(save_directory=self.no_weights_model) def load_model_with_no_weights(self) -> None: - self.config.volumes = { - HUGGINGFACE_HUB_CACHE: {"bind": "/data", "mode": "rw"}, - self.tmpdir.name: {"bind": "/no_weights_folder", "mode": "rw"}, - } - original_model, self.config.model = self.config.model, "/no_weights_folder/no_weights_model/" + self.config.volumes = {self.no_weights_model: {"bind": "/no_weights_model/", "mode": "rw"}} + original_model, self.config.model = self.config.model, "/no_weights_model/" self.load_model_from_pretrained() self.config.model = original_model