Skip to content

Commit

Permalink
Adding missing bias setting for the Nezha model
Browse files Browse the repository at this point in the history
  • Loading branch information
hackyon committed Feb 8, 2024
1 parent 6d50efd commit 07f49f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/nezha/modeling_nezha.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ def get_output_embeddings(self):

def set_output_embeddings(self, new_embeddings):
self.cls.predictions.decoder = new_embeddings
self.cls.predictions.bias = new_embeddings.bias

@add_start_docstrings_to_model_forward(NEZHA_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
@add_code_sample_docstrings(
Expand Down

0 comments on commit 07f49f9

Please sign in to comment.