Skip to content

Conversation

@DongBaiYue
Copy link

XPU 对 ERNIE-4.5-VL-28B-A3B-Thinking 模型的支持

  • 支持 SFT(监督微调)、SFT with Function Calling 以及高效的 LoRA 微调。
  • 支持 8K 和 32K 上下文长度,暂不支持 128K。
  • 支持通过 YAML 配置文件中的 FLAGS_use_stride_kernel 参数(设为 true / false) 来控制 Stride 机制的开启。请注意:当前在 XPU 上开启此机制会导致性能下降,因此默认设置为关闭 (false)。

@paddle-bot
Copy link

paddle-bot bot commented Dec 4, 2025

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)
Copy link
Collaborator

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吗?

Copy link
Collaborator

Choose a reason for hiding this comment

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

而且这个值本身就是定义为环境变量,不用应该再通过参数传入来控制

Copy link
Author

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文件中可以确保用户一行命令启动模型(而不用额外设置环境变量)。

Copy link
Author

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

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.

2 participants