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

Add IPEX models support #29179

Merged
merged 13 commits into from
Jan 22, 2025
Merged

Add IPEX models support #29179

merged 13 commits into from
Jan 22, 2025

Conversation

echarlaix
Copy link
Contributor

@echarlaix echarlaix commented Jan 13, 2025

Add IPEX support to HuggingFacePipeline

from langchain_huggingface import HuggingFacePipeline

hf_pipe = HuggingFacePipeline.from_model_id(
    model_id=model_id,
    task="text-generation",
    backend="ipex",
)

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 0:10am

Copy link
Member

@efriis efriis left a comment

Choose a reason for hiding this comment

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

hey there! I believe this has come up before, and I think @Jofthomas on the huggingface side had a preference for having some separate packages for openvino (e.g. langchain-openvino or langchain-huggingface-openvino) and ipex

I see your profile indicates you work at huggingface - we have a shared slack channel with you that you could join if you want to discuss!

@efriis efriis self-assigned this Jan 13, 2025
@echarlaix
Copy link
Contributor Author

Hi @efriis, thanks for the rapid update! Yes I believe @Jofthomas is planning to work on a refactorization, in the meantime I opened this PR to add IPEX support (+ simplifying the current code a bit as well), let me know if that works for you or if you'd like to wait for the refactorization before adding anything else cc @Jofthomas

@Jofthomas
Copy link
Collaborator

Thanks ! The PR LGTM @echarlaix 👍

@efriis, It has been decided otherwise in the meantime. We will indeed enable Intel backend in the HF pipeline directly in this package.

@echarlaix echarlaix marked this pull request as ready for review January 14, 2025 15:34
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 14, 2025
Copy link
Collaborator

@Jofthomas Jofthomas left a comment

Choose a reason for hiding this comment

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

Thanks @echarlaix for this PR.

Seems good to merge @efriis

@echarlaix
Copy link
Contributor Author

@efriis let me know if you need any additional modifications

@efriis
Copy link
Member

efriis commented Jan 22, 2025

sounds good thanks!

@efriis efriis enabled auto-merge (squash) January 22, 2025 00:11
@efriis
Copy link
Member

efriis commented Jan 22, 2025

Also, if you're interested in maintaining this integration without us in the loop, we'd love to get an integration package out! Future PRs against langchain would just be {docs updates, as well as registering your package in libs/packages.yml, deprecating this community integration in favor of your integration package}

Here's the guide, and if you have questions, feel free to leave them in the comments on those pages so others can see them! https://python.langchain.com/docs/contributing/how_to/integrations/

@efriis efriis merged commit 6f95db8 into langchain-ai:master Jan 22, 2025
19 checks passed
@echarlaix echarlaix deleted the ipex branch January 22, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants