Avoid tokenizer bug for XPU CI (#3563)

Co-authored-by: K11OntheBoat <“ruianmaidanglao@163.com”>
This commit is contained in:
K11OntheBoat
2025-08-23 00:09:56 +08:00
committed by GitHub
parent 93d999b830
commit 8b9f167ccc

View File

@@ -129,7 +129,7 @@ def update_think_end_id_for_ernie(fd_config: FDConfig) -> None:
if it exists, otherwise defaults to None.
"""
is_ernie = ErnieArchitectures.contains_ernie_arch(fd_config.model_config.architectures)
if is_ernie:
if current_platform.is_cuda() and is_ernie:
tokenizer = ErnieBotTokenizer.from_pretrained(
fd_config.model_config.model,
model_max_length=fd_config.parallel_config.max_model_len,