Skip to content

Commit

Permalink
fix accelerate tests for roberta xl (huggingface#31288)
Browse files Browse the repository at this point in the history
* fix accelerate tests for roberta xl

* style
  • Loading branch information
SunMarc authored Jun 6, 2024
1 parent 5ba8ac5 commit 99895ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ class XLMRobertaXLPreTrainedModel(PreTrainedModel):

config_class = XLMRobertaXLConfig
base_model_prefix = "roberta"
_no_split_modules = ["XLMRobertaXLEmbeddings", "XLMRobertaXLSelfAttention"]
_no_split_modules = ["XLMRobertaXLEmbeddings", "XLMRobertaXLLayer"]

# Copied from transformers.models.bert.modeling_bert.BertPreTrainedModel._init_weights
def _init_weights(self, module):
Expand Down
2 changes: 2 additions & 0 deletions tests/models/xlm_roberta_xl/test_modeling_xlm_roberta_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ class XLMRobertaXLModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTes
else {}
)

model_split_percents = [0.5, 0.85, 0.95]

# TODO: Fix the failed tests
def is_pipeline_test_to_skip(
self, pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name
Expand Down

0 comments on commit 99895ae

Please sign in to comment.