This does not seem to be something that is often requested.
I would probably wrap the model in a Python extension and use that. This is safely within what is supported.
Or you could try to trace the model and then save it with the JIT, but that would lose the model structure (I think), as the magic that lets you keep the model structure in Python is likely missing. I must admit that I didn’t try tracing in C++ and the last time I suggested to just do as if you would in Python (for the anomaly detection) and that it should be working, it would just segfault and I had to go and implement the feature just to avoid leaving a wrong answer in the forums for posterity. No guarantee from me that this works.
Best regards
Thomas