mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
added max_length for embedding models. Some models crash if not provided, see https://huggingface.co/T-Systems-onsite/cross-en-de-roberta-sentence-transformer/discussions/7#65ce1ca0102df4e9e00ff823
This commit is contained in:
parent
94712824d6
commit
757a8c79fd
3 changed files with 6 additions and 0 deletions
|
|
@ -151,6 +151,10 @@ class HuggingFaceSettings(BaseModel):
|
|||
embedding_hf_model_name: str = Field(
|
||||
description="Name of the HuggingFace model to use for embeddings"
|
||||
)
|
||||
embedding_hf_max_length: int = Field(
|
||||
None,
|
||||
description="Some embedding models have a maximum length for input, provide here for not crashing"
|
||||
)
|
||||
access_token: str = Field(
|
||||
None,
|
||||
description="Huggingface access token, required to download some models",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue