Skip to content

Add tensor parallel plans for LTX and LTX-2 - #15479

Open
JingyaHuang wants to merge 1 commit into
huggingface:mainfrom
JingyaHuang:add-tp-plan-ltx
Open

JingyaHuang wants to merge 1 commit into
huggingface:mainfrom
JingyaHuang:add-tp-plan-ltx

Conversation

@JingyaHuang

Copy link
Copy Markdown
Collaborator
  • Add _tp_plan to LTXVideoTransformer3DModel and LTX2VideoTransformer3DModel, so the Trainium3 blog example needs no custom TP code.
  • Add two TP styles:
    • "rmsnorm_across_heads": QK-norm across heads, all-reducing the sum of squares.
    • ShardOutput: shards the RoPE outputs to each rank's heads.
  • Make LTX processors work with any number of local heads; single-device outputs are unchanged.
  • Check the head count of every sharded attention, including LTX-2's audio heads.
  • Add TP tests (GPU, TPU, Neuron) and docs.
  • Sharded output matches single device on 2 CPU ranks, also under compile_repeated_blocks.
  • Still needs a run on GPUs or Trainium; sequence parallelism waits on Allow tensor parallelism and context parallelism in one ParallelConfig #14725.

- Add `rmsnorm_across_heads` and `ShardOutput` TP styles
- Add `_tp_plan` to LTX and LTX-2 transformers
- Reshape attention by `head_dim` in LTX processors
- Add TP tests and docs

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant