Here is a utility package to facilitate using Optims (or most other solvers) (L)BFGS to train flux models