# pytorch_lightning==2.0.1
seed_everything: true
trainer:
  accelerator: gpu
  strategy: ddp_find_unused_parameters_false
  devices: '2'
  num_nodes: 1
  precision: 32-true
  logger:
    class_path: pytorch_lightning.loggers.TensorBoardLogger
    init_args:
      save_dir: logs
      name: sam
      version: null
      log_graph: false
      default_hp_metric: true
      prefix: ''
      sub_dir: null
  callbacks:
  - class_path: pytorch_lightning.callbacks.LearningRateMonitor
    init_args:
      logging_interval: step
      log_momentum: false
  - class_path: pytorch_lightning.callbacks.ModelCheckpoint
    init_args:
      dirpath: null
      filename: '{epoch:03d}-{val_loss:.3f}'
      monitor: val_loss
      verbose: false
      save_last: null
      save_top_k: 1
      save_weights_only: true
      mode: min
      auto_insert_metric_name: true
      every_n_train_steps: null
      train_time_interval: null
      every_n_epochs: null
      save_on_train_epoch_end: null
  - class_path: pytorch_lightning.callbacks.ModelCheckpoint
    init_args:
      dirpath: null
      filename: '{epoch:03d}-{step:05d}'
      monitor: step
      verbose: false
      save_last: null
      save_top_k: -1
      save_weights_only: true
      mode: max
      auto_insert_metric_name: true
      every_n_train_steps: 1000
      train_time_interval: null
      every_n_epochs: null
      save_on_train_epoch_end: null
  fast_dev_run: false
  max_epochs: null
  min_epochs: null
  max_steps: 50000
  min_steps: null
  max_time: null
  limit_train_batches: null
  limit_val_batches: null
  limit_test_batches: null
  limit_predict_batches: null
  overfit_batches: 0.0
  val_check_interval: 0.5
  check_val_every_n_epoch: 1
  num_sanity_val_steps: null
  log_every_n_steps: 20
  enable_checkpointing: null
  enable_progress_bar: null
  enable_model_summary: null
  accumulate_grad_batches: 2
  gradient_clip_val: 0.5
  gradient_clip_algorithm: null
  deterministic: null
  benchmark: null
  inference_mode: true
  use_distributed_sampler: true
  profiler: null
  detect_anomaly: false
  barebones: false
  plugins: null
  sync_batchnorm: false
  reload_dataloaders_every_n_epochs: 0
  default_root_dir: logs
model:
  max_latents: 2048
  num_channels: 768
  num_heads: 8
  max_heads_parallel: null
  num_self_attention_layers: 18
  self_attention_widening_factor: 4
  cross_attention_widening_factor: 4
  cross_attention_dropout: 0.1
  post_attention_dropout: 0.1
  residual_dropout: 0.1
  output_norm: true
  output_bias: false
  abs_pos_emb: false
  init_scale: 0.02
  activation_checkpointing: true
  activation_offloading: false
  validation_sample_prompt: null
  validation_sample_record: null
  params: null
lr_scheduler:
  warmup_steps: 200
  num_cycles: 0.5
  min_fraction: 0.0
  last_epoch: -1
ckpt_path: null
data:
  class_path: perceiver.data.audio.GiantMidiPianoDataModule
  init_args:
    dataset_uri: https://perceiver-io-giant-midi.s3.amazonaws.com/giantmidi-piano.zip
    dataset_dir: .cache/giantmidi-piano
    max_seq_len: 6144
    min_seq_len: 2048
    padding_side: left
    batch_size: 8
    num_workers: 1
    preproc_workers: 24
    pin_memory: true
optimizer:
  class_path: torch.optim.AdamW
  init_args:
    lr: 0.0002
    betas:
    - 0.9
    - 0.999
    eps: 1.0e-08
    weight_decay: 0.01
    amsgrad: false
    maximize: false
    foreach: null
    capturable: false
    differentiable: false
    fused: null
