"...git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "d2a7938582011cb0dd117fec468221dc5e3d22a2"
Commit deae0a22 authored by 王敏's avatar 王敏
Browse files

[fix]解决宽松mtp1报错

parent afd18c9c
...@@ -239,12 +239,17 @@ class EagleProposer: ...@@ -239,12 +239,17 @@ class EagleProposer:
if envs.VLLM_REJECT_SAMPLE_OPT: if envs.VLLM_REJECT_SAMPLE_OPT:
draft_prob = logits.softmax(dim=-1, dtype=torch.float32) draft_prob = logits.softmax(dim=-1, dtype=torch.float32)
draft_probs_list = [draft_prob]
# Early exit if there is only one draft token to be generated. # Early exit if there is only one draft token to be generated.
if self.num_speculative_tokens == 1: if self.num_speculative_tokens == 1:
# [batch_size, 1] # [batch_size, 1]
if envs.VLLM_REJECT_SAMPLE_OPT:
return draft_token_ids.view(-1, 1), draft_prob.view(-1, 1, logits.shape[-1])
return draft_token_ids.view(-1, 1) return draft_token_ids.view(-1, 1)
if envs.VLLM_REJECT_SAMPLE_OPT:
draft_probs_list = [draft_prob]
# TODO: Currently, MTP module released by deepseek only has # TODO: Currently, MTP module released by deepseek only has
# one layer. Adapt this code to support multiple layers once # one layer. Adapt this code to support multiple layers once
......
...@@ -166,12 +166,17 @@ class V1ZeroEagleProposer(EagleProposer): ...@@ -166,12 +166,17 @@ class V1ZeroEagleProposer(EagleProposer):
if envs.VLLM_REJECT_SAMPLE_OPT: if envs.VLLM_REJECT_SAMPLE_OPT:
draft_prob = logits.softmax(dim=-1, dtype=torch.float32) draft_prob = logits.softmax(dim=-1, dtype=torch.float32)
draft_probs_list = [draft_prob]
# Early exit if there is only one draft token to be generated. # Early exit if there is only one draft token to be generated.
if self.num_speculative_tokens == 1: if self.num_speculative_tokens == 1:
# [batch_size, 1] # [batch_size, 1]
if envs.VLLM_REJECT_SAMPLE_OPT:
return draft_token_ids.view(-1, 1), draft_prob.view(-1, 1, logits.shape[-1])
return draft_token_ids.view(-1, 1) return draft_token_ids.view(-1, 1)
if envs.VLLM_REJECT_SAMPLE_OPT:
draft_probs_list = [draft_prob]
# TODO: Currently, MTP module released by deepseek only has # TODO: Currently, MTP module released by deepseek only has
# one layer. Adapt this code to support multiple layers once # one layer. Adapt this code to support multiple layers once
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment