Skip to content

Regarding the Reference Attention Issue #165

@ShowLo

Description

@ShowLo

Why comment out the self.bank.clear() inside the if MODE == "read": block in mutual_self_attention.py, and then perform the clear operation within the if accelerator.sync_gradients: block in train_stage_1.py?

Won’t this lead to the bank accumulating multiple states in the interim? For instance, when the gradient accumulation steps are set to 3:
During the second forward pass, the bank would use the first hidden state.
During the third forward pass, the bank would use the first two hidden states.

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