Skip to content

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

Merged
JamesKunstle merged 1 commit intoinstructlab:mainfrom
JamesKunstle:hpu-config
Nov 13, 2024
Merged

deps: change hf accelerate bound, add requirements-hpu.txt#320
JamesKunstle merged 1 commit intoinstructlab:mainfrom
JamesKunstle:hpu-config

Conversation

@JamesKunstle
Copy link
Copy Markdown
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
Copy Markdown
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
Comment thread requirements.txt
Comment thread pyproject.toml
@JamesKunstle
Copy link
Copy Markdown
Contributor Author

Requires instructlab/instructlab#2641

Comment thread requirements.txt Outdated
accelerate>=0.34.2

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

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
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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)

Signed-off-by: James Kunstle <jkunstle@redhat.com>
@mergify mergify Bot added the one-approval label Nov 13, 2024
Copy link
Copy Markdown
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
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