Since X is latent, the easiest way is to write to pretend it is continuous:
Y = pm.Normal('y', mu= pm.math.dot(theta, eta), sigma = sigma2, shape =M, observed =y) # outcome variable
There is also an old example of LDA with VI in PyMC3 you can get some inspiration from:
https://docs.pymc.io/en/v3/pymc-examples/examples/variational_inference/lda-advi-aevb.html