# LoRA + DP-SGD tutorial

**URL:** <https://discuss.pytorch.org/t/lora-dp-sgd-tutorial/214370>\
**Category:** Opacus\
**Created:** [December 18, 2024, 5:58pm UTC](https://discuss.pytorch.org/t/lora-dp-sgd-tutorial/214370 "2024-12-18T17:58:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iden-kalemaj](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/iden-kalemaj/32/74596_2.png) [@iden-kalemaj](https://discuss.pytorch.org/u/iden-kalemaj)\
**Post date:** [December 18, 2024, 5:58pm UTC](https://discuss.pytorch.org/t/lora-dp-sgd-tutorial/214370/1 "2024-12-18T17:58:21Z")

</div>

Dear Opacus users,

We have updated our tutorial on DP fine-tuning of a language model to demonstrate the usage of LoRA (low-rank adaptation) with DP-SGD: [https://github.com/pytorch/opacus/blob/main/tutorials/building\_text\_classifier.ipynb](https://github.com/pytorch/opacus/blob/main/tutorials/building_text_classifier.ipynb)

LoRA is a parameter-efficient fine-tuning method that allows for training significantly fewer parameters while maintaining on-par accuracy. You can combine it with Opacus training with a few lines of code and no conceptual changes to the privacy analysis.

Feel free to take a look!
