How memory efficient is Infer.NET?
Infer.NET pre-allocates memory for all messages being passed during inference. This can be particularly severe when running models with large message types such as Dirichlet or Discrete messages, especially in cases where arrays of Discrete variables, each with a large value range, are used to switch on and off parts of a model – for example LDA models. All messages for all data instances for all values of the switch variable are stored, and the messages themselves are large, so such models quickly consume all available memory. Several options are provided to make Infer.NET highly scalable. These are described in the section on hto build scalable applications.