• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA Merlin ?? ????? ??? ????? ??? ?? ??? ??

    Reading Time: 5 minutes

    ???? ? ?? ??? ???? ??? ??? ???. ?? ???? ???? ?? ??? ?? ?? ?? ????? ????(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 ???? ????.

    ?? 1.   ??? ?? ??? ????? ?? ???? ‘????? ??’ ?? ??

    ??? ???? ‘????’(?: ??? ??? 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 7742MLP ??? ??? ?? CPU17.7k1x
    1?? A100-80GB, 2?? AMD EPYC 7742    ?? ???? CPU, ???? GPU768k43?
    DGX A100(8xA100-80GB)    NVIDIA Merlin ?? ???? ?? ????? ??, ?? ??? GPU12.1M683x
    ? 1. ??? ??? ?? ??? ? ?? ?? ????

    NVIDIA? DGX-A100? ?? ??? ???? CPU ?? ????? ?? 683? ? ?? ??? ????? ?? ??????! ?? ?? GPU ????? ??? ?? ???? ?? ? ? ????. ?? GPU ???? ?? ???? ???? CPU-GPU ?????? ?? ??? ??? ????? ???? ?????.

    ?? ?? ????

    ???? ???? ?? ???? ?? ??? ??? ?? DLRM ??? ??????(? 2). ?? ?? ???? ???? ????? ?? ??? ??? NVIDIA-Merlin/?? ??? GitHub ?????? ?????.

    ??? ??? ??? ?? ??? ??(GiB)
    ???554.2
    ??10726.3
    ??311206.2
    ??612773.8
    ???1,0223,109.5
    ? 2. ?? ?? ??

    ? ?? ??? ?? ??? DGX-A100-80GB ??, ??? ?? ?? 65,536? ? Adagrad ??? ??? ???? ?????????. ? 3?? ? ? ?? ?? NVIDIA Merlin ?? ???? ?? ?? GPU?? ????? ??? ??? ?? ????? ? ??? ????.

    ? 3. ??? ???? ??? ?? ??? ?? ???? ?? ??(ms)

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

    ? 4. NVIDIA Merlin ?? ??? ?? ??? ???? ?? ???? TensorFlow ??? ?? ??? ?? ‘???’ ??(4.2GiB) ???? ?? ??(ms) ??

    ? ???? ??? ?? ??? 65,536?? Adagrad ??? ??? ??????.

    ??

    ? ?????? ? ?? ????? NVIDIA GPU?? ??? ?? ? ?? ??? ?? ???? ???? ?? ?? ????? ???? NVIDIA Merlin ?? ??? ?????? ??????. ????? ?? ???? ?? ??? ????? Criteo ????? DLRM ??? ?????? ??? ??? ???.

    ? ???? ??? SDK? ???? ?? ???, ?? ???, ?? ??, ??, ?? ??, ???? NVIDIA ??? ???? ??? ??? ??? ??? ? ????. ?? ??? ???? NVIDIA? ?? ????? ???? ? ??? ??? ??? ?????? ???? ??? ??? ???.

    Discuss (0)
    +1

    Tags

    ?? ???

    人人超碰97caoporen国产