Skip to navigation

Create Adapter

View as Markdown
Create an adapter under a base model specified by the "model" field in the body.

Path parameters

workspacestringRequired

Request

This endpoint expects an object.
namestringRequiredformat: "^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(?<!-)$"<=63 characters

Name of the adapter. Name must be unique in the workspace. Name must start with a lowercase letter, be 2-63 characters, and use lowercase letters, digits, hyphens, and dots (no consecutive hyphens, cannot end with a hyphen).

filesetstringRequiredformat: "^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(?<!-)(/[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(?<!-))?$"2-127 characters

Location where adapter files are stored. Either a fileset name or ‘workspace/fileset_name’. A bare name is resolved in the request workspace (the platform default workspace is named ‘default’). Each segment is 2-63 characters: lowercase letters, digits, hyphens, and temporarily @ . + _; no consecutive hyphens, and it cannot end with a hyphen.

finetuning_typeenumRequired

Type of finetuning (LORA, P_TUNING, etc.)

modelstringRequired<=127 characters

Base model entity. Use {workspace}/{model_name} to reference a model in any workspace, or a single {model_name} resolved in the path workspace. A single name (2-63 characters) or ‘workspace/model_name’ where each segment is a valid name (lowercase, digits, hyphens, and temporarily @ . + _; no leading/trailing or consecutive hyphens). If one slash, both sides must be non-empty.

descriptionstringOptional<=1000 characters
Optional description of the adapter
enabledbooleanOptionalDefaults to true
Whether to make this adapter available for inference post training
lora_configobjectOptional
Lora configuration specifics

Response

Create a new adapter for a model
namestringformat: "^[\w\-.]+$"<=255 characters

Name of the adapter. Name must be unique in the workspace for all Adapters and match the following regex: Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

workspacestringformat: "^[\w\-.]+$"<=255 characters

Workspace of the adapter. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

filesetstring

Fileset where the adapter files are stored. Either a fileset name or ‘workspace/fileset_name’. A bare name is resolved in the request workspace (the platform default workspace is named ‘default’). Each segment is 2-63 characters: lowercase letters, digits, hyphens, and temporarily @ . + _; no consecutive hyphens, and it cannot end with a hyphen.

finetuning_typeenum

Type of finetuning (LORA, P_TUNING, etc.)

descriptionstringOptional<=1000 characters
Optional description of the adapter
enabledbooleanOptionalDefaults to true
Whether to make this adapter available for inference post training
lora_configobjectOptional
Lora configuration specifics
modelstringOptional<=127 characters

Parent model entity reference. A single name (2-63 characters) or ‘workspace/model_name’ where each segment is a valid name (lowercase, digits, hyphens, and temporarily @ . + _; no leading/trailing or consecutive hyphens). If one slash, both sides must be non-empty.

created_atdatetimeOptional
updated_atdatetimeOptional

Errors

422
Unprocessable Entity Error