We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd0297f commit f3b2d99Copy full SHA for f3b2d99
llm/predict/predictor.py
@@ -135,16 +135,15 @@ class PredictorArgument:
135
)
136
137
total_max_length: int = field(
138
- default=8192, metadata={"help": "Super parameter. Maximum sequence length(encoder+decoder)."}
+ default=2048, metadata={"help": "Super parameter. Maximum sequence length(encoder+decoder)."}
139
140
141
- def __post_init__(self):
142
- if self.device == "npu":
143
- self.total_max_length = self.src_length + self.max_length
144
-
145
def __post_init__(self):
146
if self.append_attn:
147
self.block_attn = True
+ assert (
+ self.src_length + self.max_length <= self.total_max_length
+ ), "src_length + max_length should smaller than total_max_length."
148
149
150
@dataclass
0 commit comments