Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does HvdAllToAllEmbedding shard embeddings across ranks? Or is it copied on all ranks? #435

Open
alykhantejani opened this issue Jun 21, 2024 · 1 comment

Comments

@alykhantejani
Copy link

hi,

I'm using

  self.kv_creator = de.CuckooHashTableCreator(
            saver=de.FileSystemSaver(proc_size=1, proc_rank=hvd.local_rank())
        )

        self.emb = de.keras.layers.HvdAllToAllEmbedding(..., devices=['CPU'])

And I notice in your keras callback for horovod you remove the TrainableWrapper and DEResourceVariables from the horovod broadcats.

This leads me to believe that dense parts of the models are broadcasted and then synchronously updated, but the embeddings are just updated on each device? This would mean the embedding ids are sharded (via the CuckooHashTableCreator) to a specific rank

The reason Im curious is because each of my worker ranks are using the same ammount of host memory which makes me think they are all sharing the same embeddings?

@alykhantejani
Copy link
Author

Hi, just following up on this?

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

No branches or pull requests

1 participant