diff --git a/engines/python/setup/djl_python/huggingface.py b/engines/python/setup/djl_python/huggingface.py index ebccb05ad..a19b5619b 100644 --- a/engines/python/setup/djl_python/huggingface.py +++ b/engines/python/setup/djl_python/huggingface.py @@ -409,7 +409,7 @@ def _init_tokenizer(self, model_id_or_path: str): path_to_use = model_id_or_path if self.peft_config is None else self.peft_config.base_model_name_or_path self.tokenizer = AutoTokenizer.from_pretrained( path_to_use, - padding_size="left", + padding_side="left", trust_remote_code=self.hf_configs.trust_remote_code, revision=self.hf_configs.revision, ) diff --git a/serving/docker/partition/utils.py b/serving/docker/partition/utils.py index a8798dfc2..802523085 100644 --- a/serving/docker/partition/utils.py +++ b/serving/docker/partition/utils.py @@ -128,7 +128,7 @@ def remove_option_from_properties(properties: dict): def init_hf_tokenizer(model_id_or_path: str, hf_configs): tokenizer = AutoTokenizer.from_pretrained( model_id_or_path, - padding_size="left", + padding_side="left", trust_remote_code=hf_configs.trust_remote_code, revision=hf_configs.revision, )