Repetition Penalty
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I've come to the conclusion that the field repetition_penalty, which can be found here, is not being used.
However, this field is supported by the vllm module.
When I checkout the endpoint which is using this request model, I don't see that this field in the model gets mapped within get_gen_params Is there a reason for this? I'd like to test this field out, but it seems not supported and the default value is 1.0.
Our own created chat model is repeating itself over and over again, so I want to checkout if this fields will help us out.
When I checkout the vllm code, the docs state the following:
repetition_penalty: Float that penalizes new tokens based on whether
they appear in the prompt and the generated text so far. Values > 1
encourage the model to use new tokens, while values < 1 encourage
the model to repeat tokens.
So I guess that this field is just what we need, but I can't seem to give this field a different value than 1.0. Is there a reason for this field not being mapped (anymore?)?
Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with fastchat/protocol/api_protocol.py and fastchat/serve/openai_api_server.py, especially get_gen_params. Compare the request model's repetition_penalty field with the parameters passed to the vllm module. Done means a non-default repetition_penalty value from the endpoint request reaches generation rather than remaining at 1.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100