#8787th of 126 in Training and fine-tuning

opacus

PyTorch library for training models with DP-SGD differential privacy

Stars
2k
License
Apache-2.0
Last commit
Sep 2026
Last release
May 2026
Language
Python
Stars, last 30 weeks+54
28 Apr 2026: 1,918 stars5 May 2026: 1,919 stars12 May 2026: 1,921 stars19 May 2026: 1,925 stars26 May 2026: 1,928 stars2 Jun 2026: 1,931 stars9 Jun 2026: 1,932 stars16 Jun 2026: 1,932 stars23 Jun 2026: 1,933 stars30 Jun 2026: 1,934 stars7 Jul 2026: 1,936 stars14 Jul 2026: 1,940 stars21 Jul 2026: 1,940 stars28 Jul 2026: 1,943 stars4 Aug 2026: 1,945 stars11 Aug 2026: 1,947 stars18 Aug 2026: 1,949 stars25 Aug 2026: 1,950 stars1 Sept 2026: 1,951 stars8 Sept 2026: 1,954 stars15 Sept 2026: 1,957 stars22 Sept 2026: 1,958 stars29 Sept 2026: 1,960 stars6 Oct 2026: 1,960 stars13 Oct 2026: 1,961 stars20 Oct 2026: 1,965 stars27 Oct 2026: 1,966 stars3 Nov 2026: 1,968 stars10 Nov 2026: 1,968 stars17 Nov 2026: 1,969 stars24 Nov 2026: 1,972 stars

1,918 on 28 Apr 20261,972 on 24 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Opacus trains PyTorch models with differential privacy. You create a PrivacyEngine and call make_private() on the model, optimizer and data loader, setting noise_multiplier and max_grad_norm, and it tracks the privacy budget spent during training. It also includes Fast Gradient Clipping and Ghost Clipping to cut DP-SGD memory use.

Who it is for: ML engineers and DP researchers training PyTorch models on sensitive data

Strengths

  • Minimal code change: wrap model, optimizer and data loader with PrivacyEngine.make_private()
  • Tracks the privacy budget spent online during training
  • Fast Gradient Clipping and Ghost Clipping reduce DP-SGD memory requirements
  • Tutorials cover BERT, image and LSTM classifiers, and LoRA with peft

Weaknesses

  • PyTorch only; no support for other frameworks
  • Module Validator and Fixer imply some layers need changes for DP training
  • Privacy guarantees depend on noise and clipping values the user chooses
  • Training-time library only; no serving or inference features

What it needs

  • Needs PyTorch
  • Models: PyTorch models

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in Training and fine-tuning

See all 126
Also in Training and fine-tuning
RankProjectScore
#85stable-audio-toolsTraining and inference code for diffusion-based audio generation models3.9k starsMIT45 out of 100
#86axlearnJAX-based library for training large-scale deep learning models2.4k starsApache-2.044 out of 100
#88paddlenlpLLM training, fine-tuning, compression and inference toolkit on PaddlePaddle13k starsApache-2.042 out of 100
#89ml-hypersimSynthetic indoor-scene dataset with per-pixel labels, plus a V-Ray rendering toolkit2.1k starscustom license42 out of 100
#90qwen-vl-series-finetuneFine-tuning scripts for Qwen2-VL, Qwen2.5-VL, Qwen3-VL and Qwen3.52k starsApache-2.041 out of 100