Skip to content

Commit

Permalink
Merge pull request #405 from NexaAI/perry-eval
Browse files Browse the repository at this point in the history
fixed nexa eval ifeval problem
  • Loading branch information
zhycheng614 authored Feb 27, 2025
2 parents 31abc0e + 2236029 commit bb4aea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nexa/eval/nexa_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ def __init__(self, model_path=None, local_path=None, **kwargs):
self.temperature = 0

def gguf_completion(
self, context, max_tokens = None, continuation = None, stop=None
self, context, max_tokens = None, continuation = None, stop=None, benchmark_disable_logprobs=False
):
try:
prompt = context
params = {
"prompt": prompt,
"logprobs": self.logprobs,
"logprobs": self.logprobs if not benchmark_disable_logprobs else None,
"temperature": self.temperature,
"max_tokens": max_tokens,
"eval_context_length": len(context)
Expand Down Expand Up @@ -81,7 +81,7 @@ def generate_until(self, requests, disable_tqdm: bool = False):
request_args = request[1]
until = request_args.get("until", ["</s>"])
max_tokens = request_args.get("max_gen_toks", None)
response = self.gguf_completion(context=inp, stop=until, max_tokens=max_tokens)
response = self.gguf_completion(context=inp, stop=until, max_tokens=max_tokens, benchmark_disable_logprobs=True)
if response and "choices" in response and response["choices"]:
choice = response["choices"][0]
if "text" in choice:
Expand Down

0 comments on commit bb4aea8

Please sign in to comment.