Skip to content

Created tutorial detailing how to do differentially private PEFT fine-tuning of huggingface transformer models using FastDP#3297

Open
lmarchyok wants to merge 1 commit into
huggingface:mainfrom
lmarchyok:dp-tutorial
Open

Created tutorial detailing how to do differentially private PEFT fine-tuning of huggingface transformer models using FastDP#3297
lmarchyok wants to merge 1 commit into
huggingface:mainfrom
lmarchyok:dp-tutorial

Conversation

@lmarchyok
Copy link
Copy Markdown

Summary

This PR adds a new tutorial describing how to perform differentially private fine-tuning with PEFT using FastDP.

The tutorial demonstrates:

  • Creating a PEFT model using LoRA.
  • Initializing and attaching a FastDP PrivacyEngine.
  • Running a standard training loop with differential privacy enabled.
  • Applying the same workflow to other PEFT methods such as Prompt Tuning and Prefix Tuning.
  • Saving the resulting adapter.

Motivation

This PR is related to #2310, which discusses expanding documentation coverage and providing additional practical tutorials for PEFT users.

While PEFT includes tutorials for many training workflows and integrations, there does not currently appear to be documentation covering differential privacy training. Differentially private fine-tuning is a common research and production use case for parameter-efficient methods, and PEFT's adapter-based approach is particularly well-suited for privacy-preserving training because only a subset of model parameters are updated.

This tutorial aims to provide a minimal example that users can adapt to their own training pipelines.

Changes

Added a new tutorial covering:

  • Loading a pretrained model.
  • Creating a PEFT configuration.
  • Attaching a FastDP privacy engine to the optimizer.
  • Training a PEFT model with differential privacy.
  • Saving and reusing the resulting adapter.

The tutorial follows the structure and style of existing PEFT integration and tutorial documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant