SideConfig

class swift.tuners.side.SideConfig(swift_type=None, model_key_mapping=None, dim=None, target_modules=None, side_module_name='fcn4', source_hidden_pos=0, target_hidden_pos=0)[源代码]

The configuration class for the side module.

Side-Tuning only needs to train one side network and weights the output of pre-trained model and side network. 'Side-Tuning: A Baseline for Network Adaptation via Additive Side Networks' by Zhang et al.(2019) See https://arxiv.org/abs/1912.13503

参数:

target_modules (str) -- The feedforward module to be replaced, in regex format