Variational Inference for Latent Variable Models in High Dimensions