Resources

class baseten.client.modelconfig.Resources(*, cpu='1', memory='2Gi', accelerator=None, instance_type=None, node_count=None, **extra_data)

Bases: BaseModel

Parameters:
  • cpu (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, title='Cpu', description='CPU resources needed, expressed as either a raw number or millicpus. For example, 500m is half of a CPU core.', examples=['1', '500m', '4'])])

  • memory (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, title='Memory', description='CPU RAM needed, expressed as a number with units. Units include Gi (Gibibytes), G (Gigabytes), Mi (Mebibytes), and M (Megabytes).', examples=['2Gi', '512Mi'])])

  • accelerator (Annotated[AcceleratorSpec | None, FieldInfo(annotation=NoneType, required=True, description="The GPU type for your instance. To request multiple GPUs, use the ':' operator (e.g. L4:4).", examples=['A100', 'T4:2', 'H100:8'])])

  • instance_type (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, title='Instance Type', description='The full SKU name for the instance type. When specified, cpu, memory, and accelerator fields are ignored.', examples=['L4:4x16'])])

  • node_count (Annotated[NodeCount | None, FieldInfo(annotation=NoneType, required=True, title='Node Count', description='Number of nodes for multi-node deployments.')])

  • extra_data (Any)

model_config = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].