optimum/graphcore/models/bert/modeling_bert.py
def deparallelize(self):
        """
        Undo the changes to the model done by `parallelize`.
        You should call this before doing `save_pretrained` so that the `model.state_dict` is
        compatible with the original model.
        """
        super().deparallelize()

        for layer in self.bert.encoder.layer:
            layer.attention.self.__class__ = BertSelfAttention

        # Deserialize the serialized word embedding
        if self.ipu_config.embedding_serialization_factor > 1:
            self.bert.embeddings.word_embeddings = self.bert.embeddings.word_embeddings.deserialize()
        return self

        Undo the changes to the model done by `parallelize`.
        You should call this before doing `save_pretrained` so that the `model.state_dict` is
        compatible with the original model.
        
Undo the changes to the model done by `parallelize`.
You should call this before doing `save_pretrained` so that the `model.state_dict` is
compatible with the original model.
Undo the changes to the model done by ` parallelize ` . You should call this before doing ` save_pretrained ` so that the ` model . state_dict ` is compatible with the original model .
def deparallelize(self):
        super().deparallelize()
        for layer in self.bert.encoder.layer:
            layer.attention.self.__class__ = BertSelfAttention
        if self.ipu_config.embedding_serialization_factor > 1:
            self.bert.embeddings.word_embeddings = self.bert.embeddings.word_embeddings.deserialize()
        return self
def deparallelize ( self ) : super ( ) . deparallelize ( ) for layer in self . bert . encoder . layer : layer . attention . self . __class__ = BertSelfAttention if self . ipu_config . embedding_serialization_factor > 1 : self . bert . embeddings . word_embeddings = self . bert . embeddings . word_embeddings . deserialize ( ) return self
Undo the changes to the model done by `parallelize`.
Undo the changes to the model done by ` parallelize ` .
"""
        Undo the changes to the model done by `parallelize`.
        You should call this before doing `save_pretrained` so that the `model.state_dict` is
        compatible with the original model.
        """ # Deserialize the serialized word embedding
self