Skip to content

Support running on CPU #1402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fzyzcjy opened this issue Oct 25, 2024 · 3 comments
Open

Support running on CPU #1402

fzyzcjy opened this issue Oct 25, 2024 · 3 comments
Labels
Cross Platform Duplicate This issue or pull request already exists Enhancement New feature or request High Priority (first issues that will be worked on) x64 CPU
Milestone

Comments

@fzyzcjy
Copy link

fzyzcjy commented Oct 25, 2024

Feature request

Hi thanks for the library! It would be great if the optimizers can be run on CPU. For example, I would like to try adamw_8bit to full-finetune a 8B model on a 24GB GPU card (RTX4090). With deepspeed offload, the GPU memory is OK, but the CPU memory requirement is still very huge, partially because it uses normal adamw, thus needs 8x8=64GB for the optimizer itself.

This package creates the super helpful adamw_8bit, thus I would appreciate it if it can be used with the settings above, hopefully reducing 64GB to 8x2=16GB for optimizer state.

Motivation

(see above)

Your contribution

Yes

@werruww
Copy link

werruww commented Oct 26, 2024

and iam

@rickardp
Copy link
Contributor

rickardp commented Nov 18, 2024

See #1021. I proposed that this should be a step on the path of implementing cross platform support (especially Apple Silicon, as CUDA and Apple Silicon won't run on the same hardware, which makes validation complicated)

@werruww
Copy link

werruww commented Feb 23, 2025

run 4 bit on cpu only
how

@matthewdouglas matthewdouglas added Enhancement New feature or request High Priority (first issues that will be worked on) Duplicate This issue or pull request already exists x64 CPU labels Feb 28, 2025
@matthewdouglas matthewdouglas added this to the v0.46.0 milestone Mar 3, 2025
@matthewdouglas matthewdouglas modified the milestones: v0.46.0, v0.47.0 Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cross Platform Duplicate This issue or pull request already exists Enhancement New feature or request High Priority (first issues that will be worked on) x64 CPU
Projects
None yet
Development

No branches or pull requests

4 participants