diff --git a/src/transformers/models/mega/modeling_mega.py b/src/transformers/models/mega/modeling_mega.py index 98914b439c18d5..494fff11b73f52 100644 --- a/src/transformers/models/mega/modeling_mega.py +++ b/src/transformers/models/mega/modeling_mega.py @@ -1743,7 +1743,7 @@ def forward( >>> config = AutoConfig.from_pretrained("mnaylor/mega-base-wikitext") >>> config.is_decoder = True >>> config.bidirectional = False - >>> model = MegaForCausalLM.from_pretrained("mnaylor/mega-base-wikitext", config=config) + >>> model = MegaForCausalLM.from_pretrained("mnaylor/mega-base-wikitext", config=config, ignore_mismatched_sizes=True) >>> inputs = tokenizer("Hello, my dog is cute", return_tensors="pt") >>> outputs = model(**inputs)