-
Notifications
You must be signed in to change notification settings - Fork 632
[FastDeploy Cli] Bench Command eval and throughput #4239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
qwes5s5
wants to merge
17
commits into
PaddlePaddle:develop
Choose a base branch
from
qwes5s5:bench-command
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
K11OntheBoat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Thanks for your contribution! |
…into bench-command
…into bench-command
…into bench-command
…into bench-command
…into bench-command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
增加 FastDeploy Bench CLI:基准测试工具
FastDeploy CLI 新增了
bench
命令,集成了 评估(eval) 和 吞吐量(throughput) 两种基准测试功能1. 评估(Eval)
fastdeploy bench eval
命令利用lm-eval
框架对在线服务进行效果基准测试。2. 吞吐量(Throughput)
fastdeploy bench throughput
命令用于创建推理引擎并进行吞吐量基准测试。使用示例 1:
使用示例 2:
核心参数
1. 后端选择参数
--backend
: 指定推理后端,可选 fastdeploy (默认), hf (HuggingFace) 或 fastdeploy-chat。--model
: 模型名称或本地路径。--tokenizer
: Tokenizer 的路径,默认为--model
指定的路径。2. 数据集参数
--dataset-name
: 数据集类型,支持 EBChat, random (默认) 或 EB。--dataset-path
: 数据集文件的路径。--input-len
: 输入提示的长度(在使用随机数据集时必需)。--output-len
: 生成的输出长度(此参数会覆盖数据集中原始的输出长度)。3. 基准测试参数
--n
: 每个提示生成的序列数,默认为1
。--num-prompts
: 要处理的提示数量,默认为50
。--hf-max-batch-size
: 当使用 HF 后端时,指定最大批次大小。--output-json
: 保存吞吐量测试结果的 JSON 文件路径。--disable-detokenize
: 禁用解码时间统计。4. LoRA 相关参数
--lora-path
: LoRA 适配器的路径。--prefix-len
: 请求中随机上下文前的固定前缀 token 数。5. 随机数据集参数
--random-range-ratio
: 输入/输出长度的采样范围比例,取值范围为0-1
。6. 引擎参数(通过 EngineArgs 添加,详见fastdeploy/engine/args_utils.py)
--tensor-parallel-size
: 张量并行度。--disable-prefix-caching
: 禁用前缀缓存功能。--max-model-len
: 模型的最大上下文长度。--gpu-memory-utilization
: GPU 内存的利用率。