You need to subclass it to have the save_pretrained methods available. So instead of
class Mean_Pooling_Model(nn.Module):

use
from transformers.modeling_utils import PreTrainedModel
class Mean_Pooling_Model(PreTrainedModel):

It will add extra functionality on top of nn.Module.

  

      github.com
  

  
    huggingface/transformers/blob/bcc3f7b6560c1ed427f051107c7755956a27a9f2/src/transformers/modeling_utils.py#L415 2



      
      
                      exclude_embeddings (:obj:`bool`, `optional`, defaults to :obj:`True`):
                          Whether or not to count embedding and softmax operations.
          
          
        Returns:
                      :obj:`int`: The number of floating-point operations.
                  """
          
          
        return 6 * self.estimate_tokens(input_dict) * self.num_parameters(exclude_embeddings=exclude_embeddings)
          
          

          
class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMixin):
              r"""
              Base class for all models.
          
          
    :class:`~transformers.PreTrainedModel` takes care of storing the configuration of the models and handles methods
              for loading, downloading and saving models as well as a few methods common to all models to:
          
          
        * resize the input embeddings,
                  * prune heads in the self-attention heads.
          
          
    Class attributes (overridden by derived classes):