Skip to content

Conversation

kaixuanliu
Copy link
Contributor

No description provided.

Signed-off-by: Liu, Kaixuan <[email protected]>
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kaixuanliu kaixuanliu marked this pull request as draft August 4, 2025 08:41

# Setup device
device = torch.device(device)
device = torch.accelerator.current_accelerator().type if hasattr(torch, "accelerator") else "cuda"
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to allow the user to pass the device explicitly, i.e. revert this change. But the default could be "auto" , in which case the device is inferred like in this line. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree. Have updated the code.

@HuggingFaceDocBuilderDev

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.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for updating and validating the QDoRA example.

@BenjaminBossan
Copy link
Member

@kaixuanliu Is there anything left to do? The PR is still marked as "draft".

@kaixuanliu
Copy link
Contributor Author

@BenjaminBossan , there is a bnb dependency here: https://github.com/huggingface/peft/pull/2700/files#diff-743cf3ad364387a1e75c4e38d779be602a91d82622846cb4ce0afdd3ed0eac3cR1013, I am not sure if it is OK to merge this PR first.

Signed-off-by: Liu, Kaixuan <[email protected]>
Signed-off-by: Liu, Kaixuan <[email protected]>
"top_p = 0.9\n",
"temperature = 0.7\n",
"user_question = \"What is the purpose of quantization in LLMs?\"\n",
"#TODO: XPU support depneds on this PR in bitsandbytes:https://github.com/bitsandbytes-foundation/bitsandbytes/pull/1692\n",
Copy link
Member

Choose a reason for hiding this comment

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

Let's wait for that PR to be merged first, then we can remove the comment and merge this PR.

Copy link

github-actions bot commented Sep 3, 2025

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@BenjaminBossan
Copy link
Member

not stale, still waiting for the bnb PR

cyyever pushed a commit to cyyever/peft that referenced this pull request Sep 4, 2025
* support for synchronization ref-model added

* support for synchronization ref-model added

* tests for sync_ref_model added

* Update tests/test_grpo_trainer.py

Co-authored-by: Quentin Gallouédec <[email protected]>

* split and fix test

* style

* doc

* move after init to ensure accelerator exists

* Update tests/test_grpo_trainer.py

* style

---------

Co-authored-by: Quentin Gallouédec <[email protected]>
Co-authored-by: Quentin Gallouédec <[email protected]>
@kaixuanliu kaixuanliu marked this pull request as ready for review September 21, 2025 09:44
@kaixuanliu
Copy link
Contributor Author

@BenjaminBossan The dependency PR is merged. Pls help review. Thx~

Signed-off-by: Liu, Kaixuan <[email protected]>
@BenjaminBossan
Copy link
Member

The Hub seems to be quite unreliable right now, I'll re-trigger CI another time.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for making the DoRA FT example device agnostic.

Failing CI is unrelated.

@BenjaminBossan BenjaminBossan merged commit c15daaa into huggingface:main Sep 25, 2025
42 of 79 checks passed
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