|
85 | 85 |
|
86 | 86 | """### A custom GPT2 encoder layer for text embedding""" |
87 | 87 |
|
88 | | -""" un - string out |
| 88 | + |
89 | 89 | class GPT2Layer(tf.keras.layers.Layer): |
90 | 90 |
|
91 | 91 | def __init__(self, max_seq_length, **kwargs): |
@@ -183,7 +183,6 @@ def from_config(cls, config): |
183 | 183 | hy_df = pd.DataFrame(history.history) |
184 | 184 | print(hy_df) |
185 | 185 |
|
186 | | -""" # end un - string out |
187 | 186 |
|
188 | 187 | ### Cerebros model: |
189 | 188 |
|
@@ -274,8 +273,8 @@ def from_config(cls, config): |
274 | 273 | learning_rate = 0.0000511065 |
275 | 274 | epochs = 15 # [1, 100] |
276 | 275 | batch_size = 20 |
277 | | -minimum_levels = 4 |
278 | | -maximum_levels = 4 # [3,7] |
| 276 | +minimum_levels = 2 |
| 277 | +maximum_levels = 3 # [3,7] |
279 | 278 |
|
280 | 279 | minimum_units_per_level = 4 |
281 | 280 | maximum_units_per_level = 8 |
@@ -353,8 +352,7 @@ def from_config(cls, config): |
353 | 352 | cerebros_time_per_model = cerebros_time_all_models_min / models_tried |
354 | 353 |
|
355 | 354 | print(f"Cerebros trained {models_tried} models FROM A COLD START in ONLY {cerebros_time_all_models_min} min. Cerebros took only {cerebros_time_per_model} minutes on average per model.") |
356 | | -# Un-comment out the next line |
357 | | -# print(f"GPT2 took {gpt_time_on_one_model_min} just to FINE TUNE one PRE - TRAINED model. Although this is a small scale test, this shows the advantage of scaling in ON timing VS ON**2 timing.") |
| 355 | +print(f"GPT2 took {gpt_time_on_one_model_min} just to FINE TUNE one PRE - TRAINED model. Although this is a small scale test, this shows the advantage of scaling in ON timing VS ON**2 timing.") |
358 | 356 |
|
359 | 357 |
|
360 | 358 | print(f'Cerebros best accuracy achieved is {result}') |
|
0 commit comments