Repository navigation
Add T3-Unlearning method - #196
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the T3-Unlearning method (Temper-Then-Tilt) by introducing a T3 model wrapper, a dedicated unlearning trainer, and classifier-focused evaluation metrics, plus associated configs/docs/community scripts.
Changes:
- Added
T3CausalLMwrapper model with a trainable guidance head and custom generation logic. - Added
T3unlearning trainer that trains the classifier head using retain/forget token labels. - Registered new trainer/model/metrics and added configuration + documentation/community run artifacts.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/trainer/unlearn/t3.py | New T3 unlearning trainer and classifier-loss computation. |
| src/trainer/init.py | Registers the new T3 trainer. |
| src/model/t3.py | New T3CausalLM wrapper model + config + generation utilities. |
| src/model/init.py | Registers the new T3CausalLM model handler. |
| src/evals/metrics/t3.py | Adds T3-specific classifier accuracy/loss metrics. |
| src/evals/metrics/init.py | Registers the new T3 metrics. |
| docs/links.md | Adds reference links for the T3-Unlearning paper/code. |
| configs/trainer/T3.yaml | Adds a default Hydra trainer config for T3. |
| community/methods/T3/run.sh | Adds a community sweep script for running T3 locally. |
| community/methods/T3/README.md | Adds a community README with setup/citation info. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Regarding the evaluation-loss comment, T3 intentionally discards labels and returns no causal-LM loss in normal forward. OpenUnlearning’s custom evaluators call the model directly and compute metrics from logits and labels; the T3 classifier objective is computed exclusively in T3.compute_loss. Trainer evaluation is disabled in the T3 config. |
|
Hi @Dornavineeth @molereddy - gentle ping on this PR adding T3-Unlearning. I've addressed the copilot review comments and the branch merges cleanly. Could you take a look when you get the chance? Thanks! |
Brings the current main into this branch. Conflicts in docs/links.md and src/trainer/__init__.py were additive, so the AdaPop entries from main and the T3 entries from this branch are both kept.
Lists T3 alongside the other methods and updates the method count to 14.
molereddy
left a comment
There was a problem hiding this comment.
looks good thank you! sorry for the very late turnaround. merging now.
|
There are some issues identified for which I added a followup PR with some small changes which you may wanna look at. jacob-block#1 |
Fix T3 loading and runtime errors
|
Thanks @molereddy ! I merged your fixes but the new push dismissed your earlier approval -- could you re-approve and merge when you get a chance? |
Adds the T3-Unlearning method (Temper-Then-Tilt Unlearning: Principled Unlearning for Generative Models through Tempering and Classifier Guidance, ICML 2026).