Skip to content

Commit 2a86928

Browse files
committed
[BugFix Revert] Fix vocab size error for ernie model
1 parent b1c53fa commit 2a86928

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fastdeploy/worker/worker_process.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,7 @@ def initialize_fd_config(config_or_args) -> FDConfig:
735735

736736
# Handle vocabulary size
737737
model_config.ori_vocab_size = model_config_dict.get("vocab_size", -1)
738-
archs = model_config_dict.get("architectures", [])
739-
if "Ernie4_5_ForCausalLM" in archs or "Ernie4_5_MoeForCausalLM" in archs:
738+
if "Ernie4_5_ForCausalLM" in model_config_dict.get("architectures", []):
740739
model_config.ori_vocab_size = getattr(config_or_args, 'ori_vocab_size', model_config.ori_vocab_size)
741740

742741
# Handle DeepseekV3 specific config

0 commit comments

Comments
 (0)