Skip to content

Conversation

@frozenleaves
Copy link
Contributor

@frozenleaves frozenleaves commented Nov 18, 2025

What does this PR do?

  1. 完善了kernel的自动注册和自动发现机制,现在可以通过apply_available_kernels接口调用所有可用kernels,无需逐个调用
  2. 针对已支持的模型中,不支持swiglu融合算子的MLP层做了排除

@frozenleaves frozenleaves changed the title Main 1118 Temporarily support npu fused options on v0, powered by v1 kernels Nov 18, 2025
@frozenleaves frozenleaves marked this pull request as ready for review November 20, 2025 11:38
@frozenleaves frozenleaves changed the title Temporarily support npu fused options on v0, powered by v1 kernels [v1]Support automatic discovery of registered kernels. Nov 20, 2025
# Bind function as an instance method to preserve `self` semantics
# and replace the original forward
replace_modules.append(module.__class__.__name__)
if module.__class__.__name__ in ("Glm4MLP", "Glm4vTextMLP", "Phi3MLP"):
Copy link
Owner

Choose a reason for hiding this comment

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

A mapping dict is better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, let me modify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@hiyouga hiyouga merged commit f17efde into hiyouga:main Nov 26, 2025
16 checks passed
@hiyouga hiyouga added the solved This problem has been already solved label Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

solved This problem has been already solved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants