Skip to main content

gpu_glm

A lightweight Python implementation of Generalized Linear Models (GLMs) that runs on a GPU.

This package provides:

  • Gaussian, Bernoulli, Poisson, Gamma, and Inverse Gaussian models.
  • Multiple link functions (identity, log, inverse, logit, probit, etc.)
  • A Cupy-based implementation that falls back to Numpy.
  • A sci-kit learn interface.
  • L2 regularization.

Installation

To use the GPU, cupy must be installed with a GPU dependancies already working. If cupy is unavailable, numpy is used.

pip install gpu-glm

A conda package to handle GPU dependancies is under development.

Quick Example

Below fits a linear regression model.

import numpy as np
from gpu_glm import gaussian_glm
from sklearn.metrics import root_mean_squared_error

# Simulated data
X = np.column_stack([np.random.randn(100), np.ones(100)])
y = 2 * X[:, 0] + 3 +  np.random.randn(100)

# Fit model
model = gaussian_glm()
model.fit(X, y)
print(f"coefficients: {model.coef()}")

y_hat = model.predict(X)
rmse = root_mean_squared_error(y, y_hat)
print(f"RMSE: {np.round(rmse, 3)}")

Release files for gpu-glm 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpu-glm 0.1.5
File Size Uploaded
gpu_glm-0.1.5.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gpu-glm 0.1.5
File Interpreter ABI Platform
gpu_glm-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / gpu_glm-0.1.5.tar.gz

Download URL gpu_glm-0.1.5.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0f57106c95f3d082e71b69c85af27d2c3260b774669d329cea72ac20c8c1caa8
BLAKE2b-256 checksum
How to use checksums
8421fcc199abf78d66bbaba163e06aa1be33bd93f91f5c7a531956f5344915a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.

Transparency log

Release files / gpu_glm-0.1.5-py3-none-any.whl

Download URL gpu_glm-0.1.5-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eec47659b671ad62737342aae67ac47972192f5fcc26336170e882c50166f46
BLAKE2b-256 checksum
How to use checksums
323833ea99d268ae92dc734314da72cdd36ae5584acd74838ab660042162bf36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page