langchain - ✅(Solved) Fix IPEX support will be removed in optimum-intel v2 [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#36765Fetched 2026-04-17 08:22:55
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1issue_type_added ×1

Fix Action

Fixed

PR fix notes

PR #36762: Deprecate IPEX backend for optimum-intel >= v2

Description (problem / solution / changelog)

Raises ImportError when backend="ipex" and optimum-intel>=2.0 is installed, in both HuggingFacePipeline and HuggingFaceEmbeddings. The IPEX classes (IPEXModelForCausalLM, IPEXModelForSeq2SeqLM,
IPEXSentenceTransformer) are deprecated and will be removed in optimum-inte v2.0 following https://github.com/huggingface/optimum-intel/pull/1687

Fix https://github.com/langchain-ai/langchain/issues/36765

Changed files

  • libs/partners/huggingface/langchain_huggingface/embeddings/huggingface.py (modified, +9/-0)
  • libs/partners/huggingface/langchain_huggingface/llms/huggingface_pipeline.py (modified, +12/-9)
RAW_BUFFERClick to expand / collapse

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

IPEX support is deprecated and will be removed in optimum-intel v2 (IPEXModelForCausalLM, IPEXModelForSeq2SeqLM, IPEXSentenceTransformer) following https://github.com/huggingface/optimum-intel/pull/1687

Use Case

When optimum-intel v2.0 is released, users who upgrade will lose IPEX support

Proposed Solution

We can raise an ImportError when backend="ipex" and optimum-intel>=2.0 is installed as in https://github.com/langchain-ai/langchain/pull/36762

Alternatives Considered

No response

Additional Context

No response

extent analysis

TL;DR

Raise an ImportError when the "ipex" backend is used with optimum-intel version 2.0 or higher to prevent loss of IPEX support.

Guidance

  • Check the version of optimum-intel installed in the environment to determine if it's 2.0 or higher.
  • Verify that the proposed solution of raising an ImportError when backend="ipex" and optimum-intel>=2.0 is installed is feasible and effective.
  • Review the optimum-intel documentation and release notes to understand the implications of the deprecation of IPEX support.
  • Consider alternative solutions or workarounds for users who rely on IPEX support and will be affected by its removal.

Example

import importlib
try:
    import optimum_intel
    if optimum_intel.__version__ >= '2.0' and backend == 'ipex':
        raise ImportError('IPEX support is deprecated in optimum-intel v2.0 and later')
except ImportError:
    # Handle the case where optimum_intel is not installed
    pass

Notes

The solution relies on the optimum-intel package version being 2.0 or higher, and the backend being set to "ipex". This may not cover all possible scenarios, and additional error handling may be necessary.

Recommendation

Apply the proposed workaround of raising an ImportError when the "ipex" backend is used with optimum-intel version 2.0 or higher, as it provides a clear and explicit warning to users about the deprecation of IPEX support.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING