[AMD] Fix DSv4 draft extend taking the target compression path during prefill (#37713)
This commit is contained in:
@@ -481,9 +481,9 @@ class DeepseekV4HipRadixBackend(
|
|||||||
self.mtp_enabled = self.topk > 0
|
self.mtp_enabled = self.topk > 0
|
||||||
self.speculative_num_steps = speculative_num_steps
|
self.speculative_num_steps = speculative_num_steps
|
||||||
self.speculative_num_draft_tokens: int = get_spec().speculative_num_draft_tokens
|
self.speculative_num_draft_tokens: int = get_spec().speculative_num_draft_tokens
|
||||||
|
self.is_draft_worker = getattr(model_runner, "is_draft_worker", False)
|
||||||
self.is_dspark_draft = (
|
self.is_dspark_draft = (
|
||||||
getattr(model_runner, "is_draft_worker", False)
|
self.is_draft_worker and model_runner.spec_algorithm.is_dspark()
|
||||||
and model_runner.spec_algorithm.is_dspark()
|
|
||||||
)
|
)
|
||||||
self.target_verify_num_draft_tokens = self.speculative_num_draft_tokens
|
self.target_verify_num_draft_tokens = self.speculative_num_draft_tokens
|
||||||
if self.is_dspark_draft:
|
if self.is_dspark_draft:
|
||||||
@@ -1149,7 +1149,9 @@ class DeepseekV4HipRadixBackend(
|
|||||||
and extend_seq_lens is not None
|
and extend_seq_lens is not None
|
||||||
and extend_seq_lens_cpu is not None
|
and extend_seq_lens_cpu is not None
|
||||||
)
|
)
|
||||||
is_draft = forward_batch.forward_mode.is_draft_extend_v2()
|
is_draft = (
|
||||||
|
forward_batch.forward_mode.is_draft_extend_v2() or self.is_draft_worker
|
||||||
|
)
|
||||||
metadata = self.init_forward_metadata_prefill(
|
metadata = self.init_forward_metadata_prefill(
|
||||||
max_seq_len=max_seq_len,
|
max_seq_len=max_seq_len,
|
||||||
req_pool_indices=req_pool_indices,
|
req_pool_indices=req_pool_indices,
|
||||||
|
|||||||
Reference in New Issue
Block a user