DAMO-NLP-SG / VideoLLaMA2

VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs
Apache License 2.0
918 stars 60 forks source link

How to run the finetuned model with LoRA adapters. #59

Closed thisurawz1 closed 1 month ago

thisurawz1 commented 4 months ago

i have successfully fine-tuned the model using QLORA for a custom use case. now i have the LoRA adapters and can you tell how to use it for the inference. maybe merge lora weights with the original model and do the inference.

Yogesh914 commented 4 months ago

Hi @thisurawz1, I was wondering if you were available for a call or text, we are currently experiencing some issues when fine tuning with finetune_lora.sh file, and was wondering if we could use your guidance.

I have a discord as well if you prefer, let me know what works best for you

thisurawz1 commented 4 months ago

You can contact me on Discord - "wick6309". However, I'm not very active on Discord and mainly use WeChat. Anyway, I've posted below all the issues I encountered and their solutions for everyone's reference.

I mainly used the QLoRA script and did a fine-tuning as a trial run. My dataset was quite small, around 229 samples (image and text). I encountered the following issues while doing the fine-tuning. I used 1 A100 40GB GPU, but the VRAM was not enough to run the QLoRA script with a batch size of 4, so I had to change it to 2.

1 Adjust the number of GPUs available in your PC

2 Hugging Face offline mode error

3 Cannot access "mistralai/Mistral-7B-Instruct-v0.2" as it is a private repo

4 mm_projector.bin couldn't be found

5 change the dataset path and folder.

6 NCCL error/ CUDA error/ Not enough VRAM

Hi @thisurawz1, I was wondering if you were available for a call or text, we are currently experiencing some issues when fine tuning with finetune_lora.sh file, and was wondering if we could use your guidance.

I have a discord as well if you prefer, let me know what works best for you

Yogesh914 commented 4 months ago

Hey @thisurawz1 thanks a lot for the reply, it made things clear, I am working with @lucasxu777 on this so if you could add him that would be great since he has wechat! I have also added you on discord as well ".yogiii" is my username.

Yogesh914 commented 4 months ago

i have successfully fine-tuned the model using QLORA for a custom use case. now i have the LoRA adapters and can you tell how to use it for the inference. maybe merge lora weights with the original model and do the inference.

It was solved here: #32

thisurawz1 commented 4 months ago

Hey @thisurawz1, thanks for sharing the information here!!! I wonder if I can add you on WeChat so that we can make the conversations easier maybe for future work :)). My WeChat account is: kjw4LV

noted. ill add you

thisurawz1 commented 4 months ago

i have successfully fine-tuned the model using QLORA for a custom use case. now i have the LoRA adapters and can you tell how to use it for the inference. maybe merge lora weights with the original model and do the inference.

It was solved here: #32

Thanks. ill add your friend. is there any proper guide on how to do the inference with the lora fine tuned model.

LiangMeng89 commented 4 weeks ago

kjw4LV is not work, please add my wechat: LiangMeng19357260600, so we can talk about how to use videollama2 in our domain research work.

LiangMeng89 commented 4 weeks ago

我已经成功地使用 QLORA 对模型进行了动作,以适应习惯的例子。现在我有了 LoRA 玩具,您能告诉我如何使用它进行推理吗?也许会将 lora 权重与原始模型合并并进行推理。

已在这里解决:#32

Hello, we also can add wechat, kjw4LV is not work, please add my wechat: LiangMeng19357260600, so we can talk about how to use videollama2 in our domain research work.Thanks.