Skip to content

Commit 1801f39

Browse files
author
xusenlin
committed
Fix bug for p-tuning
1 parent 553a867 commit 1801f39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ class Settings(BaseModel):
117117
description="Whether to load the model using ptuning_v2."
118118
)
119119
pre_seq_len: Optional[bool] = Field(
120-
default=get_bool_env("PRE_SEQ_LEN"),
120+
default=int(get_env("PRE_SEQ_LEN", 128)),
121+
ge=0,
121122
description="PRE_SEQ_LEN for ptuning_v2."
122123
)
123124

0 commit comments

Comments
 (0)