mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 00:33:03 +08:00
Sync v2.0 version of code to github repo
This commit is contained in:
@@ -14,10 +14,16 @@
|
||||
# limitations under the License.
|
||||
"""
|
||||
|
||||
import paddle
|
||||
from typing import Optional
|
||||
|
||||
import paddle
|
||||
|
||||
from fastdeploy.platforms import current_platform
|
||||
|
||||
if current_platform.is_cuda():
|
||||
from fastdeploy.model_executor.ops.gpu import \
|
||||
append_attention as append_attention_gpu
|
||||
|
||||
|
||||
def append_attention(
|
||||
qkv: paddle.Tensor,
|
||||
@@ -68,14 +74,12 @@ def append_attention(
|
||||
speculate_max_draft_token_num: int = 1,
|
||||
causal: bool = True,
|
||||
speculate_decoder: bool = False,
|
||||
):
|
||||
) -> paddle.Tensor:
|
||||
"""
|
||||
Args:
|
||||
Returns:
|
||||
append_attention
|
||||
"""
|
||||
if current_platform.is_cuda():
|
||||
from fastdeploy.model_executor.ops.gpu import append_attention
|
||||
out = append_attention(
|
||||
out = append_attention_gpu(
|
||||
qkv,
|
||||
key_cache,
|
||||
value_cache,
|
||||
|
Reference in New Issue
Block a user