Files
langchain/libs/partners/huggingface
Mason Daugherty 3b999176c8 test(langchain,partners): disable pytest-benchmark under xdist to silence PytestBenchmarkWarning (#37901)
Test targets run with `-n auto`, which makes `pytest-benchmark` (present
via `langchain-tests`) auto-disable itself and emit a
`PytestBenchmarkWarning` once per xdist worker. Passing
`--benchmark-disable` turns the plugin off explicitly so the warning
never fires, matching what `core` and `langchain_v1` already do.

## Changes
- Add `--benchmark-disable` to the `-n auto` test targets across
`langchain` (unit) and 14 partner packages' integration targets:
`anthropic`, `chroma`, `deepseek`, `exa`, `fireworks`, `groq`,
`huggingface`, `mistralai`, `nomic`, `ollama`, `openai`, `openrouter`,
`qdrant`, `xai`.
- Deliberately excluded `text-splitters` and `model-profiles`: their
`test` group doesn't install `pytest-benchmark`, so the flag would fail
with `unrecognized arguments`. Verified by importing the plugin under
each package's actual dependency group before editing.
2026-06-04 13:25:26 -04:00
..
2024-05-13 20:53:15 +00:00
2024-05-13 20:53:15 +00:00
2026-06-03 20:29:57 -07:00

langchain-huggingface

PyPI - Version PyPI - License PyPI - Downloads Twitter

Looking for the JS/TS version? Check out LangChain.js.

Quick Install

pip install langchain-huggingface

Note: The base install does not include sentence-transformers or transformers. If you plan to use HuggingFaceEmbeddings or HuggingFacePipeline for local inference, install the [full] extra which includes sentence-transformers>=5.2.0 and transformers>=5.0.0:

pip install langchain-huggingface[full]

Migrating from langchain-community? Note that langchain-community accepted sentence-transformers>=2.2.0, but langchain-huggingface[full] requires >=5.2.0. If your project pins an older version, upgrade it:

pip install "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 Versioning policies.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.