Skip to content

[Feature] Add Ascend NPU accelerator support #1096

Merged
younesbelkada merged 2 commits intohuggingface:mainfrom
ji-huazhong:npu-support
Dec 15, 2023
Merged

[Feature] Add Ascend NPU accelerator support #1096
younesbelkada merged 2 commits intohuggingface:mainfrom
ji-huazhong:npu-support

Conversation

@ji-huazhong
Copy link
Copy Markdown
Contributor

What does this PR do?

Since npu already supports Transformer/Accelerate and Peft out of the box, this would be a good addition to run TRL out of the box on npu.

cc @younesbelkada and @lvwerra

@ji-huazhong
Copy link
Copy Markdown
Contributor Author

ji-huazhong commented Dec 15, 2023

@younesbelkada @lvwerra I tried using dpo.py to do a sanity check on ascend npu, here is the training log: https://gist.github.com/statelesshz/4437ccec89c8f0d9df11444e8ca578cd

Copy link
Copy Markdown
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Looks great thank you very much for adding the NPU support! can you run the styling checks? make precommit

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ji-huazhong
Copy link
Copy Markdown
Contributor Author

@younesbelkada Thanks for your reminder. CI is green:)

Copy link
Copy Markdown
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Looks great!

@younesbelkada younesbelkada merged commit d708ec2 into huggingface:main Dec 15, 2023
lapp0 pushed a commit to lapp0/trl that referenced this pull request May 10, 2024
yxliu-TAMU pushed a commit to mincheolseong/ECEN743-GRPO-Project-Proposal that referenced this pull request Apr 20, 2025
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.

3 participants