Skip to content

Wrong Code in the FSDP blog #1380

Open
Open
@Luosuu

Description

@Luosuu

📚 Documentation

In the blog introducing FSDP API

fsdp_model = FullyShardedDataParallel(
   model(),
   fsdp_auto_wrap_policy=default_auto_wrap_policy,
   cpu_offload=CPUOffload(offload_params=True),
)

it should be model instead of model() inside FullyShardedDataParallel

so it should be

fsdp_model = FullyShardedDataParallel(
   model,
   fsdp_auto_wrap_policy=default_auto_wrap_policy,
   cpu_offload=CPUOffload(offload_params=True),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions