Fix spec error caused by lookup pr (#10777)

* Fix spec error

* remove

* fix style
This commit is contained in:
Yina Chen 2024-04-17 11:27:35 +08:00 committed by GitHub
parent 9e5069437f
commit 766fe45222
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -594,7 +594,7 @@ def _non_cpu_ipex_verify(self, verify_input_ids, past_key_values, cur_attention_
"return_dict": return_dict,
"use_cache": use_cache,
}
if cur_attention_mask:
if cur_attention_mask is not None:
forward_args["attention_mask"] = cur_attention_mask
if self.config.model_type == "chatglm":

View file

@ -336,6 +336,7 @@ def get_modelscope_hf_config(model_id_or_path: str,
local_path = model_id_or_path
return Config._file2dict(local_path)
def is_torch_bf16_gpu_available():
# always true for XPU and CPU
return True