From d5ef27f0be6fe6343ee5e580d363f060ae66a19f Mon Sep 17 00:00:00 2001 From: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Date: Thu, 25 May 2023 22:37:33 +0200 Subject: [PATCH] [`Nllb-Moe`] Fix nllb moe accelerate issue (#23758) fix nllb moe accelerate issue --- src/transformers/models/nllb_moe/modeling_nllb_moe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/models/nllb_moe/modeling_nllb_moe.py b/src/transformers/models/nllb_moe/modeling_nllb_moe.py index 567b03c1c4bbe0..b6ea574469ee80 100644 --- a/src/transformers/models/nllb_moe/modeling_nllb_moe.py +++ b/src/transformers/models/nllb_moe/modeling_nllb_moe.py @@ -856,7 +856,7 @@ class NllbMoePreTrainedModel(PreTrainedModel): config_class = NllbMoeConfig base_model_prefix = "model" supports_gradient_checkpointing = True - _no_split_modules = ["NllbMoeAttention"] + _no_split_modules = ["NllbMoeEncoderLayer", "NllbMoeDecoderLayer"] def _init_weights(self, module): """Initialize the weights"""