Skip to content

Commit

Permalink
Patch *ForCausalLM model (#9092)
Browse files Browse the repository at this point in the history
  • Loading branch information
LysandreJik authored Dec 14, 2020
1 parent 51d9c56 commit 6587cf9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,12 @@ def __init__(self, config, *inputs, **kwargs):
def get_output_embeddings(self):
return self.{{cookiecutter.lowercase_modelname}}.embeddings

def get_output_layer_with_bias(self):
return self.mlm.predictions

def get_prefix_bias_name(self):
return self.name + "/" + self.mlm.name + "/" + self.mlm.predictions.name

@add_code_sample_docstrings(
tokenizer_class=_TOKENIZER_FOR_DOC,
checkpoint="{{cookiecutter.checkpoint_identifier}}",
Expand Down

0 comments on commit 6587cf9

Please sign in to comment.