continue icon indicating copy to clipboard operation
continue copied to clipboard

Support "repetition penality" in completion options

Open simon376 opened this issue 5 months ago • 4 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [x] I'm not able to find an open issue that requests the same enhancement

Problem

vLLM (and maybe others?) support the Sampling Parameter repetition_penalty. this is used in the official recommended sampling parameters by Qwen 2.5 (-Coder). src1 src2

It's definition slightly differs from the existing presencePenalty (highlight by me):

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.

presence_penalty – Float that penalizes new tokens based on whether they appear in the generated text so far. Values > 0 encourage the model to use new tokens, while values < 0 encourage the model to repeat tokens.

src: vllm docs

Solution

add optional repetitionPenalty parameter to completionOptions

simon376 avatar Sep 23 '24 12:09 simon376