fix(eagle3): drop +1 offset on aux layer ids when first id != 1 (#25454)
This commit is contained in:
@@ -2564,9 +2564,12 @@ class DeepseekV2ForCausalLM(nn.Module, DeepseekV2WeightLoaderMixin):
|
|||||||
self.model.layers_to_capture = [2, num_layers // 2, num_layers - 3]
|
self.model.layers_to_capture = [2, num_layers // 2, num_layers - 3]
|
||||||
else:
|
else:
|
||||||
self.capture_aux_hidden_states = True
|
self.capture_aux_hidden_states = True
|
||||||
# we plus 1 here because in sglang, for the ith layer, it takes the output
|
# TODO (Qiaolin-Yu): check if other draft models need similar layer id
|
||||||
# of the (i-1)th layer as aux hidden state
|
# adjustment
|
||||||
self.model.layers_to_capture = [val + 1 for val in layer_ids]
|
if layer_ids and layer_ids[0] == 1:
|
||||||
|
self.model.layers_to_capture = [val + 1 for val in layer_ids]
|
||||||
|
else:
|
||||||
|
self.model.layers_to_capture = list(layer_ids)
|
||||||
|
|
||||||
def set_dflash_layers_to_capture(self, layer_ids: List[int]):
|
def set_dflash_layers_to_capture(self, layer_ids: List[int]):
|
||||||
if not self.pp_group.is_last_rank:
|
if not self.pp_group.is_last_rank:
|
||||||
|
|||||||
Reference in New Issue
Block a user