Stan without a compiler

TL;DR: Users would not need to have a compiler installed if we compiled their program for them.

Neither compiling nor transferring a (Cmd)Stan model-specific binary is particularly expensive. Compilation takes about 8 seconds. Previously-compiled models can be saved in a cache, making compilation instantaneous. A compressed binary takes about 400K on my system. A file this size can be transfered in less than 0.5 seconds to anyone with a fast connection.

The logistics of this would be relatively simple. The user would send a message to the cloud server (“CompileStan”) with the Stan program. This message would include information about their computer architecture. The cloud server would compile the model and send back a binary. The user would execute the binary and draw samples.

There are some challenges here. The servers would need to be highly available. People who do not want the cloud server to see their model would not be able to use the service. Getting things to work with PyStan or RStan might take some additional work. And, of course, the user needs to be connected to the internet.

4 Likes

This would be really cool. Compiler issues are some of the most frequent problems users run into so anything that would help alleviate that burden would be great!