-
Notifications
You must be signed in to change notification settings - Fork 434
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
FEAT: Refactor device related code and add initial Intel GPU support #968
Conversation
19332e9
to
f7b70f9
Compare
Wow, impressive work! |
Lint failed, we use pre-commit(https://pre-commit.com/) to lint before commit, you can install it on local and commit again. |
f7b70f9
to
d034b3b
Compare
@aresnow1 All lint errors fixed, and tested again on chatglm3. |
07e1c5b
to
e91a643
Compare
I solved the lint for you, other than flake8, we use black to format code and isort to sort the imports. |
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 overall, some details need to be confirmed.
3a9ceb9
to
88f2214
Compare
88f0935
to
7dafcf1
Compare
Hi, could you rebase main branch and push again? |
7dafcf1
to
2278ac0
Compare
Rebased and pushed. |
Looks good to me, thanks for your contribution. |
Refactors most device related code into
device_utils
(onlypytorch
backend,vllm
andctransformers
are unsupported,8bit
and4bit
are also unsupported), and adds initial Intel GPU support.You will need
intel-extension-for-pytorch
to run it: https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/installation.htmlTested on Llama2-chat and ChatGlm3.
(for
device_map
, requires huggingface/accelerate#2383)