Update prefix.py

This commit is contained in:
DingDing 2023-02-24 19:43:46 +08:00 committed by GitHub
parent a25fb1b2aa
commit 9ff2905551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import torch
import opendelta.utils.logging as logging import opendelta.utils.logging as logging
logger = logging.get_logger(__name__) logger = logging.get_logger(__name__)
# We are going to refactor the code of Prefix Tuning.
class PrefixLayerT5(nn.Module): class PrefixLayerT5(nn.Module):
r"""A layer of prefix tuning module. The layer's forward function pass (or concatenate) the additional past_key_value r"""A layer of prefix tuning module. The layer's forward function pass (or concatenate) the additional past_key_value