Commit 8e1a3267 authored by root's avatar root
Browse files

change bert99.md

parent 999835ed
......@@ -99,16 +99,66 @@ ln -sf /root/MLC/repos/local/cache/download-file_bert-get-datase_8f14db6c/vocab.
---
## 5. 执行推理测试
---
运行精度模式下的 `SingleStream` 场景测试:
### 5.1.测试命令
```bash
# 启动推理测试 (预览模式: 100个样本)
python3 run.py --backend tf --scenario SingleStream --accuracy --max_examples 100
|目标指标 | 场景 | 测试命令 |
| --- | --- |--- |
|最大吞吐量| **Offline** | `python3 run.py --backend tf --scenario Offline` |
|最低延时| **SingleStream** | `python3 run.py --backend tf --scenario SingleStream` |
|最大并发流| **MultiStream** | `python3 run.py --backend tf --scenario MultiStream` |
|20ms约束QPS| **Server** | `python3 run.py --backend tf --scenario Server(需配合 user.conf)` |
---
### 5.2. 如何设置“P99 20ms”和“目标QPS”?
要实现你要求的特定约束(如 Server 场景下 P99 < 20ms),你需要修改或创建一个 `user.conf` 文件。
**操作步骤:**
1.`inference/language/bert` 目录下查找或新建一个名为 `user.conf` 的文件。
2. 在文件中添加以下内容(根据你的需求自定义数值):
```ini
# 设置 Server 场景的目标 QPS 和延迟约束
bert.Server.target_qps = 100
bert.Server.target_latency = 20
# 设置 Offline 场景的目标吞吐量
bert.Offline.target_qps = 1000
# 设置 MultiStream 的延迟约束
bert.MultiStream.target_latency = 50
```
3. **运行命令时指定配置文件:**
使用 `--user_conf` 参数加载该配置:
```bash
python3 run.py --backend tf --scenario Server --user_conf user.conf
```
---
### 5.3. 如何找到最终的性能指标?
运行成功后,请忽略图片 1 中显示的“No warnings/errors”,直接抓取 `mlperf_log_summary.txt` 中的数据:
* **最大吞吐量 (Offline):** 查找 `Samples per second`
* **最低延时 (SingleStream):** 查找 `Mean latency``90.00% percentile latency`
* **P99 20ms 下的吞吐量 (Server):** 1. 首先确认 `Result is : VALID`(表示 99% 的请求都在你设定的 20ms 内完成了)。
2. 查找 `Scheduled samples per second`,这就是该约束下的最大吞吐量。
* **最大并发流数 (MultiStream):** 查找 `Samples per query`
### 参数说明:
* `--backend tf`: 指定使用 TensorFlow 后端。
......@@ -118,12 +168,4 @@ python3 run.py --backend tf --scenario SingleStream --accuracy --max_examples 10
---
## 6. 预期结果
测试完成后,结果将保存于 `build/result/`
* **精度验证**:通过 `accuracy-squad.py` 检查 F1 分数是否达标。
* **性能验证**:查看 `mlperf_log_summary.txt` 获取 Latency(延迟)和 QPS(吞吐量)数据。
---
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment