perf: avoid unnecessary gpu-cpu sync in eagle_info (#20266)
Co-authored-by: root <qianhao@zhejianglab.org>
This commit is contained in:
@@ -339,7 +339,7 @@ class EagleVerifyInput(SpecInput, EagleVerifyInputV2Mixin):
|
||||
sampling_info.top_ks, self.draft_token_num, dim=0
|
||||
),
|
||||
) # (bs * draft_token_num, vocab_size)
|
||||
if not torch.all(sampling_info.top_ps == 1.0):
|
||||
if sampling_info.need_top_p_sampling:
|
||||
target_probs = top_p_renorm_prob(
|
||||
target_probs,
|
||||
torch.repeat_interleave(
|
||||
|
||||
Reference in New Issue
Block a user