-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support min_p sampling parameter #2420
Conversation
@@ -23,27 +23,29 @@ | |||
|
|||
namespace turbomind { | |||
|
|||
struct DynamicDecodeCommonArgs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like struct AttentionParam
, struct ModelParam
, let's use struct DecodeParam
template<typename T> | ||
void invokeTopPSort(TopPSortParams& params, cudaStream_t stream); | ||
|
||
struct TopPMinPFilterParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct TopPMinPFilterParams
is a subset of struct TopPSortPrams
except the float* min_ps
.
Can we merge them together?
float thread_sum = s_sum; | ||
topk_tmp_id_buf += batch_id * stride; | ||
for (int i = tid; i < k; i += BLOCK_SIZE) { | ||
sorted_logits[i] = s_val2[i] / thread_sum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that top-k doesn't use the 1e-6f
eps like top-p does?
Very excited to test this - thank you! 🙏 |
support min_p sampling option
#1745