def METHOD_NAME(self, device, max_duration, use_fsdp, generate_cb: Optional[Generate] = None) -> Trainer:
    return Trainer(model=configure_tiny_gpt2_hf_model(),
                   train_dataloader=dummy_gpt_lm_dataloader(),
                   device=device,
                   max_duration=max_duration,
                   callbacks=generate_cb,
                   fsdp_config={'sharding_strategy': 'FULL_SHARD'} if use_fsdp else None)