[GLM-5.3-Flash] Drop the NextN layer from the KDA state pool (#44098)
Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
This commit is contained in:
co-authored by
Mohammad Angkad
parent
ac187c0cd5
commit
7f0434e4af
@@ -250,11 +250,6 @@ class Glm5NextTextConfig(PretrainedConfig):
|
||||
def linear_layer_ids(self):
|
||||
return [i for i in range(self.num_hidden_layers) if self.is_kda_layer(i)]
|
||||
|
||||
@property
|
||||
def nextn_layer_ids(self):
|
||||
num_nextn_layers = self.num_nextn_predict_layers or 0
|
||||
return [self.num_hidden_layers + i for i in range(num_nextn_layers)]
|
||||
|
||||
@property
|
||||
def full_attention_layer_ids(self):
|
||||
return [i for i in range(self.num_hidden_layers) if not self.is_kda_layer(i)]
|
||||
|
||||
@@ -1438,16 +1438,13 @@ class KVCacheConfigurator:
|
||||
)
|
||||
|
||||
def _get_mamba_layer_ids_for_req_pool(self) -> list:
|
||||
mamba_layer_ids = [
|
||||
# Target layers on this rank only; a draft holding linear state gets its own
|
||||
# pool via clone_with_new_mamba.
|
||||
return [
|
||||
i
|
||||
for i in self.mambaish_config.mamba2_cache_params.layers
|
||||
if self.layer_info.start_layer <= i < self.layer_info.end_layer
|
||||
]
|
||||
if max_speculative_num_draft_tokens():
|
||||
for layer_id in getattr(self.mambaish_config, "nextn_layer_ids", []):
|
||||
if layer_id not in mamba_layer_ids:
|
||||
mamba_layer_ids.append(layer_id)
|
||||
return mamba_layer_ids
|
||||
|
||||
def _get_ple_req_pool_kwargs(self) -> dict[str, Any]:
|
||||
from sglang.srt.configs.qwen4_exp import Qwen4ExpTextConfig
|
||||
|
||||
Reference in New Issue
Block a user