How to create the fsdp_config json file for Trainer?

I think it is working now, after

  1. downgrading to transformers 4.26.1 (which does not use the fsdp_config argument)
  2. removing fsdp_config argument
  3. adding back the fsdp_transformer_layer_cls_to_wrap argument

It is using less memory compared to non-FSDP mode, so I think the model is actually being sharded.