[ModelRunner V2] Support encoder-only attention (#49331)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com> Co-authored-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
co-authored by
Taneem Ibrahim
parent
0934b26790
commit
fdaa0d9e59
@@ -217,9 +217,14 @@ def warmup_kernels(
|
||||
model_runner.scheduler_config.max_num_seqs,
|
||||
model_runner.scheduler_config.max_num_batched_tokens
|
||||
// max(prompt_len, decode_query_len),
|
||||
# Reserve block 0 (null block) and ensure we have enough blocks.
|
||||
max(1, (model_runner.kv_cache_config.num_blocks - 1) // max_blocks_per_req),
|
||||
)
|
||||
if max_blocks_per_req > 0:
|
||||
# Reserve block 0 (null block) and ensure we have enough blocks.
|
||||
# Encoder-only models allocate no KV blocks, so this cap doesn't apply.
|
||||
num_reqs = min(
|
||||
num_reqs,
|
||||
max(1, (model_runner.kv_cache_config.num_blocks - 1) // max_blocks_per_req),
|
||||
)
|
||||
|
||||
req_ids = [f"_warmup_{i}_" for i in range(num_reqs)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user