Skip to content

Commit cee30bc

Browse files
Dryoung95dryoung
authored andcommitted
docs(rfcs): add PaddleOCR-VL Metax stage1 report
1 parent 9aae745 commit cee30bc

3 files changed

Lines changed: 617 additions & 0 deletions
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# FastDeploy PaddleOCR-VL Metax 适配阶段一证据清单
2+
3+
| 任务名称 | FastDeploy PaddleOCR-VL Metax 适配阶段一证据清单 |
4+
|------|------|
5+
| 提交作者 | Dryoung |
6+
| 提交时间 | 2026-04-23 |
7+
| 版本号 | V1.0 |
8+
| 文件名 | 20260423_paddleocr_vl_metax_stage1_evidence_manifest_for_fastdeploy.md |
9+
| 说明 | 本文用于汇总阶段一主报告对应的本地证据产物路径,便于 PR 描述或评审追溯 |
10+
11+
## 1. 提交包内容
12+
13+
本文档已落位于 `community/rfcs/FastDeploy/`,作为阶段一正式报告的配套证据清单,不修改原始事实材料,仅引用已生成产物。
14+
15+
当前落位文件包含:
16+
17+
- `20260423_paddleocr_vl_metax_stage1_report_for_fastdeploy.md`
18+
- `20260423_paddleocr_vl_metax_stage1_exec_summary_for_fastdeploy.md`
19+
- `20260423_paddleocr_vl_metax_stage1_evidence_manifest_for_fastdeploy.md`
20+
21+
## 2. 当前社区仓库落位文件
22+
23+
- 正式报告:
24+
- `/data/community/rfcs/FastDeploy/20260423_paddleocr_vl_metax_stage1_report_for_fastdeploy.md`
25+
- 一页摘要:
26+
- `/data/community/rfcs/FastDeploy/20260423_paddleocr_vl_metax_stage1_exec_summary_for_fastdeploy.md`
27+
- 证据清单:
28+
- `/data/community/rfcs/FastDeploy/20260423_paddleocr_vl_metax_stage1_evidence_manifest_for_fastdeploy.md`
29+
30+
## 3. patch15 说明与 patch
31+
32+
- `patch15` 正式变更说明:
33+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_change_note_zh.md`
34+
- 全量统一 patch:
35+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_unified.patch`
36+
- 5 个必需文件 patch:
37+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_required.patch`
38+
- 1 个环境兜底文件 patch:
39+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_env_fallback.patch`
40+
- patch15 产物清单:
41+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_manifest.txt`
42+
- patch15 收口摘要:
43+
- `/data/FastDeploy_release_2_4_metax/patch15_artifacts/patch15_summary_zh.md`
44+
45+
## 4. 服务验证结果
46+
47+
- 最小服务日志:
48+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/service.log`
49+
- 最小服务启动命令:
50+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/service_command.txt`
51+
- 最小服务状态:
52+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/service_status.json`
53+
- 单请求 OCR 结果:
54+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/request_result.json`
55+
- 最小 benchmark 基线:
56+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/benchmark.json`
57+
- 阶段推进总结:
58+
- `/data/FastDeploy_release_2_4_metax/run_stage_next/stage_next_summary.md`
59+
60+
## 5. benchmark matrix
61+
62+
- 成功配置说明:
63+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/success_config.md`
64+
- benchmark matrix 原始结果:
65+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/benchmark_matrix.json`
66+
- benchmark matrix 摘要:
67+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/benchmark_matrix_summary.md`
68+
69+
## 6. 正式 benchmark
70+
71+
- 当前正式服务状态:
72+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/formal_service_status.json`
73+
- 当前正式服务命令:
74+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/formal_service_command.txt`
75+
- 当前正式服务日志:
76+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/formal_service.log`
77+
- 正式 benchmark 原始结果:
78+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/benchmark_formal.json`
79+
- 正式 benchmark 日志:
80+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/benchmark_formal.log`
81+
- 正式 benchmark 摘要:
82+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/benchmark_formal_summary.md`
83+
84+
## 7. 长尾复核
85+
86+
- 长尾复核原始结果:
87+
- `/data/FastDeploy_release_2_4_metax/run_stage_tailcheck/tailcheck_seq1_len1024.json`
88+
- 长尾复核摘要:
89+
- `/data/FastDeploy_release_2_4_metax/run_stage_tailcheck/tailcheck_summary.md`
90+
- 长尾复核服务状态:
91+
- `/data/FastDeploy_release_2_4_metax/run_stage_tailcheck/tailcheck_service_status.json`
92+
- 长尾复核服务日志:
93+
- `/data/FastDeploy_release_2_4_metax/run_stage_tailcheck/tailcheck_service.log`
94+
95+
## 8. profiling 证据
96+
97+
- profiler 工具检查:
98+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiler_check.md`
99+
- 轻量 profiling 汇总:
100+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiling/profiling_summary.json`
101+
- `mx-smi` 采样结果:
102+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiling/mxsmi_trace.json`
103+
- `mx-smi` 采样日志:
104+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiling/mxsmi_trace.log`
105+
- profiling 期间请求结果:
106+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiling/profiling_requests.json`
107+
- 阶段一分析初稿:
108+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/stage1_draft_zh.md`
109+
110+
## 9. py-spy / ptrace 限制说明
111+
112+
- `py-spy` 解锁方案:
113+
- `/data/FastDeploy_release_2_4_metax/run_stage_benchfinal/pyspy_unblock_plan.md`
114+
- `py-spy` attach 报错证据:
115+
- `/data/FastDeploy_release_2_4_metax/run_stage_formal/profiling/pyspy_attach_error.txt`
116+
117+
## 10. 当前落位状态
118+
119+
当前阶段一材料已完成 community 仓库落位,已包含:
120+
121+
- 正式报告
122+
- 一页摘要
123+
- `patch15` 说明与补丁
124+
- 服务跑通证据
125+
- benchmark 小矩阵结果
126+
- 正式 benchmark 结果
127+
- 长尾复核结论
128+
- profiling 轻量证据
129+
- `py-spy/ptrace` 限制说明
130+
131+
说明:
132+
133+
- 本清单中的证据路径大多仍指向本地工作目录,用于 PR 说明、评审复核或后续附件上传。
134+
- 当前已完成“文档落位”,仓库级提交流程状态以 `community` 仓库当前 `git status` 为准。
135+
136+
## 11. PR 前仍需完成的动作
137+
138+
1. 检查并确认 PR 目标分支与标题
139+
- 当前文件已经按 `rfcs/FastDeploy` 目录现有命名风格落位。
140+
- 开 PR 前仍需确认目标分支、PR 标题和评审人要求。
141+
142+
2. 审核是否需要补充 PR 描述中的证据引用
143+
- 当前主文档、摘要和证据清单已齐备。
144+
- 若评审习惯要求把关键日志、patch 或 benchmark 结果节选写入 PR 描述,还需整理到 PR 文本中。
145+
146+
3. 执行 git 提交流程
147+
-`community` 仓库内完成分支创建、diff 检查、commit、push 与 PR 创建。
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# FastDeploy PaddleOCR-VL Metax 适配阶段一执行摘要
2+
3+
| 任务名称 | FastDeploy PaddleOCR-VL Metax 适配阶段一执行摘要 |
4+
|------|------|
5+
| 提交作者 | Dryoung |
6+
| 提交时间 | 2026-04-23 |
7+
| 版本号 | V1.0 |
8+
| 文件名 | 20260423_paddleocr_vl_metax_stage1_exec_summary_for_fastdeploy.md |
9+
| 说明 | 本文为阶段一主报告的 1 页摘要版本,用于评审快速阅读 |
10+
11+
## 1. 结论
12+
13+
阶段一已经达到提交基础。`patch15` 已完成 build、install、smoke 闭环验证;基于已安装包的 PaddleOCR-VL 在线服务已经跑通;单请求 OCR、benchmark 小矩阵、正式小规模 benchmark 和轻量 profiling 证据均已具备。
14+
15+
需要明确的是:深度 profiling 仍未完成,当前主要受 `ptrace/py-spy` 权限限制。
16+
17+
## 2. 环境与对象
18+
19+
- 环境:`Ubuntu 24.04.1 LTS`,内核 `5.15.0-58-generic`
20+
- venv:`/data/venvs/paddleocr_vl_metax_fd24`
21+
- FastDeploy:`2.4.0`
22+
- Paddle:`3.4.0.dev20251223`
23+
- 模型:`/mnt/moark-models/PaddleOCR-VL`
24+
- 当前在线服务:`http://127.0.0.1:8288`
25+
26+
## 3. patch15 收口结论
27+
28+
`patch15` 共 6 个改动文件:
29+
30+
- 5 个必需文件:
31+
- `build.sh`
32+
- `custom_ops/setup_ops.py`
33+
- `fastdeploy/entrypoints/llm.py`
34+
- `fastdeploy/model_executor/layers/backends/metax/attention/flash_attn_backend.py`
35+
- `fastdeploy/worker/metax_model_runner.py`
36+
- 1 个环境兜底文件:
37+
- `fastdeploy/worker/metax_worker.py`
38+
39+
这 5 个必需文件构成了 PaddleOCR-VL 在 Metax 上 build/install/smoke 成功的最小主链路;`metax_worker.py` 用于 `pymxsml` 缺失时的显存探测兜底。
40+
41+
## 4. 服务与功能验证
42+
43+
- patch15 smoke 已成功返回文本:`相思那得夢魂来。`
44+
- 当前在线服务 `/health` 返回 `200`
45+
- 单请求 OCR 成功:
46+
- 图片:`/data/ocr_demo.jpg`
47+
- 返回文本:`相思那得夢魂来。`
48+
- 首次请求耗时:`0.6402s`
49+
50+
结论:当前安装包已经具备稳定最小在线服务能力。
51+
52+
## 5. benchmark 结果
53+
54+
### 5.1 小矩阵
55+
56+
扫描范围:
57+
58+
- `max_num_seqs``1``2``4`
59+
- `max_model_len``1024``2048`
60+
61+
结果:
62+
63+
- 6 组全部成功
64+
- 最优组:`seqs_4_len_2048`
65+
- 平均时延:`0.3561s`
66+
- P50:`0.3403s`
67+
- P95:`0.4319s`
68+
- 吞吐:`2.8078 req/s`
69+
- 异常组:`seqs_1_len_1024`
70+
- 首轮矩阵出现一次 `8s` 级 P95
71+
72+
### 5.2 正式 benchmark
73+
74+
固定最佳参数 `seqs_4_len_2048` 后得到:
75+
76+
- 顺序 50 次:
77+
- 成功率:`100%`
78+
- 平均时延:`0.3572s`
79+
- P50:`0.3475s`
80+
- P95:`0.3869s`
81+
- P99:`0.5300s`
82+
- 吞吐:`2.7987 req/s`
83+
- 小并发补充组(并发 4,总请求 20):
84+
- 成功率:`100%`
85+
- 平均时延:`0.7347s`
86+
- P50:`0.7380s`
87+
- P95:`0.7893s`
88+
- P99:`0.7905s`
89+
- 吞吐:`5.3036 req/s`
90+
91+
## 6. 长尾复核
92+
93+
针对 `seqs_1_len_1024` 进行了 20 次顺序复测:
94+
95+
- 平均时延:`0.3495s`
96+
- P95:`0.3751s`
97+
- P99:`0.5221s`
98+
- 最慢样本:第 1 次请求 `0.5588s`
99+
- `tail_reproduced=false`
100+
101+
结论:8 秒级异常没有稳定复现,更像冷态或偶发扰动,不支持认定为稳定长尾瓶颈。
102+
103+
## 7. profiling 现状
104+
105+
当前已经拿到轻量 profiling 证据:
106+
107+
- `mx-smi` 连续采样期间 10/10 请求成功
108+
- profiling 期间平均请求时延:`0.3607s`
109+
- 最大 GPU 利用率:`10%`
110+
- 显存使用:约 `23416004 KB`
111+
112+
当前限制:
113+
114+
- `py-spy` 已安装,但 attach 在线服务失败
115+
- 根因:`ptrace_scope=1`,且 `/proc/sys` 只读
116+
- 因此深度 profiling 仍受 `ptrace/py-spy` 权限限制
117+
118+
## 8. 下一步建议
119+
120+
1. 保持 `seqs_4_len_2048` 作为后续默认稳态参数。
121+
2. 优先协调 root/平台管理员解锁 `ptrace_scope`,打通 `py-spy` attach。
122+
3. 若不能调整系统权限,则改走 `py-spy record --subprocesses``cProfile` 包裹专用 profiling 副本。
123+
4. 在现有正式 benchmark 基础上继续扩展更长时长和更高并发档位。

0 commit comments

Comments
 (0)