Separate swa and local attention chunk cache eviction (#15820)
This commit is contained in:
@@ -82,9 +82,7 @@ class EagleDraftInputV2Mixin:
|
||||
def prepare_for_decode(self: EagleDraftInput, batch: ScheduleBatch):
|
||||
if isinstance(batch.tree_cache, SWAChunkCache):
|
||||
for req in batch.reqs:
|
||||
batch.tree_cache.evict_swa(
|
||||
req, req.seqlen - 1, batch.model_config.attention_chunk_size
|
||||
)
|
||||
batch.tree_cache.evict_swa(req, req.seqlen - 1)
|
||||
|
||||
from sglang.srt.speculative.spec_utils import assign_req_to_token_pool_func
|
||||
|
||||
|
||||
@@ -368,9 +368,7 @@ class EAGLEWorker(TpModelWorker):
|
||||
def _draft_preprocess_decode(self, batch: ScheduleBatch):
|
||||
if isinstance(batch.tree_cache, SWAChunkCache):
|
||||
for req in batch.reqs:
|
||||
batch.tree_cache.evict_swa(
|
||||
req, req.seqlen - 1, batch.model_config.attention_chunk_size
|
||||
)
|
||||
batch.tree_cache.evict_swa(req, req.seqlen - 1)
|
||||
|
||||
# Parse args
|
||||
num_seqs = batch.batch_size()
|
||||
|
||||
@@ -348,9 +348,7 @@ class MultiLayerEagleWorker(TpModelWorker):
|
||||
def _draft_preprocess_decode(self, batch: ScheduleBatch):
|
||||
if isinstance(batch.tree_cache, SWAChunkCache):
|
||||
for req in batch.reqs:
|
||||
batch.tree_cache.evict_swa(
|
||||
req, req.seqlen - 1, batch.model_config.attention_chunk_size
|
||||
)
|
||||
batch.tree_cache.evict_swa(req, req.seqlen - 1)
|
||||
|
||||
# Parse args
|
||||
num_seqs = batch.batch_size()
|
||||
|
||||
Reference in New Issue
Block a user