Added a optional soy like model to pn.ml function