Trouble putting together a regression model in pymc3

There are some places that can be eating up a lot of memory during the theano graph construction. You can try changing some flags to disable optimizations that could lower the memory footprint but increase runtime.

I also recommend you take a look at this study of memory allocation both in Python in general but applied in particular to theano.