def __init__(
        self,
        model_name="unilm-base-cased",
        to_lower=False,
        cache_dir=".",
        load_model_from_dir=None,
        model_file_name=None,
        label_smoothing=0.1,
        max_seq_length=512,
        max_source_seq_length=464,
        max_target_seq_length=48,
    ):
        """
        Abstractive summarizer based on s2s-ft.

        Args:
            model_name (str, optional): Name of the model.
                Call `S2SAbstractiveSummarizer.list_supported_models()` to see all
                supported model names. Defaults to "unilm-base-cased".
            to_lower (bool, optional): Whether to convert all letters to lower case
                during tokenization. This is determined by if a cased model is used.
                Defaults to False, which corresponds to a cased model.
            cache_dir (str, optional): Directory to cache downloaded model files.
                Defaults to ".".
            load_model_from_dir (str, optional): Directory to load the model from. If
                model_file_name is not provided, assume model was saved by
                `:func:`~transformers.PreTrainedModel.save_pretrained`` and the
                directory should contain pytorch_model.bin and config.json.
                Defaults to None.
            model_file_name (str, optional): Name of the model file under
                `load_model_from_dir`. If provided, assume model was saved by
                `S2SAbstractiveSummarizer.save_model`.
            label_smoothing (float, optional): Alpha in label smoothing.
                Defaults to 0.1.
            max_seq_length (int, optional): Maximum length of the sequence that
                concatenates source sequence tokens, target sequence tokens, and
                special tokens like cls and sep. Defaults to 512.
            max_source_seq_length (int, optional): Maximum number of tokens in the
                source sequence after tokenization. Defaults to 464.
            max_target_seq_length (int, optional); Maximum number of tokens in the
                target sequence after tokenization. Defaults to 48.

        """

        if model_name not in self.list_supported_models():
            raise ValueError(
                "Model name {0} is not supported by {1}. "
                "Call '{1}.list_supported_models()' to get all supported model "
                "names.".format(model_name, self.__class__.__name__)
            )
        model_class = MODEL_CLASS[model_name]
        config_class = CONFIG_CLASS[model_name]

        self._model_name = model_name
        self._model_type = _get_model_type(self._model_name)
        if "uncased" in model_name:
            to_lower = True

        # self._bert_model_name is needed for BertForSeq2SeqDecoder
        if self._model_type != "bert":
            if self._model_type == "roberta":
                self._bert_model_name = (
                    self._model_name.replace("roberta", "bert") + "-cased"
                )
            else:
                self._bert_model_name = "bert-" + self._model_name.split("-", 1)[-1]
        else:
            self._bert_model_name = self._model_name

        self.cache_dir = cache_dir
        self.load_model_from_dir = load_model_from_dir
        self.do_lower_case = to_lower
        self.max_seq_length = max_seq_length
        self.max_source_seq_length = max_source_seq_length
        self.max_target_seq_length = max_target_seq_length

        if load_model_from_dir is None:
            model_to_load = self._model_name
        elif model_file_name is None:
            # Assume model was saved by
            # `:func:`~transformers.PreTrainedModel.save_pretrained``,
            # The load_model_from_dir should contain pytorch_model.bin and config.json
            # and can be loaded by
            # `:func:`~transformers.PreTrainedModel.from_pretrained``.
            logger.info("Loading cached model from {}".format(load_model_from_dir))
            model_to_load = load_model_from_dir
        else:
            # Assume model was saved by S2SAbstractiveSummarizer.save_model
            model_to_load = os.path.join(load_model_from_dir, model_file_name)
            logger.info("Loading cached model from {}".format(model_to_load))

        if load_model_from_dir is not None and model_file_name is None:
            # Assume config.json is in load_model_from_dir
            model_config = config_class.from_pretrained(
                load_model_from_dir, cache_dir=cache_dir
            )
        else:
            model_config = config_class.from_pretrained(
                self._model_name, cache_dir=cache_dir
            )
        
        self.model_config = model_config

        # Convert regular model config to sequence to sequence config
        config = BertForSeq2SeqConfig.from_exist_config(
            config=model_config,
            label_smoothing=label_smoothing,
            max_position_embeddings=self.max_source_seq_length
            + self.max_target_seq_length,
        )
        logger.info("Model config for seq2seq: %s", str(config))

        self.model = model_class.from_pretrained(
            model_to_load,
            config=config,
            model_type=self._model_type,
            cache_dir=cache_dir,
            reuse_position_embedding=True,
        )

        self.tokenizer = TOKENIZER_CLASS[model_name].from_pretrained(
            self._model_name,
            do_lower_case=to_lower,
            cache_dir=cache_dir,
            output_loading_info=False,
        )

        Abstractive summarizer based on s2s-ft.

        Args:
            model_name (str, optional): Name of the model.
                Call `S2SAbstractiveSummarizer.list_supported_models()` to see all
                supported model names. Defaults to "unilm-base-cased".
            to_lower (bool, optional): Whether to convert all letters to lower case
                during tokenization. This is determined by if a cased model is used.
                Defaults to False, which corresponds to a cased model.
            cache_dir (str, optional): Directory to cache downloaded model files.
                Defaults to ".".
            load_model_from_dir (str, optional): Directory to load the model from. If
                model_file_name is not provided, assume model was saved by
                `:func:`~transformers.PreTrainedModel.save_pretrained`` and the
                directory should contain pytorch_model.bin and config.json.
                Defaults to None.
            model_file_name (str, optional): Name of the model file under
                `load_model_from_dir`. If provided, assume model was saved by
                `S2SAbstractiveSummarizer.save_model`.
            label_smoothing (float, optional): Alpha in label smoothing.
                Defaults to 0.1.
            max_seq_length (int, optional): Maximum length of the sequence that
                concatenates source sequence tokens, target sequence tokens, and
                special tokens like cls and sep. Defaults to 512.
            max_source_seq_length (int, optional): Maximum number of tokens in the
                source sequence after tokenization. Defaults to 464.
            max_target_seq_length (int, optional); Maximum number of tokens in the
                target sequence after tokenization. Defaults to 48.

        
utils_nlp/models/transformers/abstractive_summarization_seq2seq.py