Parcourir la source

Apply gradient accumulate to save memory

Lengyue il y a 2 ans
Parent
commit
0c084ec779
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 0
      .dockerignore
  2. 2 2
      speech_lm/configs/whisper_vq.yaml

+ 1 - 0
.dockerignore

@@ -1,2 +1,3 @@
 results
 data
+*.filelist

+ 2 - 2
speech_lm/configs/whisper_vq.yaml

@@ -38,7 +38,7 @@ model:
 
 schedule:
   batch_size: 64
-  micro_batch_size: 64
+  micro_batch_size: 32
   max_steps: 10000
   save_interval: 2000
   gradient_accumulation_steps: "${eval: ${schedule.batch_size} // ${schedule.micro_batch_size}}"
@@ -65,7 +65,7 @@ valid_dataloader:
   dataset:
     _target_: speech_lm.datasets.whisper_vq.WhisperVQDataset
     filelist: filelists/whisper-vq.test.filelist
-  batch_size: 32
+  batch_size: 16
   num_workers: 8
   prefetch_factor: 4
   pin_memory: true