hyosoon0 commited on
Commit
306ebd6
·
verified ·
1 Parent(s): 174e427

Upload config.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. config.yaml +70 -0
config.yaml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ELECTRA Corrective MLM — full-scale 1B pretraining
2
+ # Generator corrupts input with plausible-but-guaranteed-wrong tokens,
3
+ # discriminator predicts original tokens at ALL positions.
4
+ #
5
+ # Usage:
6
+ # /cache/ssahn_lab/envs/voxfaplm/bin/python -m torch.distributed.run \
7
+ # --nproc_per_node=8 experiments/train_multinode.py \
8
+ # --config configs/pretrain/pretrain_electra.yaml
9
+
10
+ model:
11
+ name: "ELECTRAProteinModel"
12
+ max_residues: 512
13
+ embed_dim: 480
14
+ encoder_depth: 10
15
+ encoder_heads: 20
16
+ decoder_dim: 480
17
+ decoder_depth: 2
18
+ decoder_heads: 20
19
+ # ELECTRA-specific
20
+ generator_depth: 8 # ~27% of disc encoder
21
+ generator_decoder_depth: 2
22
+ disc_loss_weight: 50.0 # corrective CE ≈ same scale as generator CE
23
+ generator_lr_multiplier: 1.0
24
+ generator_temperature: 2.0
25
+
26
+ # Training configuration
27
+ training:
28
+ learning_rate: 1.0e-3
29
+ weight_decay: 0.01
30
+ warmup_steps: 5000
31
+ batch_size: 128
32
+ num_workers: 8
33
+ max_steps: 500000
34
+ total_training_steps: 500000
35
+ accumulate_grad_batches: 1
36
+ val_check_interval: 100
37
+ test_interval: 100
38
+ gradient_clip_val: 1.0
39
+ # Data configuration
40
+ data:
41
+ name: "ELECTRADataModule"
42
+ lmdb_dir: "/cache/ssahn_lab/lmdb/atlas_pdb_all_CHI"
43
+ pdb_dir: "/cache"
44
+ struct_format: "fullatom"
45
+ max_length: 512
46
+ bb_vocab_size: 512
47
+ fa_vocab_size: 512
48
+ mask_prob: 0.6
49
+ random_cropping: true
50
+ # Sequence packing: concat variable-length samples into one super-sequence
51
+ # (bsz=1) with xformers BlockDiagonalMask. Keeps flash attention and
52
+ # eliminates padding waste. Only affects training — probing/eval uses
53
+ # padded path unchanged.
54
+ pack_sequences: true
55
+ # dynamic_batch_tokens: 65536 # opt-in: variable-size batches that pack up
56
+ # to this token budget (maximizes samples per
57
+ # batch based on actual lengths). Disables compile.
58
+
59
+ # Lightning configuration
60
+ lightning:
61
+ gpus: 4
62
+ nodes: 1
63
+ precision: "bf16-mixed"
64
+ compile: false
65
+ checkpoint_dir: "/cache/ssahn_lab/pretrain_model/electra_35M/checkpoints"
66
+ log_dir: "/cache/ssahn_lab/pretrain_model/electra_35M/logs"
67
+ wandb_dir: "/cache/ssahn_lab/pretrain_model/electra_35M/wandb"
68
+ wandb_project: "PLM_submission"
69
+ wandb_name: "electra_35M"
70
+ save_every_n_steps: 10000