ladderlore
ガイドをリクエスト
  • S3 や IAM などのサービス名を入力してください。

概念

Fine-tuning methods

Ways to adapt a pre-trained model: instruction tuning, domain adaptation, transfer learning and continued pre-training.

このレッスンはまだ翻訳されていないため、英語で表示しています。

  • Instruction tuning

    Data
    Labeled prompt and response pairs
    Goal
    Follow your requests better
  • Domain adaptation

    Data
    Text from one field
    Goal
    Handle the field's language
  • Transfer learning

    Data
    A small task data set
    Goal
    Reuse what the model knows
  • Continued pre-training

    Data
    Large unlabeled text
    Goal
    Widen domain knowledge
Four methods and the data each one uses.

1 / 2

  • Instruction tuning

    Data
    Labeled prompt and response pairs
    Goal
    Follow your requests better
  • Domain adaptation

    Data
    Text from one field
    Goal
    Handle the field's language
  • Transfer learning

    Data
    A small task data set
    Goal
    Reuse what the model knows

2 / 2

  • Continued pre-training

    Data
    Large unlabeled text
    Goal
    Widen domain knowledge
Four methods and the data each one uses.
  • Labeled data

    Inputs with the right answers. Used for fine-tuning.

  • Unlabeled data

    Raw text with no answers. Used for continued pre-training.

Labeled data teaches a task. Unlabeled data teaches a domain.

概要

Fine-tuning changes a pre-trained model so it fits your task. It starts from what the model already knows, so it needs far less data and compute than training from scratch. This reuse is called transfer learning.

Instruction tuning trains the model on pairs of an instruction and a good response, so it follows your kind of requests better. Domain adaptation tunes the model on text from one field, such as law or medicine, so it handles that language. Continued pre-training feeds the model large amounts of unlabeled text from your field to widen its knowledge.

概要

The data type is the main difference. Fine-tuning needs labeled examples, which are prompt and response pairs, and teaches a task. Continued pre-training uses unlabeled text with no answers and teaches a domain. In Amazon Bedrock the training data sits in Amazon S3. You can set a few training settings: epochs (passes over the data), learning rate (size of each update) and batch size (examples per update).

覚えること

  • Transfer learning: reuse a pre-trained model's knowledge. Instruction tuning: train on instruction and response pairs.
  • Domain adaptation: tune on text from one field.
  • Fine-tuning uses labeled prompt and response pairs. Continued pre-training uses unlabeled text.
  • In Amazon Bedrock the data sits in Amazon S3. Main settings: epochs, learning rate, batch size.

覚えること

  • Fine-tuning changes the model. RAG does not.

試験では

  • “Train on prompt and response pairs so the model follows instructions” describes instruction tuning.
  • “Add large unlabeled domain text to the model's knowledge” describes continued pre-training.