Release of CmdStan 2.32

We are very happy to announce that the 2.32.0 release of CmdStan is now available on Github! As usual, the release of CmdStan is accompanied by new releases of Stan Math, core Stan, and Stanc3. A PyStan update will follow shortly.

This new release brings Laplace approximation, the Jacobian adjustment for the optimization algorithms, more supported arguments for the eigenvalues/eigenvectors functions and a ton of bugfixes. This release also includes a number of changes in the backend that will enable some big features in the next few releases (more on that at the end of blog post).

The removal of the deprecated language features that were scheduled to become errors in this version was postponed to the next release.

Contributors, sponsors and donators

We would like to thank everyone that contributed to this release with their bug reports, feature or bug fix discussions, and code or code reviews. We would also like to thank all of our sponsors and donators who have supported us during this last release cycle and in years past. Thanks to the Flatiron Institute for providing us with the computing resources to run unit tests and build scripts for our repositories.

You can support Stan via NumFocus or the Github sponsorship program.

Release highlights

Laplace approximation

CmdStan now supports sampling from a Laplace approximation. The new method produces a sample from a normal approximation centered at the mode of a distribution in the unconstrained space. For more see the CmdStan documentation for the laplace method. cmdstanpy/r supports should be coming in the next weeks.

Jacobian adjustments for optimization

Enabling the adjustment produces the maximum a posteriori (MAP) estimate in addition to the existing penalized maximum likelihood estimate. For more details see here.

Miscellaneous enhancements and bugfixes

  • eigenvalues and eigenvectors function now accept complex matrices,
  • recursive user-defined functions no longer need forward declarations,
  • improved Stan-to-C++ compile times (especially noticeable for larger models),
  • updated the Eigen library (a dependancy of Stan Math) to version 3.4,
  • fixed an issue with building the TBB dependancy with gcc 13+,

and many other minor improvements.

Preview of upcoming features

Many other changes were done to the Stan backend that will enable some of the features coming up in the next releases. The main ones that we are most excited about tuples and the Pathfinder algorithm.

Tuples will allow functions to return more than one type of value simultaneously. For example, a function could be defined that returns both a matrix and some real-valued property of this matrix, or returning both the U and V matrices of a Singular Value Decomposition, removing the need for separate svd_U and svd_V functions which recompute a lot of the same things

It will also allow easier and better representation of data that is a mix of different types or different sizes of the same type; currently, it is not possible in Stan to package these together.

For more on the feature design, read the design doc here, or the open pull request here.

For more on the Pathfinder algorithm, read the arxiv paper here and the open pull requests here and here.

How to install the new release?

Download the tar.gz file here, extract it, and use it the way you use any Cmdstan release. We also have an online Cmdstan guide available at

If you are using cmdstanpy you can install using


With CmdStanR you can install using


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s