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

关于参数Repeat Factor的设置问题 #854

Open
Lelege0 opened this issue Jan 14, 2025 · 2 comments
Open

关于参数Repeat Factor的设置问题 #854

Lelege0 opened this issue Jan 14, 2025 · 2 comments

Comments

@Lelege0
Copy link

Lelege0 commented Jan 14, 2025

作者您好,首先感谢您做出了如此优秀的作品!我想请教一下就是关于Repeat Factor.这个参数的设定,这个参数是为了平衡各种数据的训练设置的,假如我现在一批数据500k,另一批数据150k,那此时第一批的Repeat Factor.为1时,第二批数据的Repeat Factor.是不是要设置为3以上?但是我通过这样去训练的时候发现效果几乎没有区别,请问这参数在什么情况下会起作用,能否举个例子说明一下,谢谢!

@yuecao0119
Copy link
Collaborator

你好,

关于repeat factor的理解可以参考教程

  • Repeat Factor: The repeat factor r adjusts dataset sampling frequency. Values below 1 reduce a dataset’s weight, while values above 1 increase it. This ensures balanced training across tasks and prevents overfitting or underfitting.

以及 #763

  • 关于repeat_time参数,我的理解是,一方面优质数据量比较少,另一方面不同领域的数据量不一样,通过设置repeat_time可以调整活跃数据样本数量和数据混合比例,从而更好地利用优质数据。另外,增加少量数据的repeat_time来提高其在整个数据中的占比,可以让模型快速适应这一特定数据。

关于你的问题,请问你所说的效果几乎没有区别,是对比的这样设置吗?
实验1:第一批数据Repeat Factor设置为1和第二批数据Repeat Factor设置为1,然后一起作为微调数据集来训练模型;
实验2:第一批数据Repeat Factor设置为1和第二批数据Repeat Factor设置为3,然后一起作为微调数据集来训练模型;

@Lelege0
Copy link
Author

Lelege0 commented Jan 16, 2025

#763 中的nummber_reain_epoch 这个没看懂啥意思?对的,就是对比你上面说的那种形式。但是我做了好几次实验就是每次递增repeat factor这个参数,在其他超参数等同的情况下,几次下来实验结果基本上没有啥区别(微调caption任务,在coco,flickr,nocaps上基本上没有啥区别,是不是要调整其他超参数的设置)。而且奇怪的是,zero-shot在flickr上的指标都很高,但是我拿flickr30k的训练数据去微调之后他的指标竟然掉了,其他两个数据集都有小幅度的上升。不知道是什么情况,期待您的回复!谢谢!

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