def max_positions(self):
        """Maximum length supported by the model."""
        return {
            key: (self.models[key].encoder.max_positions(), self.models[key].decoder.max_positions())
            for key in self.keys
        }
Maximum length supported by the model.
infoxlm/fairseq/fairseq/models/fairseq_model.py