cvxpy/cvxpylayers
Differentiable convex optimization layers observed · 2026-08-28
Health v2 · maintenance only
87/100
- Activity 83
- Release rhythm 84
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 2502
- days_rel: 106
- days_push: 106
- n_releases_24m: 6
Adoption not part of the score
2126 stars · 193 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
CVXPYlayers is a Python library for constructing differentiable convex optimization layers in PyTorch, JAX, and MLX using CVXPY. It solves parametrized convex problems in the forward pass and computes derivatives of the solution with respect to parameters in the backward pass, with GPU acceleration via Moreau and CuClarabel backends.
Use cases
- embed a convex optimization problem as a layer in a neural network
- backpropagate through a parametrized convex program in PyTorch or JAX
- solve convex optimization problems on the GPU inside a training loop
- learn parameters of a quadratic program or cone program end-to-end
- build model-predictive control policies that are differentiable
- train models whose forward pass includes a constrained optimization step
When to choose
- your model includes a convex optimization step and you need gradients through it
- you want to express problems in CVXPY and use them as differentiable layers
- you need GPU-accelerated convex solving within deep learning frameworks
When to avoid
- your optimization problem is nonconvex
- you only need to solve convex problems without gradients (plain CVXPY suffices)
- you need discrete or combinatorial optimization layers
Facets
library · maturity active
machine-learning math sdk machine-learning deep-learning gpu-computing python convex-optimization differentiable-optimization cvxpy pytorch jax mlx optimization-layers gpu-acceleration algorithms gpu
2 sources
- readme: https://github.com/cvxpy/cvxpylayers · fetched 2026-08-28 · 4d55daf30f47
- registry_pypi: https://pypi.org/pypi/cvxpylayers/json · fetched 2026-08-29 · bf71613c0507
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| cvxpy/cvxpylayers | main | 87 |
For agents
markdown · JSON · MCP: product_card(name="cvxpy/cvxpylayers")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem