Closed hungnh1125 closed 1 month ago
We did not explicitly merge the LoRA weights with some scripts. Instead, we directly set the model_name_or_path
to be the path of the lora adapter path. Since the adapater_config.json
has a parameter called base_model_name_or_path
, which specifies which the path or name of which model it should be merged before use. And transformers
library will automatically do this merging during the loading.
See hugging face transformers
doc for more details:
https://huggingface.co/docs/transformers/en/peft#load-a-peft-adapter
Hi,
Thank you for sharing the Mantis source code.
I trained your LLaMA3 model with SigLIP on my dataset. The model saves a checkpoint every 500 steps. I would like to merge the LoRA weights from these checkpoints (for example checkpoint in step 1000) with your base pretrained SigLIP-LLaMA3 model. Could you please share the source code for merging the LoRA weights?
Thank you! Hung Nguyen