Hugging Face
HuggingFaceEmbedding #
Bases: BaseEmbedding
HuggingFace sentence_transformers embedding models.
Attributes:
| Name | Type | Description |
|---|---|---|
model_name |
str
|
Hugging Face model to be used. Defaults to |
device |
str
|
Device to run the model on. Supports |
Example
from beekeeper.embeddings.huggingface import HuggingFaceEmbedding
embedding = HuggingFaceEmbedding()
embed_text #
embed_text(input: str | list[str]) -> list[Embedding]
Embed one or more text strings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
list[str]
|
Input for which to compute embeddings. |
required |