Skip to content

Commit a45ccf4

Browse files
committed
fix errors for prompt tuning and bitfit
1 parent b1199aa commit a45ccf4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/transformers/models/bart/modeling_bart.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def __init__(
182182
bottleneck=self.config.attn_bn,
183183
adapter_layernorm_option="in",
184184
)
185-
elif self.attn_mode != 'none':
186-
raise ValueError("att_mode not supported")
185+
# elif self.attn_mode != 'none':
186+
# raise ValueError("att_mode not supported")
187187

188188
def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
189189
return tensor.view(bsz, seq_len, self.num_heads, self.head_dim).transpose(1, 2).contiguous()

src/transformers/models/mbart/modeling_mbart.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def __init__(
185185
bottleneck=self.config.attn_bn,
186186
adapter_layernorm_option="in",
187187
)
188-
elif self.attn_mode != 'none':
189-
raise ValueError("att_mode not supported")
188+
# elif self.attn_mode != 'none':
189+
# raise ValueError("att_mode not supported")
190190

191191

192192
def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):

0 commit comments

Comments
 (0)