Hugging Face
All functionality related to the Hugging Face Platform.
Installationโ
Most of the Hugging Face integrations are available in the langchain-huggingface
package.
pip install langchain-huggingface
Chat modelsโ
ChatHuggingFaceโ
We can use the Hugging Face
LLM classes or directly use the ChatHuggingFace
class.
See a usage example.
from langchain_huggingface import ChatHuggingFace
API Reference:ChatHuggingFace
LLMsโ
HuggingFaceEndpointโ
See a usage example.
from langchain_huggingface import HuggingFaceEndpoint
API Reference:HuggingFaceEndpoint
HuggingFacePipelineโ
Hugging Face models can be run locally through the HuggingFacePipeline
class.
See a usage example.
from langchain_huggingface import HuggingFacePipeline
API Reference:HuggingFacePipeline