-
Notifications
You must be signed in to change notification settings - Fork 46
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
ReIntroduce Package for FMS Accel #223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
@tedhtchang is there anybody else that should review this or we can merge? |
@fabianlim I am reviewing and testing, will get review in today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I had a question on the usage of fms-acceleration library. It is assumed that if one installs fms-acceleration, that one must configure an acceleration framework correct? Because if I install and try to run sft_trainer normally, it fails with error ValueError: No plugins could be configured. Please check the acceleration framework configuration file.
Also when I try installing the plugin, I get an error that torch isn't installed when it is. $ pip install fms-acceleration
...
Successfully installed fms-acceleration-0.1.1 tokenizers-0.15.2 transformers-4.39.3
$ python -m fms_acceleration.cli install fms_acceleration_peft
/usr/local/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Collecting git+https://github.com/foundation-model-stack/fms-acceleration.git#subdirectory=plugins/accelerated-peft
Cloning https://github.com/foundation-model-stack/fms-acceleration.git to /tmp/pip-req-build-c7fg3o71
Running command git clone --filter=blob:none --quiet https://github.com/foundation-model-stack/fms-acceleration.git /tmp/pip-req-build-c7fg3o71
Resolved https://github.com/foundation-model-stack/fms-acceleration.git to commit 06dcc4d967cb13842660eed0ebf403a191748ce8
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting auto-gptq@ git+https://github.com/AutoGPTQ/AutoGPTQ.git@ea829c7bbe83561c2b1de26795b6592992373ef7 (from fms-acceleration-peft==0.0.1)
Cloning https://github.com/AutoGPTQ/AutoGPTQ.git (to revision ea829c7bbe83561c2b1de26795b6592992373ef7) to /tmp/pip-install-91u6z775/auto-gptq_65c3bf33f0094c9295adc1efa87da6b0
Running command git clone --filter=blob:none --quiet https://github.com/AutoGPTQ/AutoGPTQ.git /tmp/pip-install-91u6z775/auto-gptq_65c3bf33f0094c9295adc1efa87da6b0
Running command git rev-parse -q --verify 'sha^ea829c7bbe83561c2b1de26795b6592992373ef7'
Running command git fetch -q https://github.com/AutoGPTQ/AutoGPTQ.git ea829c7bbe83561c2b1de26795b6592992373ef7
Running command git checkout -q ea829c7bbe83561c2b1de26795b6592992373ef7
Resolved https://github.com/AutoGPTQ/AutoGPTQ.git to commit ea829c7bbe83561c2b1de26795b6592992373ef7
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
Building PyTorch CUDA extension requires PyTorch being installed, please install PyTorch first: No module named 'torch'.
NOTE: This issue may be raised due to pip build isolation system (ignoring local packages). Please use `--no-build-isolation` when installing with pip, and refer to https://github.com/AutoGPTQ/AutoGPTQ/pull/620 for more details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
# but i see torch does exist
$ pip show torch
Name: torch
Version: 2.3.1
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: [email protected]
License: BSD-3
Location: /home/tuning/.local/lib/python3.11/site-packages
Requires: filelock, fsspec, jinja2, networkx, nvidia-cublas-cu12, nvidia-cuda-cupti-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-runtime-cu12, nvidia-cudnn-cu12, nvidia-cufft-cu12, nvidia-curand-cu12, nvidia-cusolver-cu12, nvidia-cusparse-cu12, nvidia-nccl-cu12, nvidia-nvtx-cu12, sympy, triton, typing-extensions
Required-by: accelerate, flash-attn, fms-acceleration, fms-hf-tuning, peft, trl
# as well as below works
$ python
Python 3.11.7 (main, May 16 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import fms_acceleration also verified that flash-attn and packaging are installed |
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
@anhuong thanks for reviewing. We have pushed another commit 3ef14a2 to clean up one the previous commits.
This is a little strange, the code should already be handling this case, as you can see below, I have fms-accel installed.
And if i run with the following, without any framework config arguments, it will run as per normal. Maybe you can test on the latest commit.
as you can see no fms acceleration framework plugins will be activated
The error is not a
If all looks good to you afgain, do you mind giving me another approve and I can merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the details Fabian, running on this PR, I do not get the initial error where fms-acceleration is installed and I have to use it to run sft_trainer.py.
Description of the change
@tedhtchang @anhuong
This reintroduces the
fms-acceleration
package, which will soon be availableonce this PR is merged foundation-model-stack/fms-acceleration#45It also introduces some minor fixes.
Related issue number
#219
How to verify the PR
Then verify
Was the PR tested