[XPU] support ERNIE-4.5-VL-28B-A3B-Thinking#1391
Merged
yongqiangma merged 8 commits intoPaddlePaddle:developfrom Dec 29, 2025
Merged
[XPU] support ERNIE-4.5-VL-28B-A3B-Thinking#1391yongqiangma merged 8 commits intoPaddlePaddle:developfrom
yongqiangma merged 8 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
nepeplwu
reviewed
Dec 8, 2025
erniekit/cli.py
Outdated
| if current_device == "xpu": | ||
| os.environ["FLAGS_use_stride_kernel"] = "1" | ||
| args = read_args() | ||
| use_stride_kernel = args.get("FLAGS_use_stride_kernel", False) |
Collaborator
There was a problem hiding this comment.
hparams里面有定义FLAGS_use_stride_kernel吗?
Collaborator
There was a problem hiding this comment.
而且这个值本身就是定义为环境变量,不用应该再通过参数传入来控制
Author
There was a problem hiding this comment.
FLAGS_use_stride_kernel,目前XPU上有些模型需要设置为true才能跑通,另一些则推荐设置为false以获得性能收益。将这个环境变量放进yaml文件中可以确保用户一行命令启动模型(而不用额外设置环境变量)。
Author
There was a problem hiding this comment.
hparams里面有定义FLAGS_use_stride_kernel吗?
已在hparams中添加EnvConfigArguments.FLAGS_use_stride_kernel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XPU 对 ERNIE-4.5-VL-28B-A3B-Thinking 模型的支持
FLAGS_use_stride_kernel参数(设为true/false) 来控制 Stride 机制的开启。请注意:当前在 XPU 上开启此机制会导致性能下降,因此默认设置为关闭 (false)。