whatisgithub

What is flash-gmm?

ibm/flash-gmm — explained in plain English

Analysis updated 2026-05-18

12PythonAudience · researcherComplexity · 5/5LicenseSetup · moderate

In one sentence

A memory-efficient GPU kernel from IBM Research that speeds up Gaussian Mixture Model clustering to billion-point scale.

Mindmap

mindmap
  root((Flash-GMM))
    What it does
      Fast GMM clustering step
      Avoids huge memory matrix
      Scales to billions of points
    Tech Stack
      Python
      PyTorch
      Triton
      CUDA
    Use Cases
      Large scale clustering
      Replace slow CPU GMM
      Streaming data processing
    Audience
      Researchers
      Data scientists
    Setup
      Install PyTorch and Triton
      Call flash_gmm_estep
      Requires NVIDIA GPU

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Cluster very large datasets into overlapping groups without running out of GPU memory.

USE CASE 2

Replace a slow CPU based GMM implementation with a much faster GPU kernel.

USE CASE 3

Process a billion data points in chunks on a single GPU.

What is it built with?

PythonPyTorchTritonCUDA

How does it compare?

ibm/flash-gmmaim-uofa/reasonmatchairbone42/360-data-athlete
Stars121212
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity5/55/54/5
Audienceresearcherresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an NVIDIA GPU with Triton and PyTorch installed.

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notices.

So what is it?

Flash-GMM is an IBM Research project that makes a classic machine learning technique called Gaussian Mixture Models (GMMs) work at a scale that was previously impossible on a single GPU. A GMM is a way of grouping data points into clusters where each cluster is represented by a bell curve rather than a hard boundary. The "soft clustering" in the description means each data point gets a probability of belonging to each cluster rather than being forced into just one. The problem Flash-GMM solves is memory. In the standard way of computing GMMs, the algorithm has to store a large matrix that holds one number for every combination of data point and cluster. If you have a million data points and a thousand clusters, that matrix alone needs roughly 21 gigabytes of GPU memory, and it grows proportionally as the data gets larger. For a billion data points, it simply does not fit. Flash-GMM avoids building that matrix entirely. Instead, it borrows an approach from a well-known technique called FlashAttention (used to make large language models more memory efficient) and processes the data in small tiles. For each tile, it computes the cluster assignments on-chip and immediately adds the results into a small set of running totals. The large intermediate matrix is never written to GPU memory at all. The result is a memory footprint of about 4.5 megabytes for the same configuration that would normally require 21 gigabytes, a reduction of over four thousand times. In terms of speed, the project reports that Flash-GMM runs 766 to 1,740 times faster than a standard CPU implementation (SciPy) and 19 to 32 times faster than a GPU-based competitor (TorchGMM). TorchGMM also runs out of memory once the dataset exceeds about one million points, while Flash-GMM was tested at one billion points on a single GPU. The project is written in Python and uses a library called Triton to write the GPU kernel directly. Installation requires only PyTorch and Triton. It is published under the Apache 2.0 license and comes with a preprint citation for the associated research paper from IBM Research.

Copy-paste prompts

Prompt 1
Explain how Flash-GMM avoids building the large data-point by cluster matrix.
Prompt 2
Help me install PyTorch and Triton and run flash_gmm_estep on my data.
Prompt 3
Show me how to stream data through Flash-GMM when it does not fit in GPU memory.
Prompt 4
Compare Flash-GMM's memory usage to a standard TorchGMM implementation.

Frequently asked questions

What is flash-gmm?

A memory-efficient GPU kernel from IBM Research that speeds up Gaussian Mixture Model clustering to billion-point scale.

What language is flash-gmm written in?

Mainly Python. The stack also includes Python, PyTorch, Triton.

What license does flash-gmm use?

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notices.

How hard is flash-gmm to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is flash-gmm for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.