Skip to content

Using FAISS along deepspeed for online negative mining #821

@igrekun

Description

@igrekun

I want to update my dataset periodically (lets say every 10k steps) with new sampling strategy.

Ideally I would utilize all GPUs to calculate all image embeddings, free GPU memory and let FAISS quickly calculate neighbours for each sample. The neighbour indices get saved to the file and dataloader now constructs batches using updated neighbours.

How would I do that with DeepSpeed? Is it possible to:

  1. pause training and use the model to quickly calculate embeddings and update dataloader
  2. let faiss use all gpus to get nearest neighbours and resume training (deallocate memory eaten by DeepSpeed but not currently used to be more exact)

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