An integration package connecting Hugging Face and LangChain.
Actively maintained. Last release 7 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install langchain-huggingfacelangchain-huggingface
Looking for the JS/TS version? Check out LangChain.js.
Quick Install
uv add langchain-huggingface
Note: The base install does not include
sentence-transformersortransformers. If you plan to useHuggingFaceEmbeddingsorHuggingFacePipelinefor local inference, install the[full]extra which includessentence-transformers>=5.2.0andtransformers>=5.0.0:uv add "langchain-huggingface[full]"Migrating from
langchain-community? Note thatlangchain-communityacceptedsentence-transformers>=2.2.0, butlangchain-huggingface[full]requires>=5.2.0. If your project pins an older version, upgrade it:uv add "sentence-transformers>=5.2.0"
🤔 What is this?
This package contains the LangChain integrations for Hugging Face related classes.
📖 Documentation
For full documentation, see the API reference. For conceptual guides, tutorials, and examples on using these classes, see the LangChain Docs.
📕 Releases & Versioning
See our Releases and policies.