Skip to content
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 frequency penalty #713

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

support frequency penalty #713

wants to merge 1 commit into from

Conversation

RytonLi
Copy link

@RytonLi RytonLi commented Nov 20, 2023

Motivation

support more sampling ways, like presence_penalty(already implemented but never used) and frequency_penalty(supported in vllm).

Modification

I mainly add a kernal function in src/turbomind/kernels/sampling_penalty_kernels.cu, which implemented frequency penalty sampling method. Then enable it by add presence_penalty and frequency_penalty param in src/turbomind/models/llama/LlamaBatch.cc, where I just reuse the buffer h_repetition_penalty_.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant