Generative modeling of sequential data