Skip to main content
Version: dev

HFEmbeddingDeployModelParameters Configuration

HFEmbeddingDeployModelParameters(name: str, provider: str = 'hf', verbose: Optional[bool] = False, concurrency: Optional[int] = 100, path: Optional[str] = None, device: Optional[str] = None, cache_folder: Optional[str] = None, normalize_embeddings: bool = False, multi_process: bool = False, model_kwargs: Dict[str, Any] = <factory>, encode_kwargs: Dict[str, Any] = <factory>, embed_instruction: Optional[str] = None, query_instruction: Optional[str] = None)

Parameters

NameTypeRequiredDescription
namestring
The name of the model.
pathstring
The path of the model, if you want to deploy a local model.
devicestring
Device to run model. If None, the device is automatically determined
providerstring
The provider of the model. If model is deployed in local, this is the inference type. If model is deployed in third-party service, this is platform name('proxy/<platform>')
Defaults:hf
verboseboolean
Show verbose output.
Defaults:False
concurrencyinteger
Model concurrency limit
Defaults:100
cache_folderstring
Path of the cache folder.
normalize_embeddingsboolean
Normalize embeddings.
Defaults:False
multi_processboolean
Run encode() on multiple GPUs.
Defaults:False
model_kwargsobject
Keyword arguments to pass to the model.
Defaults:{}
encode_kwargsobject
Keyword arguments to pass when calling the `encode` method.
Defaults:{}
embed_instructionstring
Instruction to use for embedding documents. Just for Instructor model.
query_instructionstring
Instruction to use for embedding query. Just for Instructor model.