add no split modules for xlmrobertaxl (#31223)

This commit is contained in:
Manuel Faysse 2024-06-04 16:46:19 +02:00 committed by GitHub
parent 821b772ab9
commit 2965b20459
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -572,6 +572,7 @@ class XLMRobertaXLPreTrainedModel(PreTrainedModel):
config_class = XLMRobertaXLConfig
base_model_prefix = "roberta"
_no_split_modules = ["XLMRobertaXLEmbeddings", "XLMRobertaXLSelfAttention"]
# Copied from transformers.models.bert.modeling_bert.BertPreTrainedModel._init_weights
def _init_weights(self, module):