You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation of optimized topp/topk calculations for scalar
case is handling the duplicates that are outside of kth border.
Unfortunately, to analyze duplicates it is necessary to make a
synchronization with CPU, what makes multi-step scheduling useless
together with topp/topk.
This PR adds option to skip duplicates handling with
`VLLM_HANDLE_TOPK_DUPLICATES` (default `True`). When this variable is
set, handling duplicates will be skipped and we will avoid
synchronization with CPU. It also removes the synchronization which was
done earlier in Sampler, by saving scalar value of `top_k` and `top_p`.
It should give performance gain for all benchmarks with these sampling
parameters, especially together with multi-step scheduling.
While disabling the duplicates handling may cause small accuracy
differences, the best solution will be to handle duplicates without
synchronization with CPU. However, this is not a trivial problem, so I
will try to provide such solution later.
0 commit comments