-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[XPU] support ERNIE-4.5-VL-28B-A3B-Thinking #1391
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
base: develop
Are you sure you want to change the base?
Conversation
|
Thanks for your contribution! |
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hparams里面有定义FLAGS_use_stride_kernel吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
而且这个值本身就是定义为环境变量,不用应该再通过参数传入来控制
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FLAGS_use_stride_kernel,目前XPU上有些模型需要设置为true才能跑通,另一些则推荐设置为false以获得性能收益。将这个环境变量放进yaml文件中可以确保用户一行命令启动模型(而不用额外设置环境变量)。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hparams里面有定义FLAGS_use_stride_kernel吗?
已在hparams中添加EnvConfigArguments.FLAGS_use_stride_kernel
XPU 对 ERNIE-4.5-VL-28B-A3B-Thinking 模型的支持
FLAGS_use_stride_kernel参数(设为true/false) 来控制 Stride 机制的开启。请注意:当前在 XPU 上开启此机制会导致性能下降,因此默认设置为关闭 (false)。