Lecture

Getting Started with Fine-Tuning

When you click the Run Fine-Tuning button in the practice environment, fine-tuning begins based on the uploaded training data and the configured hyperparameters.

thumbnail-600

Once fine-tuning is complete, you can interact with the tuned model (e.g., a middle-aged woman speaking in the Gyeongsang dialect) on the right side of the practice environment.

Note: As mentioned in previous lessons, due to policy and technical constraints, the fine-tuning model used in the practice environment is a pre-tuned model by CodeFriends.


What Happens During Training?

As fine-tuning progresses, the weights and biases of the AI model are updated based on the configured hyperparameters.

  • Weights: Determine how important specific features of the input data are.

  • Bias: Adjusts the output of the model to ensure it doesn't lean too heavily in one direction, controlling the activation function of the neural network.


You can think of weights and biases using the following analogy:

  • Weights are like adjusting the amount of ingredients in bread. For instance, controlling the amount of sugar to adjust the sweetness.

  • Bias is like setting the base level of sweetness by deciding how much sugar to add as a default.

  • The training process is like tasting the bread periodically and tweaking the ingredient amounts to find the optimal flavor.


The Fine-Tuning Process

1. Initialization

When AI model training begins, weights and biases are initialized randomly.

In fine-tuning, the weights and biases from a pre-trained model are used as initial values.


2. Forward Propagation

Input data passes through the model. Each input value is multiplied by the weights, and the bias is added to calculate the output.

For example, in y = wx + b, y is the output, w is the weight, x is the input, and b is the bias.


3. Loss Calculation

The difference between the model's prediction (output) and the actual value (ground truth) is calculated to determine the loss. The loss indicates how inaccurate the model's predictions are.

For example, if the prediction is 5 and the actual value is 3, the loss is the difference between them. (e.g., using the mean squared error function, (5-3)^2 = 4)


4. Backpropagation

The model adjusts the weights and biases to minimize the loss.

To achieve this, it calculates how much each weight and bias contributes to the loss. This process uses differentiation to compute gradients.


5. Updating Weights and Biases

Using the calculated gradients, the weights and biases are updated. This adjustment is made in the direction that reduces the loss.

Mission
0 / 1

Weights and biases are always initialized randomly during the fine-tuning process.

True
False

Lecture

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help