[ci, doc] fix: fix transformers version dependency on Ascend NPU (#2291)

### What does this PR do?

Flash Attention2 in `transformers==4.53.0` is not work on Ascend NPU due
to [PR line
here](3457e8e73e/src/transformers/modeling_flash_attention_utils.py (L109C5-L109C23))
in `transformers`.

In order to not affect `e2e_ascend` CI, we have to set
`transformers==4.52.4` for Ascend NPU situation by force now.

Corresponding bugfix in `transformers` will be conducted as soon as
possible, after newer transformers version containing bugfix released,
we will update the transformers version dependency in verl again.

### Checklist Before Starting

- [x] Search for similar PRs. Paste at least one query link here: ...
- [x] Format the PR title as `[{modules}] {type}: {description}` (This
will be checked by the CI)
- `{modules}` include `fsdp`, `megatron`, `sglang`, `vllm`, `rollout`,
`trainer`, `ci`, `training_utils`, `recipe`, `hardware`, `deployment`,
`ray`, `worker`, `single_controller`, `misc`, `perf`, `model`, `algo`,
`env`, `tool`, `ckpt`, `doc`, `data`
- If this PR involves multiple modules, separate them with `,` like
`[megatron, fsdp, doc]`
  - `{type}` is in `feat`, `fix`, `refactor`, `chore`, `test`
- If this PR breaks any API (CLI arguments, config, function signature,
etc.), add `[BREAKING]` to the beginning of the title.
  - Example: `[BREAKING][fsdp, megatron] feat: dynamic batching`

### Test

> For changes that can not be tested by CI (e.g., algorithm
implementation, new model support), validate by experiment(s) and show
results like training curve plots, evaluation results, etc.

Not related

### API and Usage Example

> Demonstrate how the API changes if any, and provide usage example(s)
if possible.

Not related

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

Not related

### Specific Changes

`transformers` version in `requirement-npu.txt` and document

### Checklist Before Submitting

> [!IMPORTANT]
> Please check all the following items before requesting a review,
otherwise the reviewer might deprioritize this PR for review.

- [x] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [x] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting):
`pre-commit install && pre-commit run --all-files --show-diff-on-failure
--color=always`
- [x] Add / Update [the
documentation](https://github.com/volcengine/verl/tree/main/docs).
- [x] Add unit or end-to-end test(s) to [the CI
workflow](https://github.com/volcengine/verl/tree/main/.github/workflows)
to cover all the code. If not feasible, explain why: ...
- [x] Once your PR is ready for CI, send a message in [the `ci-request`
channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the
`verl` Slack
workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ).
This commit is contained in:
Zhen
2025-07-01 13:45:17 +08:00
committed by GitHub
parent b66901505f
commit ba026ef332
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ pyarrow>=15.0.0
pybind11
pylatexenc
tensordict<=0.6.2
transformers>=4.52.4
transformers==4.52.4
ray==2.46.0
wandb
mathruler