Upload config.py
Browse files- configs/config.py +63 -19
configs/config.py
CHANGED
@@ -1,19 +1,63 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MODE = "train" # train, ppl_eval, sample_eval
|
2 |
+
DIFFUSION = "absorbing_state"
|
3 |
+
BACKBONE = "dit"
|
4 |
+
PARAMETERIZATION = "subs" # subs, d3pm, sedd
|
5 |
+
TIME_CONDITIONING = False
|
6 |
+
T = 1000
|
7 |
+
SUBS_MASKING = False
|
8 |
+
LATENT_DIM = 1280
|
9 |
+
MODEL_NAME = 'facebook/esm2_t33_650M_UR50D'
|
10 |
+
|
11 |
+
SEED = 1
|
12 |
+
|
13 |
+
class Loader:
|
14 |
+
BATCH_SIZE = 8
|
15 |
+
DATA_PATH = "/workspace/a03-sgoel/MDpLM/data"
|
16 |
+
|
17 |
+
class Sampling:
|
18 |
+
PREDICTOR = "ddpm_cache" # analytic, ddpm, ddpm_cache (recommended)
|
19 |
+
STEPS = 128
|
20 |
+
NOISE_REMOVAL = True
|
21 |
+
STRIDE_LENGTH = 1
|
22 |
+
NUM_STRIDES = 1
|
23 |
+
NUM_SAMPLING_BATCHES = 2
|
24 |
+
|
25 |
+
class model:
|
26 |
+
hidden_size = 1280
|
27 |
+
cond_dim = 1280
|
28 |
+
n_heads = 8
|
29 |
+
n_blocks = 2
|
30 |
+
dropout = 0.5
|
31 |
+
length = 512
|
32 |
+
|
33 |
+
class Training:
|
34 |
+
EMA = 0.9999
|
35 |
+
ANTITHETIC_SAMPLING = True
|
36 |
+
SAMPLING_EPS = 1e-3
|
37 |
+
ACCUMULATE_GRAD_BATCHES = 2
|
38 |
+
NUM_EPOCHS = 10
|
39 |
+
GRADIENT_CLIP_VAL = 1.0
|
40 |
+
PRECISION = 'bf16'
|
41 |
+
MAX_STEPS = 1,000,000
|
42 |
+
LOG_EVERY_N_STEPS: 10
|
43 |
+
GPUS = 2
|
44 |
+
SAVE_DIR = "/workspace/a03-sgoel/MDpLM/models"
|
45 |
+
|
46 |
+
class Eval:
|
47 |
+
CHECKPOINT_PATH = "/workspace/a03-sgoel/MDpLM/checkpoints"
|
48 |
+
DISABLE_EMA = False
|
49 |
+
COMPUTE_GENERATIVE_PERPLEXITY = False
|
50 |
+
PERPLEXITY_BATCH_SIZE = 8
|
51 |
+
GENERATE_SAMPLES = True
|
52 |
+
|
53 |
+
class Optim:
|
54 |
+
LR = 1e-4
|
55 |
+
BETA1 = 0.9
|
56 |
+
BETA2 = 0.999
|
57 |
+
EPS = 1e-8
|
58 |
+
|
59 |
+
|
60 |
+
# finish this when training actually works
|
61 |
+
class Wandb:
|
62 |
+
PROJECT = "MDpLM_shrey_test"
|
63 |
+
GROUP = "programmablebio"
|