def max_positions(self):
        """Maximum input length supported by the encoder."""
        if self.embedding_layer.embed_positions is None:
            return self.embedding_layer.max_source_positions
        return min(
            self.embedding_layer.max_source_positions,
            self.embedding_layer.embed_positions.max_positions,
        )
Maximum input length supported by the encoder.
understand_icl/fairseq/fairseq/model_parallel/models/pipeline_parallel_transformer/model.py