Skip to content

Commit 971e366

Browse files
authored
Change how to load config of XLNetLMHeadModel (huggingface#14746)
1 parent 15a9d01 commit 971e366

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/pytorch/language-modeling/run_plm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def main():
348348
)
349349
else:
350350
logger.info("Training new model from scratch")
351-
model = XLNetLMHeadModel.from_config(config)
351+
model = XLNetLMHeadModel(config)
352352

353353
model.resize_token_embeddings(len(tokenizer))
354354

0 commit comments

Comments
 (0)