Fix typing error due to Optional

`Optional` is not a valid type because it needs type parameter
This commit is contained in:
Yang, Bo 2023-05-18 07:52:50 -07:00 committed by GitHub
parent 5a58226130
commit 912cf911a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -495,7 +495,7 @@ class CausalLM(Model):
)
def forward(
self, input_ids, attention_mask, position_ids, past_key_values: Optional = None
self, input_ids, attention_mask, position_ids, past_key_values = None
) -> Tuple[torch.Tensor, List[Tuple[torch.Tensor, torch.Tensor]]]:
# Model Forward
outputs = self.model.forward(