"tests/models/bart/test_modeling_bart.py" did not exist on "abc573f51ac52c13cf127f614151b64faa54babf"
Unverified Commit 6587cf9f authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Patch *ForCausalLM model (#9092)

parent 51d9c569
......@@ -872,6 +872,12 @@ class TF{{cookiecutter.camelcase_modelname}}ForCausalLM(TF{{cookiecutter.camelca
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}}",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment