???? ? ?? ??? ???? ??? ??? ???. ?? ???? ???? ?? ??? ?? ?? ?? ????? ????(MLP)?? ??? ? ?? ?? ?? ???? ? ?????.
???? ? ?? ??? ???? ???? ????? ???? ????? ????? ???? ?? ?????. ???? ??? ?? GPU? ???? ??? ??? ? ????.
???, ?? ???? ???? ???? ??? ???? ?? ??? GPU ???? ??? ???? ?? ?? ?? ? ??? ?? ?? ???? ???? ??? ??? ? ? ????.
TensorFlow 2? ??(?: ???)? ???? ??? ???? ?????? ?? ?????? NVIDIA Merlin ?? ???? ???? ? ? ?? ????? ?? ??? ? ????.
??
GPU??? ??? ?? ?? ????? ?? ?? ??? ? GPU ????? ?????. ??? ??? ???? ?? ?? GPU ?? ???? ? ????? ?? ??? ???? ????? ?????.
??? ? ? ??? ?? ??? ? ?? ??? ???? ??? ? ????. ??? ?? ??? ?????? ?? ???? ????? ?? ?? ??(?: horovod.tensorflow.allreduce)? ???? ?? ????? ?????.
?? ?? ?? ????? ???? ?? ????? ??? ??? ?? ?????. ?? ?? ??? ???? ???? ? ??? ?????. ?????? ???? ???? ?? ????? ???? ? ??? ? ? ? ?? ?????(?: horovod.tensorflow.alltoall)? ???? ???.
Tomasz? ??? ?? ???? TensorFlow 2?? ????? 100B ??? DGX A100? ?? ??? ?????? ?? NVIDIA GPU? ?? 1,130? ?? ???? DLRM ??? ?? ???? ????? ?? CPU ?? ???? ?? 672? ?? ??? ???? ? ??? ??? ???? ?? ??????. ??? ??? ??? ?? ?? ????? ???? ? ??? ???? ??? ??? ? ????! ?? ?? ???? ??? ???? ???? ??? ???? ?? ?? ?? ??? MLP ?? ??? ?????? ?????.
? ????? ?? ??? ???? CPU ???? ???? ?? ??? ? ??? ????? ??? ??? GPU ???? ???? ???? ??? ? ??? ???. ?? ?? GPU ????? ??? ??? ???? MLP ??? ??????. ??? NVIDIA A100-80GB GPU?? 2TB/s ??? ???? ?? 80GB HBM2 ???? ????.

