Create Adapter (Finetune)
Fine-Tune Adapter
- config: SFTConfig | ContinuedPretrainingConfig | GRPOConfig | ClassificationConfig - Configuration for fine-tuning
- dataset: str - The dataset to use for fine-tuning
- continue_from_version: str, optional - The adapter version to continue training from
- repo: str - Name of the adapter repo to store the newly created adapter
- description: str, optional - Description for the adapter
- show_tensorboard: bool, default False - If true, launch a tensorboard instance to view training logs
- compute_spec: TrainingComputeSpec, optional - Compute specification for the fine-tuning job
- Adapter - The created adapter object
Fine-Tune Adapter (Async)
- config: SFTConfig | ContinuedPretrainingConfig | GRPOConfig - Configuration for fine-tuning
- dataset: str - The dataset to use for fine-tuning
- repo: str - Name of the adapter repo to store the newly created adapter
- continue_from_version: str, optional - The adapter version to continue training from
- description: str, optional - Description for the adapter
- watch: bool, default False - Whether to block until the fine-tuning job finishes
- show_tensorboard: bool, default False - Whether to launch a tensorboard instance
- FinetuningJob - Object representing the fine-tuning job
pb.adapters.create
method are also valid for the asynchronous pb.finetuning.jobs.create
method.
Run finetuning in a specified region (Advanced, VPC only)
Estimate Fine-Tuning Cost
- config: SFTConfig | ContinuedPretrainingConfig | GRPOConfig - Configuration for fine-tuning
- dataset: str - The dataset to use for fine-tuning
- None - The cost is printed to the terminal.
Get Adapter
- adapter_id: str - ID of the adapter in the format “repo/version”
- Adapter - The requested adapter object
Upload Adapter
- local_dir: str - Path to the local directory containing the adapter files
- repo: str - Name of the adapter repo
- region: str - The region to upload the adapter to. Only required for multi-region VPC users
- Adapter - The uploaded adapter object
Cancel Adapter (Finetune)
- adapter_id: str - ID of the adapter in the format “repo/version”
- None - The fine-tuning job is cancelled
Download Adapter
- adapter_id: str - ID of the adapter in the format “repo/version”
- dest: os.PathLike, optional - Local destination to download the weights
- None - The adapter weights are downloaded to the local destination
Archive Adapter
- adapter_id: str - ID of the adapter in the format “repo/version”
- None - The adapter version is archived
Unarchive Adapter
- adapter_id: str - ID of the adapter in the format “repo/version”
- None - The adapter version is unarchived
Delete Adapter
- adapter_id: str - ID of the adapter in the format “repo/version”
- None - The adapter version is deleted