mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-18 22:44:39 +08:00
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:
@@ -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,
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user