- Categories:
String & binary functions (AI Functions)
FINETUNE (‘CREATE’) (SNOWFLAKE.CORTEX)¶
创建微调作业。将调优的模型保存到架构的模型注册表中。
语法
必填参数
'CREATE'指定您要创建微调作业。
'name'保存到模型注册表的微调模型的标识符。这对于它保存到的模型注册表必须是唯一的。如果多个模型尝试使用相同的名称保存,则会在后一个模型的名称后附加后缀,以使其唯一。
标识符中允许使用字母、下划线、十进制数字 (0-9)。
In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example,
"My object"). Identifiers enclosed in double quotes are also case-sensitive.For more information, see Identifier requirements.
'base_model'指定要微调的基本模型的字符串。这必须是以下值之一:
'llama3-8b''llama3-70b''llama3.1-8b''llama3.1-70b''mistral-7b''mixtral-8x7b'
For more information see Models available to fine-tune.
'training_data_query'The SQL query to get the training data. The result must include
promptandcompletioncolumns.
可选参数
'validation_data_query'The SQL query to get the validation data. The result must include
promptandcompletioncolumns. If a query for validation data is not specified, your training data is automatically split into training and validation data.'options'A string representation of a JSON object containing zero or more of the following options that affect the training hyperparameters. For example:
'{"max_epochs": 3}'max_epochs: A value from 1 to 10 (inclusive) that controls the number of epochs to train the model for.
默认值:由系统自动确定
返回
| 列 | 类型 | 描述 |
|---|---|---|
| FINETUNE | STRING | 创建优化作业时,将返回生成的唯一作业 ID。 |
访问控制要求
| 权限 | 对象 | 备注 |
|---|---|---|
| USAGE | DATABASE | 从其中查询训练(和验证)数据的数据库。 |
| CREATE MODEL 或 OWNERSHIP | SCHEMA | 模型保存到的架构。 |
示例
验证数据示例:
无验证数据的示例:
输出是微调作业的作业 ID,例如: