Quickstart - Finetune and deploy your first model

This guide walks you through the complete process of fine-tuning and deploying your first model on AI Studio quickly and effortlessly. By the end of this quickstart, you will learn how to:

  • Fine-tune a model using your own dataset

  • Evaluate and analyze the model's performance

  • Deploy the model for inference through Model Hub

Step 1. Prepare Your Dataset

  1. Prepare your dataset following Alpaca or ShareGPT formats for fine-tuning.

    1. Alpaca

      Alpaca uses a very simple structure to fine-tune the model with Instruction-following format. The basic structure includes:

      • instruction: A string containing the specific task or request that the model needs to perform.

      • input: A string containing the information that the model needs to process in order to carry out the task.

      • output: A string representing the result the model should return, generated from processing the instruction and input.

      Example:

      [
        {
          "instruction": "Classify the following into animals, plants, and minerals",
          "input": "Oak tree, copper ore, elephant",
          "output": "Oak tree: Plant\nCopper ore: Mineral\nElephant: Animal"
        },
        {
          "instruction": "Find the area of a circle given its radius.",
          "input": "Radius = 4",
          "output": "The area of a circle with a radius of 4 is equal to 12.5664 square units. This is calculated by using the formula A = πr2, where A is the area, π is roughly equal to 3.1416 and r is the radius of the circle."
        }
      ]
    2. ShareGPT

      ShareGPT is designed to represent multi-turn conversations between a user and an AI assistant. Each data sample consists of a conversations array, where each turn in the chat includes:

      • from: Who is speaking, must be human or gpt or system.

      • value: The actual message text from that speaker.

      Each sample should begin with a system or human message, followed by a human or gpt message.

      Example:

      [
        {
          "conversations": [
            {
              "from": "human",
              "value": "Can you tell me what is the best solution to share files between co workers in a local network? There is a ubuntu server available that can be used to host files."
            },
            {
              "from": "gpt",
              "value": "There are several ways to share files between coworkers on a local network, depending on your specific requirements and the infrastructure you have available..."
            }
          ]
        }
      ]
  2. Save your dataset in JSON, JSONL, or PARQUET format.

    For a quick start, make sure your file is under 100 MB so it can be uploaded directly. If your dataset is larger, refer to the Data Hub section for instructions on uploading large files.

Step 2. Fine-tune a Model

  1. Open Model Fine-tuning → In Fine-tuning Pipelines, click Create Pipeline.

  2. Select a base model from Model Hub.

  3. Choose the dataset format and upload the dataset you prepared in Step 1.

  4. Configure training parameters and infrastructure.

  5. Enter a custom Pipeline name, check the Send email option to receive notifications upon completion and Save pipeline.

  6. Click Start Fine-tuning.

  7. Monitor your job progress in the Fine-tuning Job Dashboard - you can track logs, training loss, and evaluation metrics.

💡 Tip: Training progress and resulting models are automatically versioned and saved in Model Hub.

Step 3. Evaluate your Model

  1. Go to Model Testing → click Test Jobs and Create New Job.

  2. Select the fine-tuned model you created.

  3. Choose the Test suite and Test criteria, and upload your test data if needed.

  4. Review the output and evaluation metrics (Fuzzy Match, BLEU, ROUGE, etc.).

Step 4. Deploy the Model

  1. In Model Hub, locate your fine-tuned model version.

  2. Choose deployment mode (e.g., API Endpoint).

  3. Once deployed, copy the Endpoint URL, Model and Token for inference requests. In addition, we can chat directly on the Interactive Session interface.

Summary

This completes your first end-to-end workflow on AI Studio. You’re now ready to explore more advanced options like multi-node training, dataset versioning, custom evaluation pipelines, etc.

Last updated