From c7ab8d05b342d273822b8097c0192c81b506583d Mon Sep 17 00:00:00 2001 From: 51616 Date: Mon, 21 Jul 2025 09:03:58 +0000 Subject: [PATCH] small configs --- configs/qa_short_ctx.yaml | 8 +-- configs/qa_short_ctx_compact.yaml | 59 +++++++++++++++++++ configs/small_exp/qa_short_ctx_lv1_small.yaml | 53 +++++++++++++++++ ...rt_ctx_self_gen_lv0_closed_qa_1_small.yaml | 53 +++++++++++++++++ ...rt_ctx_self_gen_lv1_closed_qa_0_small.yaml | 53 +++++++++++++++++ ...rt_ctx_self_gen_lv1_closed_qa_1_small.yaml | 2 +- configs/squad_compact.yaml | 45 ++++++++++++++ 7 files changed, 268 insertions(+), 5 deletions(-) create mode 100644 configs/qa_short_ctx_compact.yaml create mode 100644 configs/small_exp/qa_short_ctx_lv1_small.yaml create mode 100644 configs/small_exp/qa_short_ctx_self_gen_lv0_closed_qa_1_small.yaml create mode 100644 configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_0_small.yaml create mode 100644 configs/squad_compact.yaml diff --git a/configs/qa_short_ctx.yaml b/configs/qa_short_ctx.yaml index f57304b..68828f8 100644 --- a/configs/qa_short_ctx.yaml +++ b/configs/qa_short_ctx.yaml @@ -40,10 +40,10 @@ target_modules: # short ctx data train_ds_names: - fw_qa_v2_2k_len_level_3 - - squad_compact - - pwc_compact - - drop_compact - - ropes_compact + - squad + - pwc + - drop + - ropes # the contexts are kinda long-ish # - narrativeqa diff --git a/configs/qa_short_ctx_compact.yaml b/configs/qa_short_ctx_compact.yaml new file mode 100644 index 0000000..f57304b --- /dev/null +++ b/configs/qa_short_ctx_compact.yaml @@ -0,0 +1,59 @@ +output_dir: "" # just a placeholder +bf16: true +model_name_or_path: google/gemma-3-1b-it +label_names: ["labels"] +# eval_on_start: True +# eval_strategy: "steps" +# eval_steps: 500 +# save_strategy: "no" +# # save_steps: 500 +# logging_strategy: "steps" +# logging_steps: 100 +# use_liger_kernel: true +# remove_unused_columns: false + +# needed to avoid OOM by compute the metrics batch by batch +# w/o this the trainer stores logits of all sample in memory... +# batch_eval_metrics: true + +per_device_train_batch_size: 8 +per_device_eval_batch_size: 8 +max_val_samples_per_ds: 1000 +# optim: schedule_free_adamw + +learning_rate: 0.00004 +# lr_scheduler_type: "constant_with_warmup" +neftune_noise_alpha: 1 +weight_decay: 0.01 + +warmup_steps: 100 + +dataloader_prefetch_factor: 16 +dataloader_num_workers: 8 + +# LoRA +lora_r: 8 +lora_dropout: 0.0 +target_modules: + - down_proj + +# short ctx data +train_ds_names: + - fw_qa_v2_2k_len_level_3 + - squad_compact + - pwc_compact + - drop_compact + - ropes_compact + +# the contexts are kinda long-ish +# - narrativeqa +# - quoref +# - synthetic_convqa + +val_ds_names: + - fw_qa_v2_2k_len_level_0 + - squad + - drop + - ropes + - pwc + diff --git a/configs/small_exp/qa_short_ctx_lv1_small.yaml b/configs/small_exp/qa_short_ctx_lv1_small.yaml new file mode 100644 index 0000000..0d1fca9 --- /dev/null +++ b/configs/small_exp/qa_short_ctx_lv1_small.yaml @@ -0,0 +1,53 @@ +output_dir: "" # just a placeholder +bf16: true +model_name_or_path: google/gemma-3-1b-it +label_names: ["labels"] +# eval_on_start: True +# eval_strategy: "steps" +# eval_steps: 500 +# save_strategy: "no" +# # save_steps: 500 +# logging_strategy: "steps" +# logging_steps: 100 +# use_liger_kernel: true +# remove_unused_columns: false + +# needed to avoid OOM by compute the metrics batch by batch +# w/o this the trainer stores logits of all sample in memory... +# batch_eval_metrics: true + +per_device_train_batch_size: 8 +per_device_eval_batch_size: 8 +max_val_samples_per_ds: 1000 +# optim: schedule_free_adamw + +learning_rate: 0.00004 +# lr_scheduler_type: "constant_with_warmup" +neftune_noise_alpha: 1 +weight_decay: 0.01 + +warmup_steps: 100 + +dataloader_prefetch_factor: 16 +dataloader_num_workers: 8 + +# LoRA +lora_r: 8 +lora_dropout: 0.0 +target_modules: + - down_proj + +# data +train_ds_names: + - fw_qa_v2_2k_len_level_1_small + - pwc_compact + # these provide exact tokens needed, no need to use self-gen data + - squad_compact + - ropes_compact + - drop_compact + +val_ds_names: + - squad + - pwc + - drop + - ropes diff --git a/configs/small_exp/qa_short_ctx_self_gen_lv0_closed_qa_1_small.yaml b/configs/small_exp/qa_short_ctx_self_gen_lv0_closed_qa_1_small.yaml new file mode 100644 index 0000000..60c8a68 --- /dev/null +++ b/configs/small_exp/qa_short_ctx_self_gen_lv0_closed_qa_1_small.yaml @@ -0,0 +1,53 @@ +output_dir: "" # just a placeholder +bf16: true +model_name_or_path: google/gemma-3-1b-it +label_names: ["labels"] +# eval_on_start: True +# eval_strategy: "steps" +# eval_steps: 500 +# save_strategy: "no" +# # save_steps: 500 +# logging_strategy: "steps" +# logging_steps: 100 +# use_liger_kernel: true +# remove_unused_columns: false + +# needed to avoid OOM by compute the metrics batch by batch +# w/o this the trainer stores logits of all sample in memory... +# batch_eval_metrics: true + +per_device_train_batch_size: 8 +per_device_eval_batch_size: 8 +max_val_samples_per_ds: 1000 +# optim: schedule_free_adamw + +learning_rate: 0.00004 +# lr_scheduler_type: "constant_with_warmup" +neftune_noise_alpha: 1 +weight_decay: 0.01 + +warmup_steps: 100 + +dataloader_prefetch_factor: 16 +dataloader_num_workers: 8 + +# LoRA +lora_r: 8 +lora_dropout: 0.0 +target_modules: + - down_proj + +# data +train_ds_names: + - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_1.0/fw_qa_v2/min_0_to_2000/train/*level_0.parquet + - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_0.0/pwc_compact + # these provide exact tokens needed, no need to use self-gen data + - squad_compact + - ropes_compact + - drop_compact + +val_ds_names: + - squad + - pwc + - drop + - ropes diff --git a/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_0_small.yaml b/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_0_small.yaml new file mode 100644 index 0000000..9b28b08 --- /dev/null +++ b/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_0_small.yaml @@ -0,0 +1,53 @@ +output_dir: "" # just a placeholder +bf16: true +model_name_or_path: google/gemma-3-1b-it +label_names: ["labels"] +# eval_on_start: True +# eval_strategy: "steps" +# eval_steps: 500 +# save_strategy: "no" +# # save_steps: 500 +# logging_strategy: "steps" +# logging_steps: 100 +# use_liger_kernel: true +# remove_unused_columns: false + +# needed to avoid OOM by compute the metrics batch by batch +# w/o this the trainer stores logits of all sample in memory... +# batch_eval_metrics: true + +per_device_train_batch_size: 8 +per_device_eval_batch_size: 8 +max_val_samples_per_ds: 1000 +# optim: schedule_free_adamw + +learning_rate: 0.00004 +# lr_scheduler_type: "constant_with_warmup" +neftune_noise_alpha: 1 +weight_decay: 0.01 + +warmup_steps: 100 + +dataloader_prefetch_factor: 16 +dataloader_num_workers: 8 + +# LoRA +lora_r: 8 +lora_dropout: 0.0 +target_modules: + - down_proj + +# data +train_ds_names: + - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_0.0/fw_qa_v2/min_0_to_2000/train/*level_1.parquet + - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_0.0/pwc_compact + # these provide exact tokens needed, no need to use self-gen data + - squad_compact + - ropes_compact + - drop_compact + +val_ds_names: + - squad + - pwc + - drop + - ropes diff --git a/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_1_small.yaml b/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_1_small.yaml index 60c8a68..af9fd3f 100644 --- a/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_1_small.yaml +++ b/configs/small_exp/qa_short_ctx_self_gen_lv1_closed_qa_1_small.yaml @@ -39,7 +39,7 @@ target_modules: # data train_ds_names: - - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_1.0/fw_qa_v2/min_0_to_2000/train/*level_0.parquet + - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_1.0/fw_qa_v2/min_0_to_2000/train/*level_1.parquet - self_gen/google/gemma-2-2b-it_temp_0.0_closed_qa_prob_0.0/pwc_compact # these provide exact tokens needed, no need to use self-gen data - squad_compact diff --git a/configs/squad_compact.yaml b/configs/squad_compact.yaml new file mode 100644 index 0000000..df09586 --- /dev/null +++ b/configs/squad_compact.yaml @@ -0,0 +1,45 @@ +output_dir: "" # just a placeholder +bf16: true +model_name_or_path: google/gemma-3-1b-it +label_names: ["labels"] +# eval_on_start: True +# eval_strategy: "steps" +# eval_steps: 500 +# save_strategy: "no" +# # save_steps: 500 +# logging_strategy: "steps" +# logging_steps: 100 +# use_liger_kernel: true +# remove_unused_columns: false + +# needed to avoid OOM by compute the metrics batch by batch +# w/o this the trainer stores logits of all sample in memory... +# batch_eval_metrics: true + +per_device_train_batch_size: 8 +per_device_eval_batch_size: 8 +max_val_samples_per_ds: 1000 +# optim: schedule_free_adamw + +learning_rate: 0.00004 +# lr_scheduler_type: "constant_with_warmup" +neftune_noise_alpha: 1 +weight_decay: 0.01 + +warmup_steps: 100 + +dataloader_prefetch_factor: 16 +dataloader_num_workers: 8 + +# LoRA +lora_r: 8 +lora_dropout: 0.0 +target_modules: + - down_proj + +# data +train_ds_names: + - squad_compact + +val_ds_names: + - squad