Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 29, 2024
1 parent d5e03d2 commit e6a4c3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion evals/benchmark/stresscli/locust/chatqnafixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def getReqData():
return {
"messages": "In a world where technology has advanced beyond our wildest dreams, humanity stands on the brink of a new era. The year is 2050, and artificial intelligence has become an integral part of everyday life. Autonomous vehicles zip through the streets, drones deliver packages with pinpoint accuracy, and smart homes anticipate every need of their inhabitants. But with these advancements come new challenges and ethical dilemmas. As society grapples with the implications of AI, questions about privacy, security, and the nature of consciousness itself come to the forefront. Please answer me about what is artificial intelligence.",
"max_tokens": 128,
"top_k": 1
"top_k": 1,
}


Expand Down
4 changes: 3 additions & 1 deletion evals/benchmark/stresscli/locust/tokenresponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def respStatics(environment, req, resp):
else:
num_token_input_prompt = -1

num_token_output = len(tokenizer.encode(resp["response_string"].encode("utf-8").decode("unicode_escape"),add_special_tokens=False))
num_token_output = len(
tokenizer.encode(resp["response_string"].encode("utf-8").decode("unicode_escape"), add_special_tokens=False)
)

return {
"tokens_input": num_token_input_prompt,
Expand Down

0 comments on commit e6a4c3a

Please sign in to comment.