| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| echo "===========================================================" |
| echo "V5.1-FIXED FINAL: Contrastive Training" |
| echo "===========================================================" |
| echo "Job ID: $SLURM_JOB_ID" |
| echo "Started: $(date)" |
| echo "" |
| echo "Configuration:" |
| echo " Positives: 161,906" |
| echo " Negatives: 150,000 (100K rule + 50K model)" |
| echo " Loss: 80% MLM + 20% InfoNCE" |
| echo " Temperature: 0.1 -> 0.05 (cosine)" |
| echo " Curriculum: Easy -> Mixed -> Hard" |
| echo "" |
| echo "Bugs Fixed (vs original V5.1):" |
| echo " - WURCS patterns for Sialic acid (a2122h, a2212h)" |
| echo " - All 8 biological rules working" |
| echo " - Model-based negatives included" |
| echo " - 0% overlap with positives verified" |
| echo "===========================================================" |
|
|
| source ~/.bashrc |
| conda activate glycanml |
|
|
| BASE="/work/ratul1/supantha/glycan-SD-VS/bert_training_v3/v3.1_cluster_training" |
| cd $BASE/bert_v5.1_contrastive |
|
|
| |
| python training/contrastive_trainer_v3_FIXED.py \ |
| --model_path "$BASE/checkpoints_v5_bpe_topo/best_v5_bpe_topo_model.pt" \ |
| --positives_path "$BASE/bert_v5.1_contrastive/data/fully_resolved_161k.pkl" \ |
| --negatives_path "$BASE/bert_v5.1_contrastive/data/hard_negatives_150k_ALL_FINAL.pkl" \ |
| --output_dir "$BASE/bert_v5.1_contrastive/checkpoints_V51_FIXED_FINAL" \ |
| --epochs 50 \ |
| --batch_size 16 \ |
| --lr 2e-5 \ |
| --mlm_weight 0.8 \ |
| --contrastive_weight 0.2 \ |
| --n_neg 5 \ |
| --save_interval 5 |
|
|
| echo "" |
| echo "===========================================================" |
| echo "V5.1-FIXED FINAL: Training Complete" |
| echo "Finished: $(date)" |
| echo "===========================================================" |
|
|