Creating and Training a Model

Use a Language project to contain a model that describes the labelled data.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Language.
    2. In the left-side navigation menu, click Projects.
    3. Select the compartment that contains the project that you want to use, or select the compartment that you want to create a project in.
    4. Perform one of the following actions:
      1. To use an existing project, click its name.
      2. To create a new project, click Create Project.
    5. On the project's details page, click Create custom models.
    6. Choose the model type:
    7. For Training data, select one of the followingoptions and provide the additional information:
      • Object Storage

        First, ensure that the dataset is allowed and is uploaded in a bucket in Object Storage. Then, select the following values:

        1. Select the bucket that the dataset is in.

        2. Select a training data file for the model to use.

      • Data Labeling

        From the list, select a dataset for the model to use.

    8. (Optional) Click Change Compartment to select a different compartment for the bucket or dataset.
    9. (Optional) Click here to create a new dataset with the Data Labeling service.
      1. Enter the specifics for the dataset.
      2. Create the dataset.
      3. Return to the Language service.

      For guidance on how to create and label datasets for Data Labeling, see text labeling, document labeling, and creating datasets for Data Labeling.

    10. (Optional) To set the validation and test data, click Show advanced options, then select the validation and test datasets to use.

      Change the compartment if the dataset resides in a different one.

      If you select a validation dataset, you must have a corresponding test dataset.

    11. Click Next.
    12. Select a compartment to host the custom model. We recommend that you save it in the same compartment as the project.
    13. (Optional) Enter a unique name (255 character limit) for the resource.

      If you don't provide a name, one is automatically generated. For example, ailanguage<resource>20230825155844.

    14. (Optional) Enter a description (400 character limit) for the resource.
    15. Click Next.
    16. Review the selections.
    17. (Optional) Click Edit to change the choices by returning to the Select data or Model detail step, and then complete the steps again.
    18. Click Create and train.
    This step might take as long as 30 minutes depending on the dataset. The model metrics are populated after the model is active.
  • Use the oci ai language model create command and required parameters to create a model:

    oci ai language model create ----compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the CreateModel operation to create a model.