Skip to content

yiannisha/SMART-SSR

Repository files navigation

SMART-SSR

Research repo to reproduce Self-Synthesized Rehearsal (SSR) (Huang et al., ACL 2024) and implement the thesis extension SMART-SSR (scoring-based synthetic rehearsal selection).

What’s Implemented

  • Continual instruction-tuning on SuperNI task sequences (5/10 tasks from the paper).
  • Baselines: non_rehearsal, rand_replay, kmeans_replay, ssr, mtl (upper bound).
  • SMART-SSR selector scaffold: combines drift + uncertainty + greedy diversity (configurable weights).
  • End-to-end CLI: data prep → (optional) synthetic generation/refinement → training → evaluation → CL metrics (AR/FWT/BWT).

Quickstart (Smoke Test)

python -m pip install -r requirements.txt
python -m pip install -e .
python -m smart_ssr.cli smoke

Paper Reproduction (SuperNI 5-task)

  1. Prepare the SuperNI tasks used in the paper:
python -m smart_ssr.cli prepare-superni --benchmark superni_5
  1. Run SSR (LoRA) continual learning:
python -m smart_ssr.cli run --config configs/exp/paper/superni5_ssr_llama2_7b.yaml

For multi-GPU, use accelerate launch -m smart_ssr.cli run --config ....

Outputs land in runs/… (configs copied, per-stage eval matrix, AR/FWT/BWT summaries, and stage adapters).

If you use gated base models (e.g. LLaMA 2), make sure you have a valid Hugging Face token set (e.g. export HF_TOKEN=...).

See docs/paper_reproduction.md for the paper-aligned assumptions and knobs. See docs/runs.md for the artifact layout.

Thesis Experiments (SMART-SSR)

python -m smart_ssr.cli run --config configs/exp/thesis/superni5_smart_ssr_llama2_7b.yaml

See docs/thesis_experiments.md for the scoring definition and suggested ablations.

Notes

  • The original SSR authors released an implementation: https://github.com/DeepLearnXMU/SSR. This repo is a clean reimplementation + thesis-oriented infra; prompt/templates and data formats are aligned to the paper’s described pipeline.
  • Experiments beyond SuperNI (e.g. AlpacaEval/MMLU) are not wired up yet; this repo focuses on the continual-learning pipeline and selection mechanisms needed for the thesis.

About

SMART-SSR: Scoring-Based Synthetic Rehearsal for Continual LLM Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published