Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Qwen-7B_fastllm
Commits
a9bd16ac
Commit
a9bd16ac
authored
Sep 14, 2023
by
zhouxiang
Browse files
增加benchmark性能测试程序
parent
e61fbb53
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
1 deletion
+12
-1
README.md
README.md
+8
-0
benchmark
benchmark
+0
-0
cli_demo.py
cli_demo.py
+2
-1
prompts/beijing.txt
prompts/beijing.txt
+1
-0
prompts/hello.txt
prompts/hello.txt
+1
-0
No files found.
README.md
View file @
a9bd16ac
...
@@ -70,6 +70,14 @@ python cli_demo.py -p qwen-7b-int8.bin
...
@@ -70,6 +70,14 @@ python cli_demo.py -p qwen-7b-int8.bin
# 简易webui,需要先安装streamlit-chat
# 简易webui,需要先安装streamlit-chat
streamlit run web_demo.py qwen-7b-int8.bin
streamlit run web_demo.py qwen-7b-int8.bin
# 可以使用benchmark程序进行性能测试,根据./benchmark -h描述进行配置和测试
# 测试示例如下:
./benchmark -p qwen-7b-int8.bin -f prompts/beijing.txt -b 1
./benchmark -p qwen-7b-int8.bin -f prompts/beijing.txt -b 1
./benchmark -p qwen-7b-int8.bin -f prompts/hello.txt -b 512 -l 18
# 如果benchmark没有可执行权限,需要手动添加后执行性能测试
chmod +x benchmark
```
```
## 运行效果展示
## 运行效果展示
...
...
benchmark
0 → 100644
View file @
a9bd16ac
File added
cli_demo.py
View file @
a9bd16ac
# coding=utf-8
import
argparse
import
argparse
from
fastllm_pytools
import
llm
from
fastllm_pytools
import
llm
def
args_parser
():
def
args_parser
():
parser
=
argparse
.
ArgumentParser
(
description
=
'
fastllm
_chat_demo'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
qwen
_chat_demo'
)
parser
.
add_argument
(
'-p'
,
'--path'
,
type
=
str
,
required
=
True
,
default
=
''
,
help
=
'模型文件的路径'
)
parser
.
add_argument
(
'-p'
,
'--path'
,
type
=
str
,
required
=
True
,
default
=
''
,
help
=
'模型文件的路径'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
return
args
return
args
...
...
prompts/beijing.txt
0 → 100644
View file @
a9bd16ac
北京有什么景点?
\ No newline at end of file
prompts/hello.txt
0 → 100644
View file @
a9bd16ac
Hello!
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment