2026-06-28 20:39:56 -07:00
2026-06-28 20:39:55 -07:00
2026-06-28 20:39:56 -07:00

fhe-ml

Lux FHE ML

Machine Learning framework for encrypted data using Fully Homomorphic Encryption.

Overview

FHE ML enables training and inference on encrypted data without decryption. Part of the Lux FHE ecosystem.

Features

  • Privacy-preserving ML: Train models on encrypted data
  • Quantization-aware training: Optimized for FHE computation
  • scikit-learn compatible: Familiar API for ML practitioners
  • GPU acceleration: native CUDA / Metal / WebGPU via the Torus compiler over the luxfi/gpu runtime

Installation

pip install luxfhe-ml

Or from source:

git clone https://github.com/luxfi/fhe-ml
cd fhe-ml
pip install -e .

Quick Start

from luxfhe.ml import FHEModelClient, FHEModelServer
from sklearn.datasets import make_classification

# Train a model
X, y = make_classification(n_samples=1000)
model = FHEModelClient()
model.fit(X, y)

# Compile for FHE
model.compile(X)

# Encrypted inference
encrypted_X = model.encrypt(X[:1])
encrypted_pred = model.predict(encrypted_X)
pred = model.decrypt(encrypted_pred)

Integration

License

BSD 3-Clause Clear License

S
Description
Lux FHE ML: Machine Learning on encrypted data
Readme BSD-3-Clause
14 MiB
Languages
Python 49.8%
Jupyter Notebook 47.9%
Shell 1.4%
Makefile 0.8%