vllm icon indicating copy to clipboard operation
vllm copied to clipboard

Raise error for long prompt

Open LiuXiaoxuanPKU opened this issue 1 year ago • 2 comments

This is a fix for #113. The program hangs when the input prompt is too long because the check will always succeed and the request will always in the waiting queue and will never be added to the running queue. Add a check before the if statement, if the prompt length is too long, it will raise ValueError directly.

LiuXiaoxuanPKU avatar Jun 27 '23 04:06 LiuXiaoxuanPKU

Hi Lily, please check all the possible situations here and make sure you can handle all of them. Thanks!

zhuohan123 avatar Jun 27 '23 16:06 zhuohan123

I move forward with the length check. The original code should already handle the len(prompt) + len(generated) > limit case, so I only deal with model limit and len(prompt) > limit. Let me know if there are any problems, thanks!

LiuXiaoxuanPKU avatar Jun 28 '23 03:06 LiuXiaoxuanPKU