I-LORA is a continual learning method that improves upon LoRA by constructing a dual-memory experience replay framework based on LoRA parameter interpolations.
use_ilora(bool): Whether to enable I-LORA method. Default: Falseema_alpha(float): EMA smoothing coefficient for updating stable adapter. Default: 0.999consistency_weight(float): Weight for the consistency loss between plastic and stable adapters. Default: 1.0ilora_buffer_size(int): Maximum number of samples to store in memory buffer. Default: 500selective_update(bool): Whether to selectively update only when plastic model performs better. Default: Falsemin_update_threshold(float): Minimum threshold for selective updates. Default: 0.1hidden_state_layers(list): List of hidden state layers to compute consistency loss on. Default: [-1]save_ema_adapter(bool): Whether to save the EMA adapter separately. Default: Trueema_adapter_path(str): Path to save/load the EMA adapter. Default: Noneprevious_task_model(str): Path to the model from previous task. Default: Nonecurrent_task_id(str): ID of the current task. Default: Noneprev_task_id(str): ID of the previous task. Default: None
ilora.py: Core implementation of I-LORA including buffer management and consistency loss computationilora_adapter.py: Adapter initialization and management for I-LORAilora_trainer.py: Custom trainer with I-LORA specific training logicilora_workflow.py: Training workflow management for I-LORAilora_loader.py: Model loading utilities for I-LORAREADME.md: English documentationREADME_zh.md: Chinese documentation
@article{ren2024analyzing, title={Analyzing and reducing catastrophic forgetting in parameter efficient tuning}, author={Ren, Weijieying and Li, Xinlong and Wang, Lei and Zhao, Tianxiang and Qin, Wei}, journal={arXiv preprint arXiv:2402.18865}, year={2024} }