Skip to content

Conversation

@DrRyanHuang
Copy link
Collaborator

@DrRyanHuang DrRyanHuang commented Jul 7, 2025

        text_token_num = ((token_num - image_token_num) if
                          (token_num - image_token_num) > 0 else 1)

这部分的 if 语句导致的打断可以用 paddle.clip / paddle.maximum消除, token_numimage_token_num 都是整数

cc @SigureMo

@paddle-bot
Copy link

paddle-bot bot commented Jul 7, 2025

Thanks for your contribution!

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

标题记得更新一下

@DrRyanHuang DrRyanHuang changed the title [SOT] Remove BreakGraph with paddle.clip [SOT] Remove BreakGraph with paddle. maximum Jul 7, 2025
@DrRyanHuang DrRyanHuang changed the title [SOT] Remove BreakGraph with paddle. maximum [SOT] Remove BreakGraph with paddle. maximum Jul 7, 2025
@DrRyanHuang DrRyanHuang changed the title [SOT] Remove BreakGraph with paddle. maximum [SOT] Remove BreakGraph with paddle.maximum Jul 7, 2025
@Jiang-Jia-Jun Jiang-Jia-Jun merged commit fefbd65 into PaddlePaddle:develop Jul 8, 2025
3 checks passed
@DrRyanHuang DrRyanHuang deleted the sot_rm_if branch July 8, 2025 04:41
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

Successfully merging this pull request may close these issues.

4 participants