Support penalty in overlap mode; return logprob with chunked prefill; improve benchmark scripts (#3988)
Co-authored-by: SangBin Cho <rkooo567@gmail.com> Co-authored-by: dhou-xai <dhou@x.ai> Co-authored-by: Hanming Lu <hanming_lu@berkeley.edu>
This commit is contained in:
@@ -329,7 +329,12 @@ class RuntimeEndpoint(BaseBackend):
|
||||
|
||||
def compute_normalized_prompt_logprobs(input_logprobs):
|
||||
values = [x[0] for x in input_logprobs if x[0]]
|
||||
return sum(values) / len(values)
|
||||
try:
|
||||
return sum(values) / len(values)
|
||||
except TypeError:
|
||||
print(f"{input_logprobs=}", flush=True)
|
||||
print(f"{input_logprobs[0]=}", flush=True)
|
||||
exit(-1)
|
||||
|
||||
|
||||
class Runtime:
|
||||
|
||||
Reference in New Issue
Block a user