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

如何进行图片中特定内容描述? #5

Open
Guangming92 opened this issue Sep 13, 2024 · 1 comment
Open

如何进行图片中特定内容描述? #5

Guangming92 opened this issue Sep 13, 2024 · 1 comment

Comments

@Guangming92
Copy link

Guangming92 commented Sep 13, 2024

例如提供的traindata中的图片,如何微调训练,只对图片中狗进行描述?训练数据如何准备?
复现您给到的案例,有个问题,就是已经添加了torch_dtype=torch.bfloat16, attn_implementation='flash_attention_2',我用的是4090,24G显存,迭代第一步以后,显存就不够用了~还有什么办法可以降低一下吗?

@zhangfaen
Copy link
Owner

还可以:

  1. batch_size改为1
  2. 把这句中的processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=2562828, max_pixels=5122828, padding_side="right") 中的 min_pixes 和 max_pixels 都改的更小,比如 128 * 28 * 28

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

2 participants