pb.deployments.create
Note: This method is for creating a private serverless deployment. You can also query base or fine-tuned models via shared endpoints.
pb.deployments.create
Create a new private serverless deployment
Parameters:
name: str
Name of the private serverless deployment
description: str, default None
Description for the deployment
config: Deployment Config
Returns:
Deployment
Example:
Create a new private serverless deployment
pb.deployments.create(
name="my-mistral-7b",
config=DeploymentConfig(
base_model="mistral-7b-instruct-v0-2",
# cooldown_time=3600, # Value in seconds, defaults to 3600 (1hr)
min_replicas=0, # Auto-scales to 0 replicas when not in use
max_replicas=1
)
# description="", # Optional
)
Notes
base_model
can be either the Hugging Face repo/model path, or a short name from the list of available models.- A very large number of (advanced) deployment parameters are configured by the
custom_args
field of `DeploymentConfig. See the custom_args section of DeploymentConfig for more information. :::