??? ???? ‘????’(?: ??? ??? 0 ? N), ‘??’(?: ??? ??? 2) ?? ‘??’? ??? ? ????. MLP ???? ?? GPU?? ?????. ?? ??? MLP ??? ?? ??? ? ??? ?? ??? ???? ????.
??? ??? ??? ????? ?? ???? ?? ??? ???? ?? ?? ???, ?? ??? ???? ????? ???? ????? ?? ?? ?? ???? ??? ??????? ???.
?? ??? ???? ? ??? NVIDIA Merlin ?? ??? ?????? ? ? ?? Python ????? TensorFlow 2?? ?? ???? ????? ?? ???? ?? ??? ?????. ??? ???? ?? GPU? ???? ???? ?? ??? ?? ?? ??? ??? TensorFlow? ??? ??? ??? ???? ???? ??? ??? ?????. ????? ???? ???? ??? ??? ????.
??? ?? ??
NVIDIA Merlin ?? ???? distributed_embeddings.dist_model_parallel ??? ?????. ??? ?? ?? ?? GPU ??? ??? ???? ????? ???? all2all? ?? ??????? ?? ??? ??? ??? ? ????. ?? ?? ????? ? API? ??? ?????.
import dist_model_parallel as dmp
class MyEmbeddingModel(tf.keras.Model):
def __init__(self, table_sizes):
...
self.embedding_layers = [tf.keras.layers.Embedding(input_dim, output_dim) for input_dim, output_dim in table_sizes]
# 1. Add this line to wrap list of embedding layers used in the model
self.embedding_layers = dmp.DistributedEmbedding(self.embedding_layers)
def call(self, inputs):
# embedding_outputs = [e(i) for e, i in zip(self.embedding_layers, inputs)]
embedding_outputs = self.embedding_layers(inputs)
...
Horovod? ???? ??? ?? ???? ??? ??? ????? Horovod? ?? ???????? ? ?????? ??? ?? ????? ???? ?????. ?? ?? Horovod ???? ?? ??? ??? ???????.
@tf.function
def training_step(inputs, labels, first_batch):
with tf.GradientTape() as tape:
probs = model(inputs)
loss_value = loss(labels, probs)
# 2. Change Horovod Gradient Tape to dmp tape
# tape = hvd.DistributedGradientTape(tape)
tape = dmp.DistributedGradientTape(tape)
grads = tape.gradient(loss_value, model.trainable_variables)
opt.apply_gradients(zip(grads, model.trainable_variables))
if first_batch:
# 3. Change Horovod broadcast_variables to dmp's
# hvd.broadcast_variables(model.variables, root_rank=0)
dmp.broadcast_variables(model.variables, root_rank=0)
return loss_value
??? ??? ?? ??? ?? ?? ?? ????? ?? ???? ??? ?????!
?? Criteo 1TB ?? ?? ???? ?? DLRM ??? ?????? ?? ??? ?? ??? ?? 22.8TiB?? ???? ?? ???? ?????.
??
NVIDIA Merlin ?? ???? ???? ??? ???? ?? Criteo 1TB ??????? ??? DLRM ??? ?? 3TiB ??? ??? ??? ??? ?? ??? ?? ????? ?????.
Criteo ?????? ?? DLRM ????
????? ??? NVIDIA? ?? ??? API? ???? ??? ????? ??? ??? ??? ????? ?? ? ? ????. TensorFlow 2? ???? NVIDIA DeepLearningExamples DLRM ??? ?? NVIDIA Merlin ?? ???? ????? ?? ????? ????? ?????????. ??? ??? ?? ???? TensorFlow 2?? 1000? ? ??? ????? ?? DGX A100? ?? ??? ??????? ?????.
README? ???? ??? ?? ??? ?? ? ?? ????? ?????.
1130? ?? ????(421 GiB ?? ??)? ?? DLRM ??? ??? ?? ? ?? ???? ??? ?? Criteo Terabyte Click Logs ??????? ?????????.
- CPU?? ??? ??????.
- CPU ???? ???? ?? ? ??? ???? ???? ?? GPU ??????.
- 8?? GPU? ??? NVIDIA DGX A100-80GB? ???? ????? ?? ??????. ?? NVIDIA Merlin ?? ????? ???? ?? ?? ?? ? ??? API? ?????.
???? | ?? | ???? ???(??/?) | CPU? ?? ?? ?? |
2?? AMD EPYC 7742 | MLP ??? ??? ?? CPU | 17.7k | 1x |
1?? A100-80GB, 2?? AMD EPYC 7742 | ?? ???? CPU, ???? GPU | 768k | 43? |
DGX A100(8xA100-80GB) | NVIDIA Merlin ?? ???? ?? ????? ??, ?? ??? GPU | 12.1M | 683x |
NVIDIA? DGX-A100? ?? ??? ???? CPU ?? ????? ?? 683? ? ?? ??? ????? ?? ??????! ?? ?? GPU ????? ??? ?? ???? ?? ? ? ????. ?? GPU ???? ?? ???? ???? CPU-GPU ?????? ?? ??? ??? ????? ???? ?????.
?? ?? ????
???? ???? ?? ???? ?? ??? ??? ?? DLRM ??? ??????(? 2). ?? ?? ???? ???? ????? ?? ??? ??? NVIDIA-Merlin/?? ??? GitHub ?????? ?????.
?? | ? ??? ??? ? | ? ??? ??(GiB) |
??? | 55 | 4.2 |
?? | 107 | 26.3 |
?? | 311 | 206.2 |
?? | 612 | 773.8 |
??? | 1,022 | 3,109.5 |
? ?? ??? ?? ??? DGX-A100-80GB ??, ??? ?? ?? 65,536? ? Adagrad ??? ??? ???? ?????????. ? 3?? ? ? ?? ?? NVIDIA Merlin ?? ???? ?? ?? GPU?? ????? ??? ??? ?? ????? ? ??? ????.

??, ?? GPU? ?? ? ?? ??? ???? ?? ???? ?? ???? ??? ??? ???? ?? ?? GPU? ??? ??? ?????. ?? ? 4?? ??? ??? DGX A100-80GB?? ???? ??? ?? ? ? ????.

? ???? ??? ?? ??? 65,536?? Adagrad ??? ??? ??????.
??
? ?????? ? ?? ????? NVIDIA GPU?? ??? ?? ? ?? ??? ?? ???? ???? ?? ?? ????? ???? NVIDIA Merlin ?? ??? ?????? ??????. ????? ?? ???? ?? ??? ????? Criteo ????? DLRM ??? ?????? ??? ??? ???.
? ???? ??? SDK? ???? ?? ???, ?? ???, ?? ??, ??, ?? ??, ???? NVIDIA ??? ???? ??? ??? ??? ??? ? ????. ?? ??? ???? NVIDIA? ?? ????? ???? ? ??? ??? ??? ?????? ???? ??? ??? ???.