Closed dragen1860 closed 5 months ago
Hi, it's not an error. This is used to convert LLaVA-based conversation to our format. In LLaVA format only one <image>
token is given at the beginning of the multi-turn conversation. That means img_in_text
set to true if img_token
appear in this multi-turn conversation. We attach this token img_token
at each sub-conversation if img_token
not exist in other turns. You can try to debug step-by-step to find the logic.
but i still think the logic if
will never triggered. please check it mg_token in sentence["value"] and img_token not in sentence["value"]
twice. @yanwei-li
Hi, it's not an error. This is used to convert LLaVA-based conversation to our format. In LLaVA format only one
<image>
token is given at the beginning of the multi-turn conversation. That meansimg_in_text
set to true ifimg_token
appear in this multi-turn conversation. We attach this tokenimg_token
at each sub-conversation ifimg_token
not exist in other turns. You can try to debug step-by-step to find the logic.
Does this way improve performance?
the code
img_token in sentence["value"] and img_token not in sentence["value"]
has logic error. I guess maybe some typos?