[Fix] Fix logprob and normalized_logprob (#1428)
This commit is contained in:
@@ -239,9 +239,12 @@ class RuntimeEndpoint(BaseBackend):
|
||||
# Compute logprob
|
||||
data = {
|
||||
"text": [s.text_ + c for c in choices],
|
||||
"sampling_params": {"max_new_tokens": 0},
|
||||
"sampling_params": {
|
||||
"max_new_tokens": 0,
|
||||
"temperature": 0,
|
||||
},
|
||||
"return_logprob": True,
|
||||
"logprob_start_len": max(prompt_len - 2, 0),
|
||||
"logprob_start_len": max(prompt_len - 2, 0), # for token healing
|
||||
}
|
||||
obj = self._generate_http_request(s, data)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import uuid
|
||||
import warnings
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
import tqdm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user