You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/finetuning/finetuning-classification.ipynb
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -257,7 +257,7 @@
257
257
"\n",
258
258
"- Your file contains 1197 prompt-completion pairs\n",
259
259
"- Based on your data it seems like you're trying to fine-tune a model for classification\n",
260
-
"- For classification, we recommend you try one of the faster and cheaper models, such as `ada`. You should also set the `--no_packing` parameter when fine-tuning\n",
260
+
"- For classification, we recommend you try one of the faster and cheaper models, such as `ada`\n",
261
261
"- For classification, you can estimate the expected model performance by keeping a held out dataset, which is not used for training\n",
262
262
"- There are 11 examples that are very long. These are rows: [134, 200, 281, 320, 404, 595, 704, 838, 1113, 1139, 1174]\n",
263
263
"For conditional generation, and for classification the examples shouldn't be longer than 2048 tokens.\n",
"After you’ve fine-tuned a model, remember that your prompt has to end with the indicator string `\\n\\n###\\n\\n` for the model to start generating completions, rather than continuing with the prompt.\n",
283
283
"Once your model starts training, it'll approximately take 30.8 minutes to train a `curie` model, and less for `ada` and `babbage`. Queue will approximately take half an hour per job ahead of you.\n"
@@ -301,7 +301,7 @@
301
301
"cell_type": "markdown",
302
302
"source": [
303
303
"## Fine-tuning\n",
304
-
"The tool suggests we run the following command to train the dataset. Since this is a classification task, we would like to know what the generalization performance on the provided validation set is for our classification use case. The tool suggests to add `--compute_classification_metrics --classification_positive_class \" baseball\"` in order to compute the classification metrics. Classification performs better with a hyperparameter `--no_packing`.\n",
304
+
"The tool suggests we run the following command to train the dataset. Since this is a classification task, we would like to know what the generalization performance on the provided validation set is for our classification use case. The tool suggests to add `--compute_classification_metrics --classification_positive_class \" baseball\"` in order to compute the classification metrics.\n",
305
305
"\n",
306
306
"We can simply copy the suggested command from the CLI tool. We specifically add `-m ada` to fine-tune a cheaper and faster ada model, which is usually comperable in performance to slower and more expensive models on classification use cases. "
This validator will infer the likely fine-tuning format of the data, and display it to the user if it is classification.
538
-
It will also suggest to use ada, --no_packing and explain train/validation split benefits.
537
+
It will also suggest to use ada and explain train/validation split benefits.
539
538
"""
540
539
ft_type=infer_task_type(df)
541
540
immediate_msg=None
542
541
ifft_type=="classification":
543
-
immediate_msg=f"\n- Based on your data it seems like you're trying to fine-tune a model for {ft_type}\n- For classification, we recommend you try one of the faster and cheaper models, such as `ada`. You should also set the `--no_packing` parameter when fine-tuning\n- For classification, you can estimate the expected model performance by keeping a held out dataset, which is not used for training"
542
+
immediate_msg=f"\n- Based on your data it seems like you're trying to fine-tune a model for {ft_type}\n- For classification, we recommend you try one of the faster and cheaper models, such as `ada`\n- For classification, you can estimate the expected model performance by keeping a held out dataset, which is not used for training"
This function will write out a dataframe to a file, if the user would like to proceed, and also offer a fine-tuning command with the newly created file.
0 commit comments