-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix llm serving benchmark issue (#147)
* Fix llm serving benchmark issue Signed-off-by: lvliang-intel <[email protected]>
- Loading branch information
1 parent
a4be366
commit d6bafbd
Showing
5 changed files
with
61 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import logging | ||
|
||
import numpy | ||
import tokenresponse as token | ||
|
||
console_logger = logging.getLogger("locust.stats_logger") | ||
|
||
|
||
def getUrl(): | ||
return "/v1/chat/completions" | ||
|
||
|
||
def getReqData(): | ||
return { | ||
"messages": [{"role": "user", "content": "What is Deep Learning?"}], | ||
"model": "tgi", | ||
"max_tokens": 128, | ||
"n": 1, | ||
"stream": True, | ||
} | ||
|
||
|
||
def respStatics(environment, reqData, respData): | ||
return token.respStatics(environment, reqData, respData) | ||
|
||
|
||
def staticsOutput(environment, reqlist): | ||
token.staticsOutput(environment, reqlist) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters