1: log_level: info
2: run_name: marge_f2
3: parent_output_dir: null  # all run info will be stored in {parent_output_dir}/{run_name}
4: local_output_dir: null
5: overwrite: False  # If False, will only run job when output file does not already exist.
6: run_evol_dataset_gen: True
7: run_propen_sft_dataset_formatting: True
8: run_sft: True
9: run_iter_gen: True
10: run_propen_dpo_dataset_formatting: True
11: generation_sampling_num_return_sequences: 10
12: num_labels_after_first_round: 2000 # num. of labels to use in all rounds after the first
13: proportion_of_old_data: 0.0  # proportion of the training dataset that will contain old data
14: seed: 0
15: temperature_scaling: True
16: job_submission_system: slurm
17: greedy_gen_batch_size: 8
18: sampling_gen_batch_size: 1
19: initial_model: "EleutherAI/pythia-2.8b"
20: sanity_check: False  # will be propagated to all training + generation jobs
21: path_to_repo: null # will be set to "~/llome" if null
22: 
23: num_dpo_rounds: 0
24: num_sft_rounds: 1
25: num_marge_rounds: 9
26: 
27: evol_dataset_gen:
28:   args:
29:     optimizer:
30:       num_particles: 1000
31:       mutation_prob: 0.005
32:     test_function:
33:       num_states: 32
34:       dim: 32
35:       num_motifs: 4
36:       motif_length: 4
37:       quantization: 4
38:     random_seed: 0
39:     log_interval: 1
40:     log_level: info
41:     num_opt_steps: 10
42:     project_name: llome
43:     exp_name: llome_marge
44:     job_name: llome_marge
45:     # Dataset generation parameters
46:     num_test_fns: 1
47:     # Hyperparameters to run iterations of the GA for
48:     hyperparameter_ranges:
49:       survival_quantile: [0.1]
50:   slurm_args:
51:   # run on single gpu
52:     nodes: 1
53:     cpus_per_task: 1
54:     ntasks_per_node: 1
55:     gpus_per_node: 1
56:     partition: "gpu2"
57:     open_mode: "append"
58:     export: "ALL"
59:     time: "48:00:00"
60:     mem: "100GB"
61: 
62: propen_dataset_formatting_sft:
63:   args:
64:     dist_x_threshold: 0.25
65:     max_proportion_infeasible: 0.1  # the maximum proportion of the dataset that infeasible examples
66:                                     # or pairs containing infeasible examples can be
67:     distance_metric: "hamming"
68:     seed: 0
69:     n_neighbors: 30  # how many approx. nearest neighbors to compute -- higher is more accurate but more expensive
70:     filter_by_likelihood: True
71:     likelihood_quantile_threshold: 0.6
72:     filter_by_likelihood_range: False
73:   slurm_args:
74:     nodes: 1
75:     cpus_per_task: 1
76:     ntasks_per_node: 1
77:     partition: "himem"
78:     open_mode: "append"
79:     export: "ALL"
80:     time: "192:00:00"
81:     mem: "100GB"
82: 
83: propen_dataset_formatting_preference:
84:   args:
85:     dist_x_threshold: 0.25
86:     max_proportion_infeasible: 0.1  # the maximum proportion of the dataset that infeasible examples
87:                                     # or pairs containing infeasible examples can be
88:     distance_metric: "hamming"
89:     seed: 0
90:     n_neighbors: 30  # how many approx. nearest neighbors to compute -- higher is more accurate but more expensive
91:     filter_by_likelihood: True
92:     likelihood_quantile_threshold: 0.6
93:     filter_by_likelihood_range: False
94:   slurm_args:
95:     nodes: 1
96:     cpus_per_task: 1
97:     ntasks_per_node: 1
98:     partition: "himem"
99:     open_mode: "append"
100:     export: "ALL"
101:     time: "192:00:00"
102:     mem: "100GB"
103: 
104: sft:
105:   args:
106:     training_args:
107:       num_train_epochs: 1
108:       seed: 0
109:       eval_steps: 0.1
110:       save_steps: 0.2
111:       learning_rate: 1e-6
112:       per_device_train_batch_size: 2
113:       per_device_eval_batch_size: 8
114:       eval_accumulation_steps: 2
115:       gradient_accumulation_steps: 32
116:       max_seq_length: 512
117:       log_level: "info"
118: 
119:     generation_config:  # use greedy decoding during evaluation
120:       max_new_tokens: 256
121:       num_beams: 1
122:       do_sample: False
123:       num_return_sequences: 1
124: 
125:     model_config:
126:       model_name_or_path: "EleutherAI/pythia-2.8b"
127:       attn_implementation: "eager"
128:     train_size: 0.95
129:     max_eval_size: 100 # evaluation takes a long time, so we set a max. size on the eval dataset
130:     seq_length: 512
131:     format_type: "edit_pairs"
132:     # test function
133:     test_fn_type: "ehrlich"  # [ehrlich, mt_fuji]
134: 
135:     # instrumentation
136:     log_level: "info"
137:     project_name: "finetune_ehrlich"
138:     exp_name: "finetune_pythia-2.8b"
139:   slurm_args:
140:     nodes: 1
141:     cpus_per_task: 2
142:     ntasks_per_node: 2
143:     gpus_per_node: 2
144:     partition: "gpu2"
145:     open_mode: "append"
146:     export: "ALL"
147:     time: "48:00:00"
148:     mem: "100GB"
149: 
150: marge:
151:   args:
152:     marge_config:
153:       learning_rate: 1e-6
154:       alpha: 1.0
155:       beta: 10.0
156:       gradient_accumulation_steps: 32
157:       num_train_epochs: 1
158:       eval_steps: 0.1
159:       save_steps: 0.2
160:       self_normalize_weights: True
161:       reinforce_style: False
162:       max_length: 512
163:       max_prompt_length: 256
164:       log_level: "info"
165:       seed: 0
166:       per_device_train_batch_size: 1
167:     test_fn_type: "ehrlich"
168:     train_size: 0.95
169:     max_eval_size: 100
170:     generation_config:
171:       max_new_tokens: 256
172:   slurm_args:
173:     nodes: 1
174:     cpus_per_task: 2
175:     ntasks_per_node: 2
176:     gpus_per_node: 2
177:     partition: "gpu2"
178:     open_mode: "append"
179:     export: "ALL"
180:     time: "48:00:00"
181:     mem: "200GB"
182: 
183: iterative_generation:
184:   num_jobs: 6  # number of generation jobs to parallelize this over
185:   args:
186:     sanity_check: False
187:     sample_size: 200
188:     max_iterations: 10
189:     log_level: info
190:     seed: 0
191:     test_fn_type: "ehrlich"  # [ehrlich, mt_fuji]
192:     sampling_method: "best_scoring" # "uniform", "combination", "best_scoring"
193:     generation_config:
194:       max_new_tokens: 512
195:   slurm_args:
196:     nodes: 1
197:     cpus_per_task: 1
198:     ntasks_per_node: 1
199:     gpus_per_node: 1
200:     partition: "gpu2"
201:     open_mode: "append"
202:     export: "ALL"
203:     time: "48:00:00"
204:     mem: "100GB"