whatisgithub

What is flashlib?

flashml-org/flashlib — explained in plain English

Analysis updated 2026-05-18

408PythonAudience · researcherComplexity · 4/5LicenseSetup · moderate

In one sentence

FlashLib is a Python library offering GPU-accelerated classical machine learning operations like clustering, dimensionality reduction, and regression with a scikit-learn-style API.

Mindmap

mindmap
  root((flashlib))
    What it does
      GPU accelerated ML ops
      Clustering and regression
      Dimensionality reduction
      Cost estimation
    Tech stack
      Python
      Triton
      CuteDSL
    Use cases
      Fast clustering
      Sklearn drop-in
      Pipeline budgeting
    Audience
      ML researchers
      Data engineers
      LLM agent tooling

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

Run clustering algorithms like k-means or DBSCAN on GPU for faster processing of large datasets.

USE CASE 2

Swap numpy-backed scikit-learn code for GPU-backed equivalents with minimal code changes.

USE CASE 3

Estimate runtime, FLOPs, and memory needs of an operation before running it, even without a GPU.

What is it built with?

PythonTritonCuteDSLscikit-learn

How does it compare?

flashml-org/flashlibscenemaai/scenema-audioposeljacob/agentic-video-editor
Stars408406417
LanguagePythonPythonPython
Setup difficultymoderatehardmoderate
Complexity4/54/53/5
Audienceresearcherdeveloperdeveloper

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires GPU hardware and Triton/CuteDSL support for accelerated operations, installable via pip.

Apache 2.0 license, use freely for any purpose including commercial use, with attribution and patent protections.

So what is it?

FlashLib is a Python library that provides GPU-accelerated implementations of classical machine learning operations. It targets researchers and engineers who need standard algorithms to run faster on graphics hardware without switching to deep learning frameworks. The library ships 15 high-level operations across clustering, dimensionality reduction, nearest-neighbor search, regression, and classification. Clustering includes k-means, DBSCAN, HDBSCAN, and spectral clustering. Dimensionality reduction covers PCA, truncated SVD, UMAP, and t-SNE. Regression covers linear, ridge, and logistic variants. Classification includes a multinomial naive Bayes and a random forest. A standard scaler is included for preprocessing. Each operation is available both as a top-level function with a flash_ prefix and as a scikit-learn-style class. The underlying implementation uses Triton, a language for writing GPU kernels, and CuteDSL. The library supports multiple floating-point precisions and includes a family of matrix multiplication variants covering TF32, BFloat16, FP16, INT8, and mixed-precision combinations. A lightweight submodule called flashlib.info is included for cost estimation. It predicts the runtime, FLOPs, and memory bandwidth for any primitive given a data shape and target hardware, and runs on CPU without importing the GPU dependencies. The README describes this as useful for budgeting a data pipeline before running it, and notes it is small enough for an LLM agent to call in an environment without a GPU. Installation is through pip or from source. The API follows the scikit-learn pattern, so existing code using numpy-backed implementations can be adapted to use GPU-backed equivalents with minimal changes. The library is released under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
Show me how to replace a scikit-learn k-means call with FlashLib's GPU-accelerated flash_kmeans function.
Prompt 2
Explain the difference between the flash_ prefixed functions and the scikit-learn-style classes in FlashLib.
Prompt 3
Write a script using flashlib.info to estimate memory bandwidth for a PCA operation before running it on GPU.
Prompt 4
How do I choose between TF32, BFloat16, and FP16 precision for a FlashLib regression operation?

Frequently asked questions

What is flashlib?

FlashLib is a Python library offering GPU-accelerated classical machine learning operations like clustering, dimensionality reduction, and regression with a scikit-learn-style API.

What language is flashlib written in?

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

What license does flashlib use?

Apache 2.0 license, use freely for any purpose including commercial use, with attribution and patent protections.

How hard is flashlib to set up?

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

Who is flashlib for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.