mamba icon indicating copy to clipboard operation
mamba copied to clipboard

How to get all hidden_states of selective_scan_cuda?

Open 0205090923 opened this issue 1 year ago • 2 comments

hi, i wonder how to get all hidden_states of selective_scan_cuda, it seems only the last hidden_state can be used, out, x, *rest = selective_scan_cuda.fwd(u, delta, A, B, C, D, z, delta_bias, delta_softplus)

0205090923 avatar Aug 26 '24 03:08 0205090923

You can't get all hidden states from the fast code. You can materialize the states explicitly if you want them, which can be done directly in Python very easily.

albertfgu avatar Aug 28 '24 13:08 albertfgu

image I'm wondering if this final_state refers to the state depicted by the red circle in the figure

jialiangZ avatar Aug 29 '24 07:08 jialiangZ