Opacus
  • Introduction
  • FAQ
  • Tutorials
  • API Reference
  • GitHub

›

Tutorials

  • Overview

Using Opacus

  • Building text classifier with Fast Gradient Clipping DP-SGD
  • Building image classifier with Differential Privacy
  • Training a differentially private LSTM model for name classification
  • Deep dive into advanced features of Opacus
  • Guide to Module Validator and Fixer
  • Guide to grad samplers
  • Training on multiple GPUs with DistributedDataParallel

Tutorials

This is the tutorials page. Navigate the sidebar to find various tutorials.

External Blog Posts

Introducing Opacus, by Meta AI

Differential Privacy Blog Post Series

  1. DP-SGD Algorithm Explained
  2. Efficient Per-Sample Gradient Computation in Opacus
  3. Efficient Per-Sample Gradient Computation for More Layers in Opacus
  4. Enabling Fast Gradient Clipping and Ghost Clipping in Opacus

Videos*

* Note that Opacus API has changed over time and some of the code samples and demos in the videos may not work. The concepts presented in the videos though are concrete and still valid.

  1. PyTorch Developer Day 2021: Fast and Flexible Differential Privacy Framework for PyTorch
  2. OpenMined PriCon 2020 Tutorial: DP Model Training with Opacus
  3. PyTorch Developer Day 2020: Differential Privacy on PyTorch

Blog Posts by OpenMined

  1. Differentially Private Deep Learning In 20 Lines Of Code
Opacus
Docs
IntroductionFAQTutorialsAPI Reference
Github
opacus
Legal
PrivacyTerms
Meta Open Source
Copyright © 2025 Meta Platforms, Inc.