diff --git a/configs/context_numbers_10.yaml b/configs/context_numbers_10.yaml index 1ed026b..c29d1ac 100644 --- a/configs/context_numbers_10.yaml +++ b/configs/context_numbers_10.yaml @@ -27,8 +27,7 @@ max_val_samples_per_ds: 500 learning_rate: 0.0001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 # LoRA lora_r: 16 diff --git a/configs/context_numbers_128.yaml b/configs/context_numbers_128.yaml index fed257d..bf7a88d 100644 --- a/configs/context_numbers_128.yaml +++ b/configs/context_numbers_128.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_128_only.yaml b/configs/context_numbers_128_only.yaml index 28a5f6f..526bdf4 100644 --- a/configs/context_numbers_128_only.yaml +++ b/configs/context_numbers_128_only.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_256.yaml b/configs/context_numbers_256.yaml index ca48999..66ece09 100644 --- a/configs/context_numbers_256.yaml +++ b/configs/context_numbers_256.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_256_only.yaml b/configs/context_numbers_256_only.yaml index 47ce81c..68489c6 100644 --- a/configs/context_numbers_256_only.yaml +++ b/configs/context_numbers_256_only.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_32.yaml b/configs/context_numbers_32.yaml index f39138d..61771db 100644 --- a/configs/context_numbers_32.yaml +++ b/configs/context_numbers_32.yaml @@ -26,8 +26,7 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 # LoRA lora_r: 16 diff --git a/configs/context_numbers_32_only.yaml b/configs/context_numbers_32_only.yaml index 5cc0c73..73e2fd7 100644 --- a/configs/context_numbers_32_only.yaml +++ b/configs/context_numbers_32_only.yaml @@ -26,8 +26,7 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 # LoRA lora_r: 16 diff --git a/configs/context_numbers_64.yaml b/configs/context_numbers_64.yaml index 4c69eaf..d4bfc03 100644 --- a/configs/context_numbers_64.yaml +++ b/configs/context_numbers_64.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_64_only.yaml b/configs/context_numbers_64_only.yaml index 42f6bfe..dc76775 100644 --- a/configs/context_numbers_64_only.yaml +++ b/configs/context_numbers_64_only.yaml @@ -26,8 +26,8 @@ max_val_samples_per_ds: 20 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.05 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_debug.yaml b/configs/context_numbers_debug.yaml index 9a5827d..64ef35b 100644 --- a/configs/context_numbers_debug.yaml +++ b/configs/context_numbers_debug.yaml @@ -26,7 +26,7 @@ learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 weight_decay: 0.01 -warmup_ratio: 0.1 + # LoRA lora_r: 16 diff --git a/configs/context_numbers_easy.yaml b/configs/context_numbers_easy.yaml index 316114a..ff2e56c 100644 --- a/configs/context_numbers_easy.yaml +++ b/configs/context_numbers_easy.yaml @@ -26,7 +26,7 @@ learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 weight_decay: 0.01 -warmup_ratio: 0.1 + # LoRA lora_r: 16 diff --git a/configs/default.yaml b/configs/default.yaml index 8bf7fa8..bd37401 100644 --- a/configs/default.yaml +++ b/configs/default.yaml @@ -24,7 +24,7 @@ learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 weight_decay: 0.01 -warmup_ratio: 0.1 + # LoRA lora_r: 8 diff --git a/configs/fw_qa.yaml b/configs/fw_qa.yaml index cc7dcb8..9195a67 100644 --- a/configs/fw_qa.yaml +++ b/configs/fw_qa.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -warmup_ratio: 0.1 + dataloader_prefetch_factor: 8 dataloader_num_workers: 8 diff --git a/configs/fw_qa_ctx_qa.yaml b/configs/fw_qa_ctx_qa.yaml index 0263f92..941d1e0 100644 --- a/configs/fw_qa_ctx_qa.yaml +++ b/configs/fw_qa_ctx_qa.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -warmup_ratio: 0.1 + dataloader_prefetch_factor: 8 dataloader_num_workers: 8 diff --git a/configs/fw_qa_large_ctx_pwc_hotpot.yaml b/configs/fw_qa_large_ctx_pwc_hotpot.yaml index 0efd743..4c601b5 100644 --- a/configs/fw_qa_large_ctx_pwc_hotpot.yaml +++ b/configs/fw_qa_large_ctx_pwc_hotpot.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -warmup_ratio: 0.1 + dataloader_prefetch_factor: 8 dataloader_num_workers: 8 diff --git a/configs/fw_qa_large_ctx_pwc_hotpot_squad.yaml b/configs/fw_qa_large_ctx_pwc_hotpot_squad.yaml index 0c2d194..b4c6e93 100644 --- a/configs/fw_qa_large_ctx_pwc_hotpot_squad.yaml +++ b/configs/fw_qa_large_ctx_pwc_hotpot_squad.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -# warmup_ratio: 0.1 +# warmup_steps: 100 dataloader_prefetch_factor: 8 diff --git a/configs/fw_qa_pwc_hotpot.yaml b/configs/fw_qa_pwc_hotpot.yaml index 1188076..117c223 100644 --- a/configs/fw_qa_pwc_hotpot.yaml +++ b/configs/fw_qa_pwc_hotpot.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -warmup_ratio: 0.1 + dataloader_prefetch_factor: 8 dataloader_num_workers: 8 diff --git a/configs/fw_qa_tiny.yaml b/configs/fw_qa_tiny.yaml index 50598c0..700b845 100644 --- a/configs/fw_qa_tiny.yaml +++ b/configs/fw_qa_tiny.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -warmup_ratio: 0.1 + dataloader_prefetch_factor: 8 dataloader_num_workers: 8 diff --git a/configs/gsm8k.yaml b/configs/gsm8k.yaml index 06a0840..c25f9b8 100644 --- a/configs/gsm8k.yaml +++ b/configs/gsm8k.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -# warmup_ratio: 0.1 +# warmup_steps: 100 dataloader_prefetch_factor: 8 diff --git a/configs/hotpot_qa.yaml b/configs/hotpot_qa.yaml index 1ad924d..10ff35c 100644 --- a/configs/hotpot_qa.yaml +++ b/configs/hotpot_qa.yaml @@ -23,8 +23,8 @@ max_val_samples_per_ds: 1000 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.1 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/math_and_code.yaml b/configs/math_and_code.yaml index 4254ca9..1a9bcf6 100644 --- a/configs/math_and_code.yaml +++ b/configs/math_and_code.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -# warmup_ratio: 0.1 +# warmup_steps: 100 dataloader_prefetch_factor: 8 diff --git a/configs/openmathintx.yaml b/configs/openmathintx.yaml index b48092c..eeb5253 100644 --- a/configs/openmathintx.yaml +++ b/configs/openmathintx.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -# warmup_ratio: 0.1 +# warmup_steps: 100 dataloader_prefetch_factor: 8 diff --git a/configs/pretrain_all.yaml b/configs/pretrain_all.yaml index 86a22b6..b7926fc 100644 --- a/configs/pretrain_all.yaml +++ b/configs/pretrain_all.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 5 weight_decay: 0.01 -# warmup_ratio: 0.1 +# warmup_steps: 100 dataloader_prefetch_factor: 8 diff --git a/configs/pwc.yaml b/configs/pwc.yaml index 9c7da4d..7344e33 100644 --- a/configs/pwc.yaml +++ b/configs/pwc.yaml @@ -23,8 +23,8 @@ max_val_samples_per_ds: 1000 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.1 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/pwc_and_ctx_numbers_256.yaml b/configs/pwc_and_ctx_numbers_256.yaml index 9c95e68..080ff02 100644 --- a/configs/pwc_and_ctx_numbers_256.yaml +++ b/configs/pwc_and_ctx_numbers_256.yaml @@ -23,8 +23,8 @@ max_val_samples_per_ds: 1000 learning_rate: 0.00001 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 -weight_decay: 0.1 -warmup_ratio: 0.1 +weight_decay: 0.01 + # LoRA lora_r: 16 diff --git a/configs/pwc_hotpot_qa.yaml b/configs/pwc_hotpot_qa.yaml index e59e494..d2cb994 100644 --- a/configs/pwc_hotpot_qa.yaml +++ b/configs/pwc_hotpot_qa.yaml @@ -25,7 +25,7 @@ learning_rate: 0.00002 # lr_scheduler_type: "constant_with_warmup" neftune_noise_alpha: 1 weight_decay: 0.01 -warmup_ratio: 0.1 + # LoRA lora_r: 8 diff --git a/src/ctx_to_lora/configs.py b/src/ctx_to_lora/configs.py index d153a6c..91d182f 100644 --- a/src/ctx_to_lora/configs.py +++ b/src/ctx_to_lora/configs.py @@ -49,6 +49,11 @@ class ArgumentParser(HfArgumentParser): for arg, val in other_args.items(): # add only if in keys if arg in keys: + if val in ["None", "none", "null", "NULL"]: + val = None + inputs[arg] = val + used_args[arg] = val + continue base_type = data_yaml.__dataclass_fields__[arg].type inputs[arg] = val @@ -166,6 +171,10 @@ class TrainingArguments(TrainingArguments): default=None, metadata={"help": "Learning rate scheduler kwargs."}, ) + warmup_steps: int = field( + default=100, + metadata={"help": "Number of warmup steps."}, + ) eval_on_start: bool = field( default=True, metadata={"help": "Whether to evaluate on the start of training."},