How to speed up Pymc model compilation of a LDA topic model

The model you are trying to implemented is almost exactly the one mentioned above: Naive Bayes model with PyMC3 - #10 by junpenglao. Did you take a look of that?