Skip to content

[Feature] Implement Activation Checkpointing for Context Length Extension #1

Description

@Sarkar-AGI

Description

Currently, training with long context lengths increases activation memory significantly, leading to potential CUDA OOM errors. We need to implement activation checkpointing (gradient checkpointing) for our custom attention mechanism.

To-Do

  • Identify bottleneck layers in the forward pass.
  • Implement torch.utils.checkpoint or custom CUDA backward hooks to recalculate activations during backward propagation.
  • Benchmark VRAM saving vs compute overhead trade-off.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions