diff --git a/colabs/AutoTrain_Dreambooth.ipynb b/colabs/AutoTrain_Dreambooth.ipynb index e390d5587c..06940639f1 100644 --- a/colabs/AutoTrain_Dreambooth.ipynb +++ b/colabs/AutoTrain_Dreambooth.ipynb @@ -52,6 +52,7 @@ "#@markdown You can find your token here: https://huggingface.co/settings/tokens\n", "push_to_hub = False # @param [\"False\", \"True\"] {type:\"raw\"}\n", "hf_token = \"hf_XXX\" #@param {type:\"string\"}\n", + "hf_username = \"abc\" #@param {type:\"string\"}\n", "\n", "#@markdown ---\n", "#@markdown #### Hyperparameters\n", @@ -80,7 +81,8 @@ "os.environ[\"USE_XFORMERS\"] = str(use_xformers)\n", "os.environ[\"MIXED_PRECISION\"] = str(mixed_precision)\n", "os.environ[\"TRAIN_TEXT_ENCODER\"] = str(train_text_encoder)\n", - "os.environ[\"DISABLE_GRADIENT_CHECKPOINTING\"] = str(disable_gradient_checkpointing)" + "os.environ[\"DISABLE_GRADIENT_CHECKPOINTING\"] = str(disable_gradient_checkpointing)\n", + "os.environ[\"HF_USERNAME\"] = hf_username" ] }, { @@ -107,6 +109,7 @@ "--gradient-accumulation ${GRADIENT_ACCUMULATION} \\\n", "--lr ${LEARNING_RATE} \\\n", "--mixed-precision ${MIXED_PRECISION} \\\n", + "--username ${HF_USERNAME} \\\n", "$( [[ \"$USE_XFORMERS\" == \"True\" ]] && echo \"--xformers\" ) \\\n", "$( [[ \"$TRAIN_TEXT_ENCODER\" == \"True\" ]] && echo \"--train-text-encoder\" ) \\\n", "$( [[ \"$USE_8BIT_ADAM\" == \"True\" ]] && echo \"--use-8bit-adam\" ) \\\n", diff --git a/colabs/AutoTrain_LLM.ipynb b/colabs/AutoTrain_LLM.ipynb index df4a5e2098..d89735a6fe 100644 --- a/colabs/AutoTrain_LLM.ipynb +++ b/colabs/AutoTrain_LLM.ipynb @@ -49,6 +49,7 @@ "#@markdown You can find your token here: https://huggingface.co/settings/tokens\n", "push_to_hub = False # @param [\"False\", \"True\"] {type:\"raw\"}\n", "hf_token = \"hf_XXX\" #@param {type:\"string\"}\n", + "hf_username = \"abc\" #@param {type:\"string\"}\n", "\n", "#@markdown ---\n", "#@markdown #### Hyperparameters\n", @@ -56,7 +57,7 @@ "num_epochs = 1 #@param {type:\"number\"}\n", "batch_size = 1 # @param {type:\"slider\", min:1, max:32, step:1}\n", "block_size = 1024 # @param {type:\"number\"}\n", - "trainer = \"sft\" # @param [\"default\", \"sft\"] {type:\"raw\"}\n", + "trainer = \"sft\" # @param [\"default\", \"sft\", \"orpo\"] {type:\"raw\"}\n", "warmup_ratio = 0.1 # @param {type:\"number\"}\n", "weight_decay = 0.01 # @param {type:\"number\"}\n", "gradient_accumulation = 4 # @param {type:\"number\"}\n", @@ -83,7 +84,9 @@ "os.environ[\"QUANTIZATION\"] = str(quantization)\n", "os.environ[\"LORA_R\"] = str(lora_r)\n", "os.environ[\"LORA_ALPHA\"] = str(lora_alpha)\n", - "os.environ[\"LORA_DROPOUT\"] = str(lora_dropout)" + "os.environ[\"LORA_DROPOUT\"] = str(lora_dropout)\n", + "os.environ[\"HF_USERNAME\"] = hf_username\n", + "os.environ[\"TRAINER\"] = trainer" ] }, { @@ -113,6 +116,8 @@ "--gradient-accumulation ${GRADIENT_ACCUMULATION} \\\n", "--quantization ${QUANTIZATION} \\\n", "--mixed-precision ${MIXED_PRECISION} \\\n", + "--username ${HF_USERNAME} \\\n", + "--trainer ${TRAINER} \\\n", "$( [[ \"$PEFT\" == \"True\" ]] && echo \"--peft\" ) \\\n", "$( [[ \"$PUSH_TO_HUB\" == \"True\" ]] && echo \"--push-to-hub --token ${HF_TOKEN}\" )" ]