meta-pytorch/opacus
Opacus is a PyTorch library that enables training deep learning models with differential privacy guarantees using DP-SGD.

Opacus provides tools for privacy-preserving machine learning by implementing differential privacy mechanisms during training. It wraps standard PyTorch training loops to add gradient clipping and noise injection, allowing clients to track privacy budgets (epsilon) in real time. The library recently added support for LoRA and PEFT integration with DP-SGD, and introduced memory-efficient techniques like Fast Gradient Clipping and Ghost Clipping to reduce the computational overhead of differential privacy.