Skip to content

Commit

Permalink
Merge pull request #111 from huggingface/avoid-reloading-cached-config
Browse files Browse the repository at this point in the history
Avoid reloading available transformers config
  • Loading branch information
fxmarty authored Apr 11, 2024
2 parents 4976628 + 5c01df0 commit 746c445
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/optimum/nvidia/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,7 @@ def _from_pretrained(
except OSError:
generation_config = None

transformers_config = AutoConfig.from_pretrained(
model_id,
revision=revision,
cache_dir=cache_dir,
force_download=force_download,
proxies=proxies,
resume_download=resume_download,
local_files_only=local_files_only,
token=token,
)

transformers_config = AutoConfig.for_model(**config)
model = cls(
engines_folders,
gpus_per_node=model_kwargs.pop("gpus_per_node", 1),
Expand Down

0 comments on commit 746c445

Please sign in to comment.