-
Notifications
You must be signed in to change notification settings - Fork 9
Added TF specific documentation to DistributedEmbedding
.
#94
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
base: main
Are you sure you want to change the base?
Conversation
`DistributedEmbedding` is a layer optimized for TPU chips with SparseCore | ||
and can dramatically improve the speed of embedding lookups and embedding | ||
training, in particular for large embedding tables. It works by combining | ||
multiple lookups in one invocations, and by sharding the embedding tables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple lookups into one invocation,
and can dramatically improve the speed of embedding lookups and embedding | ||
training, in particular for large embedding tables. It works by combining | ||
multiple lookups in one invocations, and by sharding the embedding tables | ||
across the available chips. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharding doesn't necessarily make it faster on its own. That leads to more communication for the collective, which can actually slow the lookup down if the table would otherwise fit on a single chip. We might want to specify that it can make lookups faster for large tables that already need to be model-sharded.
|
||
### Using in a Keras model | ||
|
||
The use Keras' `model.fit()`, one must compile the model under the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use Keras' ...
using the strategy and also automatically distributes the dataset. | ||
|
||
```python | ||
model = create_model(embedding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you create the model under the scope as well, since the layer needs to be?
No description provided.