Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finetune Qwen2-VL-7B-Instruct #19

Open
kiennt120 opened this issue Nov 13, 2024 · 3 comments
Open

Finetune Qwen2-VL-7B-Instruct #19

kiennt120 opened this issue Nov 13, 2024 · 3 comments

Comments

@kiennt120
Copy link

Anyone successful finetune Qwen2-VL-7B-Instruct. I finetuned with 2 card A00 and got error CUDA OOM. Can you share which resources recommend to finetune it?
Thank you!

@zhangfaen
Copy link
Owner

reduce batch_size or decrease numbers of this part in util/vision_util.py

IMAGE_FACTOR = 28
MIN_PIXELS = 4 * 28 * 28
MAX_PIXELS = 16384 * 28 * 28
MAX_RATIO = 200

VIDEO_MIN_PIXELS = 128 * 28 * 28
VIDEO_MAX_PIXELS = 768 / 4 * 28 * 28
VIDEO_TOTAL_PIXELS = 24576 / 4 * 28 * 28
FRAME_FACTOR = 2
FPS_MIN_FRAMES = 4
FPS_MAX_FRAMES = 768 / 4

@zhangfaen
Copy link
Owner

or try

replace from torch.optim import AdamW with from torch.optim import SGD

@xyjigsaw
Copy link

It seems that 7B models will encounter OOM issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants