Skip to content

Conversation

@Idhant297
Copy link

@Idhant297 Idhant297 commented Aug 8, 2025

was working with some custom models and datasets. faced some issues while working with collect_dictionary_activations.py which were as follows:

  • noticed that activation that were stored were not being offloaded from the GPU which led to OOM errors
    • fixed: now a checkpoint file is created inside the temp folder where the activations are to be stored.
  • also the dataset was working with didnt had BOS (delimiter) tokens so added a fixed lenght splitting logic too.

…ctivation collection

- refactor get_positive_activations to process sequences incrementally
- add checkpoint system to resume interrupted jobs and prevent OOM errors
- optimize memory usage with immediate CPU and GPU offloading
- when delimiter tokens (BOS) are not found, fallsbacks to fixed length sequences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant