On the Efficient Marginalization of Probabilistic Sequence Models