BART MLM adapter #638
-
I want to train BART adapter1 & the Fusion Layer using MLM and freeze adapter2 & adapter3. model_name = 'mse30/bart-base-finetuned-pubmed' #PubmedBART How do I pass this model along with the adapters to MLM (run_mlm.py) arguments? !python "/content/adapters/examples/pytorch/language-modeling/run_mlm.py" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @san-deep-reddy, Unfortunately you can't pass this along to the script without modifying it. You can simply replace the With Hope this helps! |
Beta Was this translation helpful? Give feedback.
Replacing setup_adapter_training with the below code did the job
model.add_adapter("adapter1", config="seq_bn")
model.add_adapter("adapter2", config="seq_bn")
model.add_adapter("adapter3", config="seq_bn")
adapter_setup = Fuse("adapter1", "adapter2", "adapter3")
model.add_adapter_fusion(adapter_setup)
model.train_adapter_fusion([adapter_setup, 'adapter1']) #Activate fusion layer and just 'adapter 1'