hyosoon0 commited on
Commit
e24ed76
·
verified ·
1 Parent(s): 4d68618

Upload config.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. config.yaml +78 -0
config.yaml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 2560
14
+ encoder_depth: 33
15
+ encoder_heads: 40
16
+ decoder_dim: 2560
17
+ decoder_depth: 3
18
+ decoder_heads: 40
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
+ relax_temperature_scaling: null # null = 1/sqrt(head_dim) further relaxes attention temperature
26
+ # Stability: QK-Norm (Dehghani 2023, ViT-22B; also Qwen3) prevents attention
27
+ use_qk_norm: false
28
+
29
+ # Training configuration
30
+ training:
31
+ learning_rate: 1.0e-3
32
+ weight_decay: 0.01
33
+ # Qwen/Llama/PaLM use β2=0.95 at scale (default 0.999 causes loss spikes).
34
+ adam_beta1: 0.9
35
+ adam_beta2: 0.95
36
+ # Warm-starting from a pre-QK-Norm ckpt with calibrated q_norm/k_norm:
37
+ # longer warmup lets the optimizer slide the calibrated weights toward the
38
+ # standard RMSNorm range without shocking the learned representation.
39
+ warmup_steps: 5000
40
+ batch_size: 32
41
+ num_workers: 8
42
+ max_steps: 500000
43
+ total_training_steps: 500000
44
+ accumulate_grad_batches: 1
45
+ val_check_interval: 100
46
+ test_interval: 100
47
+ gradient_clip_val: 1.0
48
+ # Data configuration
49
+ data:
50
+ name: "ELECTRADataModule"
51
+ lmdb_dir: "/cache/ssahn_lab/lmdb/atlas_pdb_all_CHI"
52
+ pdb_dir: "/cache"
53
+ struct_format: "fullatom"
54
+ max_length: 512
55
+ bb_vocab_size: 512
56
+ fa_vocab_size: 512
57
+ mask_prob: 0.6
58
+ random_cropping: true
59
+ # Sequence packing: concat variable-length samples into one super-sequence
60
+ # (bsz=1) with xformers BlockDiagonalMask. Keeps flash attention and
61
+ # eliminates padding waste. Only affects training — probing/eval uses
62
+ # padded path unchanged.
63
+ pack_sequences: false
64
+ # dynamic_batch_tokens: 65536 # opt-in: variable-size batches that pack up
65
+ # to this token budget. Disables compile.
66
+
67
+ # Lightning configuration
68
+ lightning:
69
+ gpus: 8
70
+ nodes: 2
71
+ precision: "bf16-mixed"
72
+ compile: true
73
+ checkpoint_dir: "/cache/ssahn_lab/pretrain_model/electra_3B/checkpoints"
74
+ log_dir: "/cache/ssahn_lab/pretrain_model/electra_3B/logs"
75
+ wandb_dir: "/cache/ssahn_lab/pretrain_model/electra_3B/wandb"
76
+ wandb_project: "PLM_submission"
77
+ wandb_name: "electra_3B"
78
+ save_every_n_steps: 10000