    def batch_to_cache(self, cache: List[torch.Tensor]) -> List[List[torch.Tensor]]:
        """
        Args:
           cache: [state_m, state_c]
               state_ms: [1*n_layers, bs, ...]
               state_cs: [1*n_layers, bs, ...]
        Returns:
           new_cache: [[state_m_1, state_c_1], [state_m_2, state_c_2]...]
        """
        assert len(cache) == 2
        state_ms = cache[0]
        state_cs = cache[1]

        assert state_ms.size(1) == state_cs.size(1)

        new_cache: List[List[torch.Tensor]] = []
        for state_m, state_c in zip(
            torch.split(state_ms, 1, dim=1), torch.split(state_cs, 1, dim=1)
        ):
            new_cache.append([state_m, state_c])
        return new_cache
Args:
cache: [state_m, state_c]
state_ms: [1*n_layers, bs, ...]
state_cs: [1*n_layers, bs, ...]
Returns:
new_cache: [[state_m_1, state_c_1], [state_m_2, state_c_2]...]
modules/wenet_extractor/transducer/predictor.py