Skip to content
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

deps: change hf accelerate bound, add requirements-hpu.txt #320

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

JamesKunstle
Copy link
Contributor

@JamesKunstle JamesKunstle commented Nov 5, 2024

Adds requirements-hpu.txt file and optional-dependencies.hpu to pyproject.toml

Sets lower bound for accelerate for rocm, cuda, and hpu separately.

For HPU, sets accelerate>=0.33.0 because optimum-habana requires this.

For CUDA/ROCm sets accelerate=>0.34.2 because accelerate got FSDP patches that we need.

@mergify mergify bot added the dependencies Pull requests that update a dependency file label Nov 5, 2024
@mergify mergify bot added ci-failure and removed ci-failure labels Nov 5, 2024
@JamesKunstle
Copy link
Contributor Author

Blocked because we probably need handling for DeepSpeed not being installed for ROCm and Gaudi: #291

@mergify mergify bot removed the ci-failure label Nov 12, 2024
@JamesKunstle JamesKunstle force-pushed the hpu-config branch 3 times, most recently from 3b2a9bc to 6198561 Compare November 12, 2024 22:32
requirements.txt Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@JamesKunstle
Copy link
Contributor Author

Requires instructlab/instructlab#2641

requirements.txt Outdated
accelerate>=0.34.2

# cuda, rocm, and hpu extras impose different lower-bounds on this library.
accelerate
Copy link
Contributor

Choose a reason for hiding this comment

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

needs to be deleted

Copy link
Contributor

Choose a reason for hiding this comment

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

the general overrides the extras requirements, so when this exists:
pip install instructlab-training: Requirement already satisfied: accelerate
pip install instructlab-training[cuda]: Requirement already satisfied: accelerate

when removed:
pip install instructlab-training: N/A
pip install instructlab-training[cuda]: Requirement already satisfied: accelerate>=0.34.2

Copy link
Contributor

Choose a reason for hiding this comment

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

trl also has accelerate as a dependency as well, so just having trl>=0.9.4 in the requirements.txt makes sure general accelerate is pulled in.

From trl==0.9.4 requirements.txt:

datasets>=1.17.0
torch>=1.4.0
tqdm
transformers
accelerate
peft>=0.3.0
tyro>=0.5.7

Copy link
Contributor

Choose a reason for hiding this comment

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

Requirement already satisfied: accelerate in .../lib64/python3.11/site-packages (from trl>=0.9.4->instructlab-training==0.6.0a1.dev7) (0.33.0)

@mergify mergify bot added the one-approval label Nov 13, 2024
Copy link
Member

@RobotSail RobotSail left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot removed the one-approval label Nov 13, 2024
@JamesKunstle JamesKunstle removed the request for review from tiran November 13, 2024 22:59
@JamesKunstle JamesKunstle merged commit 8385f42 into instructlab:main Nov 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants