Skip to content

Revert "[Feature] Support computing entropy with fastdeploy runner"#7994

Merged
EmmonsCurse merged 1 commit into
developfrom
revert-7954-develop
Jun 3, 2026
Merged

Revert "[Feature] Support computing entropy with fastdeploy runner"#7994
EmmonsCurse merged 1 commit into
developfrom
revert-7954-develop

Conversation

@rain7996
Copy link
Copy Markdown
Collaborator

@rain7996 rain7996 commented Jun 3, 2026

Reverts #7954
Revert以恢复对GLM RL精度的影响

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.pymodel_executor/pre_and_post_process.pyworker/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 缺失、描述模板未填写)需修复。

@EmmonsCurse EmmonsCurse merged commit 95d4bc4 into develop Jun 3, 2026
37 of 43 checks passed
@EmmonsCurse EmmonsCurse deleted the revert-7954-develop branch June 3, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants