glum
High performance Python GLMs with all the features!
Decision gist · record as of 2026-08-14
Yes, if you need fast GLM fitting with broad distribution and regularization support and a scikit-learn-like API. The active maintenance, permissive license, and zero known vulnerabilities make it production-ready. Medium install friction is acceptable for the performance and feature gains. Verify performance on your specific problem size and distribution before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- For optimal performance on x86_64, MKL library recommended (conda install mkl).
- Medium install friction due to compiled wheels across multiple Python versions (3.10–3.13) and architectures.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research contexts.
last release 2026-05-06 (100 days) · last repo commit 2026-08-03 · 382 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 330,902 downloads/mo, #7,528 on PyPI
Alternatives
Verify before relying
pip install glum
from glum import GeneralizedLinearRegressor
import pandas as pd
model = GeneralizedLinearRegressor(family='binomial', alpha=0.001)
model.fit(X, y)
predictions = model.predict(X_test)- Specific performance gains versus scikit-learn or other GLM libraries on typical datasets
- Memory usage characteristics for large datasets
- Whether all documented distributions (Tweedie, negative binomial, etc.) are production-ready
What it is and what it does
glum is a scikit-learn-compatible GLM library designed for speed and statistical completeness. It supports Normal, Poisson, binomial, gamma, inverse Gaussian, negative binomial, and Tweedie distributions with customizable link functions. The library includes L1, L2, and elastic net regularization, built-in cross-validation for regularization tuning, and classical statistical inference for unregularized models. It also supports box constraints, linear inequality constraints, sample weights, and offsets.
The package emphasizes formula-based model specification via formulaic, allowing users to define models with intuitive syntax including monotonic constraints. It works with multiple dataframe backends (pandas, polars, and others) through narwhals. Performance is a core design goal—the library is optimized for scenarios where observations greatly outnumber predictors, and includes benchmarking tools for comparison against other modern libraries.
Use it for
- Build logistic regression models with L1 regularization for sparse, interpretable solutions in classification tasks
- Fit Poisson regression for count data in demand forecasting or event prediction
- Specify complex models with formulas including spline basis functions and categorical encoding without manual feature engineering
- Apply Tikhonov (matrix-valued) penalties to model correlated random effects in hierarchical data
- Perform statistical inference on unregularized GLM coefficients with confidence intervals and hypothesis tests
- Benchmark GLM fitting performance across libraries using the included glum_benchmarks module
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast GLM fitting with broad distribution and regularization support and a scikit-learn-like API.
The active maintenance, permissive license, and zero known vulnerabilities make it production-ready. Medium install friction is acceptable for the performance and feature gains. Verify performance on your specific problem size and distribution before committing to production use.
Install
glum on PyPI
Before you install
Medium install friction due to compiled wheels across multiple Python versions (3.10–3.13) and architectures. Active maintenance with recent releases; last commit 2026-08-03. Twelve runtime dependencies including numpy, scipy, scikit-learn, pandas, and pyarrow add some complexity, though all are widely available.
Requires Python 3.10 or later. For optimal performance on x86_64, MKL library recommended (conda install mkl).
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research contexts.
Quickstart
pip install glum
from glum import GeneralizedLinearRegressor
import pandas as pd
model = GeneralizedLinearRegressor(family='binomial', alpha=0.001)
model.fit(X, y)
predictions = model.predict(X_test)
Verify before relying
- Specific performance gains versus scikit-learn or other GLM libraries on typical datasets
- Memory usage characteristics for large datasets
- Whether all documented distributions (Tweedie, negative binomial, etc.) are production-ready
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 12 packagesformulaicjoblibnarwhalsnumexprnumpypackagingpandaspyarrowscikit-learnscipytabmattqdm |
| Maintenance | Actively maintained 100 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 330,902 / month, #7,528 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: glum-3.4.1-cp310-cp310-macosx_10_13_x86_64.whl; glum-3.4.1-cp310-cp310-macosx_11_0_arm64.whl; glum-3.4.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; glum-3.4.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; glum-3.4.1-cp310-cp310-win_amd64.whl; glum-3.4.1-cp311-cp311-macosx_10_13_x86_64.whl; glum-3.4.1-cp311-cp311-macosx_11_0_arm64.whl; glum-3.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; glum-3.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; glum-3.4.1-cp311-cp311-win_amd64.whl; glum-3.4.1-cp312-cp312-macosx_10_13_x86_64.whl; glum-3.4.1-cp312-cp312-macosx_11_0_arm64.whl; glum-3.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; glum-3.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; glum-3.4.1-cp312-cp312-win_amd64.whl; glum-3.4.1-cp313-cp313-macosx_10_13_x86_64.whl; glum-3.4.1-cp313-cp313-macosx_11_0_arm64.whl; glum-3.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; glum-3.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; glum-3.4.1-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “GLM regression library”
- glumglum is a high-performance Python library for fitting generalized…
- spglmFits Gaussian, Poisson, QuasiPoisson, and Logistic generalized linear…
- dask-glmDistributed generalized linear model fitting using Dask for parallel…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also spglm · dask-glm · statsmodels · pyfixest · lmfit · linearmodels · mgwr · pysal · aplr · pyglm