[Refactor] Remove dead code multiple places (#60120)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-10-10 15:41:10 +00:00
committed by GitHub
parent 838526c7e5
commit 3709632ff2
12 changed files with 0 additions and 203 deletions
-3
View File
@@ -564,9 +564,6 @@ class BertMLMHead(nn.Module):
self.layer_norm = nn.LayerNorm(hidden_size, eps=layer_norm_eps)
self.decoder = nn.Linear(hidden_size, vocab_size, bias=True)
def tie_weights_with_embeddings(self, embeddings_weight: torch.Tensor):
self.decoder.weight = embeddings_weight
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
x = self.dense(hidden_states)
x = self.activation(x)