Hantao Lou

Results 21 comments of Hantao Lou

Our multimodal alignment repository, [Align Anything](https://github.com/PKU-Alignment/align-anything), supports the fine-tuning of the Janus model series. We invite you to try it out!

> Does Align Anything support fine-tuning image generation? Thanks. Yes, `Align Anything` supports image generation fine-tuning! We also support DPO of the Janus model series.

Our multimodal alignment repository, [Align Anything](https://github.com/PKU-Alignment/align-anything), supports the fine-tuning of the Janus model series. We invite you to try it out!

您好,请问您所提供的图1中的logit是在哪个位置print得到的呢?

> 这里似乎有bug,前面的token的位置是better - worse - better padding -worse padding,计算CFG的时候,使用的却是better - better padding 和 worse -worse padding的加权计算,如果理解错了请纠正 从您的表述看似乎是DPO对的实现逻辑有问题,Janus的DPO分为两种逻辑,但是在处理数据时padding的策略都是一致的(参考`align-anything/datasets/janus/preference.py`中的`PreferenceCollator`,统一是执行(better + better_padding) + (worse + worse_padding)的逻辑,对(better, worse)先padding成(better + better_padding, worse + worse_padding)后再squeeze得到。 如果我的理解有误或者您有后续的问题,欢迎在本issue中进一步提出!

> 感谢回复,我的问题是tokens (batch size=1)后是不是按照better - worse - better padding -worse padding排列,使用现在的CFG代码是否会造成better - better padding 和 worse -worse padding的加权计算?是不是应该是better - worse 和 better padding -worse padding的加权计算。也就是一开始截图里的问题 “在训练过程中发现将与条件数据放在前一半 无条件数据放在后一半 但是后续logits是奇偶放置的”。感谢您的解释。 在Janus目前的训练实现中,有两部分可能与您的问题有关: -...

Sorry for the delay in my reply! I was busy fixing existing (and confirmed) issues in current Janus implementation. > 100015 is not pad id, it is 100002 = =...

> first question, the vocabulary of janus pro 1b and 7b is different, in janus pro 1b , pad token id is 100002, but in janus pro 7b, it is...

感谢你的提问! > 但是如果我想利用数据集(如下)进行微调的时候,这是否还有效? 使用text_image_to_text数据(如ShareGPT4V)时,不需要进行pre-tokenize,可以直接仿照其他训练脚本(如LLaVA训练脚本`scripts/llava/llava_sft.sh`)修改format_dataset.py启动训练。其原因是Janus模型对input image和output image使用了不同的tokenizer,input image可以直接进行类似LLaVA的处理方式,而output image由于使用了不同的tokenizer,需要进行额外的pre-tokenize再进行训练。 > 我看到我们format_dataset.py文件中有着很多的数据集格式化方法,是否会比supervised_tokenize.sh更加有效? 这并非有效和无效的区分,而是不同类型数据的不同处理方式,正如在上一个问题中所说的,Janus系列模型的image output需要额外的pre-tokenize,而一般模型和Janus的image input则不需要。(特别地,Janus的这个架构使其不支持image同时出现在input和output中) > 如果使用的话,需要协同修改哪里呢? 如果你使用ShareGPT4V数据集,则你可以直接使用`ShareGPT4o`(`align_anything/configs/format_dataset.py #L1329`)作为template,如果你使用其他数据集,你可以仿造`ShareGPT4o`自行定义新template。