def get_seq_length(self, layer_idx: Optional[int] = 0) -> int:
        """Returns the sequence length of the cached states. A layer index can be optionally passed."""
        raise NotImplementedError(
            "Make sure to implement `get_seq_length` in a subclass."
        )
Returns the sequence length of the cached states. A layer index can be optionally passed.
smoe/utils/cache_utils.py