NVIDIA / NVIDIA/TransformerEngine

MoE training optimization

Open
#2,438 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

MoE
Dominant language
Python
Stars
3.5k
Forks
831
Avg merge
3d 11h
Merged PRs (30d)
65

Description

This is a tracking issue for the multiple efforts needed for the performance optimization of MoE training, with the focus on D2H Sync-Free MoE. All the problem sizes should be supplied from device buffers.

TE/common:

TE/pyTorch:

  • Expose the grouped tensor type internally in PyTorch modules https://github.com/NVIDIA/TransformerEngine/pull/2600
  • Expose the grouped tensor type externally [@timmoon10 is doubtful of feasibility]
    • Expose the grouped tensor type as pyTorch tensor
    • Enable grouped tensor input to GroupedLinear
  • Enable single grouped tensor weight option in GroupedLinear
  • Utilize preswizzled inputs in the gemm
  • Changes to te.Sequential to enable grouped tensors
  • End to end MoE support in TransformerLayer

TE/JAX:

  • Triton binding #2437
  • Router / TopK custom call #2711
  • Permutation custom call #2473
  • Custom partitioning for grouped_quantize and grouped_gemm
  • Code refactor:
    • GroupedScaledTensor/GroupedGEMM with first_dims and last_dims instead of group_sizes
    • Remove D2H in GroupedQuantizeFFI/GroupedGemmFFI
  • Utilize preswizzled inputs in the gemm
  • E2E
    • GroupedMLP
    • MaxText integration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This is a broad tracking issue spanning TE/common, TE/pyTorch, and TE/JAX, with many subtasks and linked pull requests. Start by choosing one specific item, then read its referenced issue or pull request and the relevant GroupedTensor, GroupedLinear, TransformerLayer, or GroupedMLP entry point. Done depends on the selected subtask and should include its corresponding integration or performance validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, machine-learning, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.