native top_p_sampling (#2901)

This commit is contained in:
lifulll
2025-07-22 14:09:59 +08:00
committed by GitHub
parent 0eedbdaee0
commit 2c6a9e887e
14 changed files with 93 additions and 7 deletions

View File

@@ -61,6 +61,7 @@ class LinearBase(nn.Layer):
or current_platform.is_xpu()
or current_platform.is_iluvatar()
or current_platform.is_gcu()
or current_platform.is_dcu()
):
self.forward = self.forward_cuda
else: