Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Model]add t5-encoder-model #3168

Merged
merged 19 commits into from
Sep 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update type hinting
  • Loading branch information
wj-Mcat committed Sep 16, 2022
commit 998fbc3b3a1a283233c15663bf5069518ef8217b
4 changes: 2 additions & 2 deletions paddlenlp/transformers/t5/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from __future__ import annotations

import math
from typing import Optional, Tuple, Union
from typing import Optional, Tuple, Union, List

import numpy as np
import paddle
Expand Down Expand Up @@ -1816,7 +1816,7 @@ def forward(
attention_mask: Optional[Tensor] = None,
encoder_hidden_states: Optional[Tuple[Tensor]] = None,
encoder_attention_mask: Optional[Tensor] = None,
cache: Optional[MultiHeadAttention.Cache] = None,
cache: Optional[List[MultiHeadAttention.Cache]] = None,
use_cache: Optional[bool] = False,
output_attentions: Optional[bool] = False,
output_hidden_states: Optional[bool] = False,
Expand Down