update flake8 version to support pre-commit in python3.12 (#3000)

* update flake8 version to support pre-commit in python3.12

* polish code
This commit is contained in:
Zero Rains
2025-07-24 16:43:31 +08:00
committed by GitHub
parent 5151bc92c8
commit 0fb37ab7e4
30 changed files with 324 additions and 275 deletions

View File

@@ -54,8 +54,8 @@ def apply_penalty_multi_scores(
eos_token_ids,
)
elif current_platform.is_dcu():
from fastdeploy.model_executor.ops.gpu import \
get_token_penalty_multi_scores
from fastdeploy.model_executor.ops.gpu import get_token_penalty_multi_scores
logits = get_token_penalty_multi_scores(
pre_token_ids,
prompt_ids,

View File

@@ -81,6 +81,7 @@ def top_k_top_p_sampling(
_, ids = gcu_top_p_sampling(x, top_p)
elif current_platform.is_dcu():
from fastdeploy.model_executor.layers.backends import native_top_p_sampling
_, ids = native_top_p_sampling(x, top_p)
else:
_, ids = paddle.tensor.top_p_sampling(