module aixplain.modules.finetune
Global Variables
- cost
- hyperparameters
- status
class Finetune
FineTune is a powerful tool for fine-tuning machine learning models and using your own datasets for specific tasks.
Attributes:
name
(Text): Name of the FineTune.dataset_list
(List[Dataset]): List of Datasets to be used for fine-tuning.model
(Model): Model to be fine-tuned.cost
(Cost): Cost of the FineTune.id
(Text): ID of the FineTune.description
(Text): Description of the FineTune.supplier
(Text): Supplier of the FineTune.version
(Text): Version of the FineTune.train_percentage
(float): Percentage of training samples.dev_percentage
(float): Percentage of development samples.prompt_template
(Text): Fine-tuning prompt_template.hyperparameters
(Hyperparameters): Hyperparameters for fine-tuning.additional_info
(dict): Additional information to be saved with the FineTune.backend_url
(str): URL of the backend.api_key
(str): The TEAM API key used for authentication.
method __init__
__init__(
name: str,
dataset_list: List[Dataset],
model: Model,
cost: FinetuneCost,
id: Optional[str] = '',
description: Optional[str] = '',
supplier: Optional[str] = 'aiXplain',
version: Optional[str] = '1.0',
train_percentage: Optional[float] = 100,
dev_percentage: Optional[float] = 0,
prompt_template: Optional[str] = None,
hyperparameters: Optional[Hyperparameters] = None,
**additional_info
) → None
Create a FineTune with the necessary information.
Args:
name
(Text): Name of the FineTune.dataset_list
(List[Dataset]): List of Datasets to be used for fine-tuning.model
(Model): Model to be fine-tuned.cost
(Cost): Cost of the FineTune.id
(Text, optional): ID of the FineTune. Defaults to "".description
(Text, optional): Description of the FineTune. Defaults to "".supplier
(Text, optional): Supplier of the FineTune. Defaults to "aiXplain".version
(Text, optional): Version of the FineTune. Defaults to "1.0".train_percentage
(float, optional): Percentage of training samples. Defaults to 100.dev_percentage
(float, optional): Percentage of development samples. Defaults to 0.prompt_template
(Text, optional): Fine-tuning prompt_template. Should reference columns in the dataset using format <<COLUMN_NAME>>. Defaults to None.hyperparameters
(Hyperparameters, optional): Hyperparameters for fine-tuning. Defaults to None.**additional_info
: Additional information to be saved with the FineTune.
method start
start() → Model
Start the Finetune job.
Returns:
Model
: The model object representing the Finetune job.