← all repositories
mlpack/ensmallen

A C++ optimizer buffet served header-only

It collects L-BFGS, SGD, CMAES, and other numerical optimizers into a single header-only C++ library so you can minimize functions without the weight of a full framework.

812 stars C++ ML FrameworksOther AI
ensmallen
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does ensmallen is a header-only C++ library for non-linear numerical optimization. It bundles a wide range of optimizers—covering gradient descent, gradient-free methods such as CMAES and Simulated Annealing, and constrained techniques—behind a unified interface. You provide an objective function and select an algorithm.

The interesting bit Because the entire library ships as headers, there is no separate compilation or linking stage to fight with. It also exposes optional callbacks, so you can hook into the optimization loop for logging or early stopping without modifying the underlying solvers.

Key highlights

  • Ships L-BFGS, SGD, CMAES, Simulated Annealing, and other constrained and unconstrained methods.
  • Header-only distribution; drops into existing C++ projects without library linking.
  • Optional callbacks allow customizing the optimization process mid-run.
  • Backed by a 2021 JMLR paper and the broader mlpack ecosystem.
  • Requires only C++14, Armadillo, and a standard BLAS/LAPACK backend.

Verdict Grab it if you need flexible, standalone function minimization in C++ without adopting a monolithic framework. Pass if you are already locked into a larger C++ ML stack that manages its own optimizers.

Frequently asked

What is mlpack/ensmallen?
It collects L-BFGS, SGD, CMAES, and other numerical optimizers into a single header-only C++ library so you can minimize functions without the weight of a full framework.
Is ensmallen open source?
Yes — mlpack/ensmallen is an open-source project tracked on heatdrop.
What language is ensmallen written in?
mlpack/ensmallen is primarily written in C++.
How popular is ensmallen?
mlpack/ensmallen has 812 stars on GitHub.
Where can I find ensmallen?
mlpack/ensmallen is on GitHub at https://github.com/mlpack/ensmallen.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.