Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan committed May 29, 2024
1 parent 77ca908 commit af81f45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llm_eval/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def post_process_output(self, prompt, output):
if self.current_model == 'meta-llama/Llama-2-7b-chat-hf':
output = output[len(prompt)-1:]
pattern = re.compile(r'\{\s*"(.+?)"\s*:\s*"(.+?)"\s*\}')
match = re.findall(pattern, "target_text")[-1]
match = re.findall(pattern, output)[-1]
return {match.group(1): match.group(2)} if match else output

def prepare_output(self):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "llm-eval"
version = "0.5.10"
version = "0.5.11"
authors = [
{name = "Jonathan Eisenzopf", email = "[email protected]"},
]
Expand Down

0 comments on commit af81f45

Please sign in to comment.