Very little actually, we try to minimize dependencies, especially for the core inference engine. We just have some basic stuff like Statistics and LinearAlgebra. We use a lot more libraries for offline analysis, but even there it's just popular stuff like DataFrames combined with our own code.
We control memory allocation the boring, manual way – we preallocate all our arrays, and then just modify them, so that we have very little continued allocation in production.