mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-23 00:31:23 +08:00
[NVIDIA] flashinfer TRTLLM attention prefill token limit (#25998)
Signed-off-by: jasonlizhengjian <jason.li@centml.ai> Signed-off-by: jasonlizhengjian <jasonlizhengjian@gmail.com>
This commit is contained in:
parent
9c3c21c519
commit
6b6e98775f
@ -283,11 +283,18 @@ def use_trtllm_attention(
|
|||||||
|
|
||||||
if force_use_trtllm is None:
|
if force_use_trtllm is None:
|
||||||
# Environment variable not set - use auto-detection
|
# Environment variable not set - use auto-detection
|
||||||
use_trtllm = (
|
if is_prefill:
|
||||||
num_tokens <= 256 and max_seq_len <= 131072 and kv_cache_dtype == "auto"
|
# Prefill auto-detection
|
||||||
)
|
use_trtllm = max_seq_len <= 131072 and kv_cache_dtype == "auto"
|
||||||
if use_trtllm:
|
if use_trtllm:
|
||||||
logger.warning_once("Using TRTLLM attention (auto-detected).")
|
logger.warning_once("Using TRTLLM prefill attention (auto-detected).")
|
||||||
|
else:
|
||||||
|
# Decode auto-detection
|
||||||
|
use_trtllm = (
|
||||||
|
num_tokens <= 256 and max_seq_len <= 131072 and kv_cache_dtype == "auto"
|
||||||
|
)
|
||||||
|
if use_trtllm:
|
||||||
|
logger.warning_once("Using TRTLLM decode attention (auto-detected).")
|
||||||
return use_trtllm
|
return use_trtllm
|
||||||
|
|
||||||
# Environment variable is set to 1 - respect it
|
# Environment variable is set to 1 - respect it
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user