Revert "[Feature] Support computing entropy with fastdeploy runner"#7994
Conversation
|
|
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-03 20:17:44
📋 Review 摘要
PR 概述:Revert PR #7954,移除 FD runner 的 entropy 计算路径,以恢复 GLM RL 精度。
变更范围:model_executor/entropy_utils.py、model_executor/pre_and_post_process.py、worker/gpu_model_runner.py
影响面 Tag:[BugFix] [RL]
问题
未发现阻塞性问题。PR 规范问题在下面章节报,不要在这里重复。
📝 PR 规范检查
标题缺少 FastDeploy 官方 Tag,且 PR body 缺少所有必填 section(## Motivation、## Modifications、## Usage or Command、## Accuracy Tests、## Checklist)。
标题建议(可直接复制):
[BugFix] Revert entropy computing with fastdeploy runner to fix GLM RL accuracy
PR 描述建议(点击展开,可直接复制)
## Motivation
PR #7954 引入了通过 `EB5_ENABLE_FD_RUNNER` 环境变量控制的 FD runner entropy 计算路径,该路径导致 GLM RL 精度下降,需要 revert。
## Modifications
- `fastdeploy/model_executor/entropy_utils.py`:移除 `calculate_logits_entropy_fd`、`speculate_calculate_logits_entropy_fd`、`flush_entropy_on_stop` 函数及 `_log_entropy` helper;恢复 `calculate_logits_entropy` 和 `speculate_calculate_logits_entropy` 原始实现
- `fastdeploy/model_executor/pre_and_post_process.py`:移除 `flush_entropy_on_stop` 的 import 和调用
- `fastdeploy/worker/gpu_model_runner.py`:恢复 `_dummy_prefill_inputs` 中 `seq_lens_this_time` 不做 `[:batch_size]` 截断的赋值
- `tests/model_executor/test_entropy_utils_fd_runner_mtp.py`:删除随 #7954 新增的 FD runner 路径测试
## Usage or Command
N/A
## Accuracy Tests
N/A(Revert 以恢复 GLM RL 精度,精度对比数据由原 PR 作者提供)
## Checklist
- [x] Add at least a tag in the PR title.
- Tag list: [`[FDConfig]`,`[APIServer]`,`[Engine]`, `[Scheduler]`, `[PD Disaggregation]`, `[Executor]`, `[Graph Optimization]`, `[Speculative Decoding]`, `[RL]`, `[Models]`, `[Quantization]`, `[Loader]`, `[OP]`, `[KVCache]`, `[DataProcessor]`, `[BugFix]`, `[Docs]`, `[CI]`, `[Optimization]`, `[Feature]`, `[Benchmark]`, `[Others]`, `[XPU]`, `[HPU]`, `[GCU]`, `[DCU]`, `[Iluvatar]`, `[Metax]`]
- You can add new tags based on the PR content, but the semantics must be clear.
- [x] Format your code, run `pre-commit` before commit.
- [ ] Add unit tests. Please write the reason in this PR if no unit tests.
- [ ] Provide accuracy results.
- [ ] If the current PR is submitting to the `release` branch, make sure the PR has been submitted to the `develop` branch, then cherry-pick it to the `release` branch with the `[Cherry-Pick]` PR tag.总体评价
本 Revert 实现正确,所有功能代码改动与 #7954 完全对称,gpu_model_runner.py 中去掉 [:batch_size] 截断与移除 FD runner entropy 路径一致,无正确性问题。PR 规范(标题 Tag 缺失、描述模板未填写)需修复。
Reverts #7954
Revert以恢复对GLM RL精度的影响