Skip to content

perf(minimax-h3): batch replay timesteps - #500

Draft
leviking98z-rgb wants to merge 1 commit into
Tencent-Hunyuan:mainfrom
leviking98z-rgb:perf/minimax-h3-batched-replay
Draft

leviking98z-rgb wants to merge 1 commit into
Tencent-Hunyuan:mainfrom
leviking98z-rgb:perf/minimax-h3-batched-replay

Conversation

@leviking98z-rgb

Copy link
Copy Markdown
Collaborator

Summary

  • add an opt-in batch_replay_steps path for MiniMax-H3 that evaluates multiple replay timesteps in one step-major transformer batch
  • preserve H3's separate video/audio sigma schedules and existing element-weighted joint A/V log-prob
  • extend packed timestep metadata and the vendored transformer AdaLN lookup to accept per-batch row timestep indices without concatenating attention documents

Related Issue

Test Plan

Not run; reason: code-only Draft PR requested. GPU forward/backward parity and MiniMax-H3 end-to-end timing remain pending.

Compatibility / Risk

  • batch_replay_steps defaults to false, so existing recipes keep the serial replay path.
  • No checkpoint or data-format changes.
  • The new path increases replay activation memory by stacking selected timesteps on the batch axis; the practical K2/K3 limit still needs GPU measurement.
  • Batched replay uses the repository's existing replay-anchor safety check, so configurations must use old_logp_source: replay when enabling it.

Reviewer Notes

  • This PR is independent of feat(diffusion): batch video replay timesteps #394 because the shared replay helper and replay-anchor guard are already present on main; feat(diffusion): batch video replay timesteps #394 does not cover MiniMax-H3's dual trajectory and per-modality sigma grids.
  • The implementation keeps each timestep as a separate batch item and therefore a separate attention document. Only the row-to-AdaLN timestep mapping becomes batch-aware.
  • AI assistance: implemented with Codex. Duplicate-work check covered open PRs/issues matching MiniMax-H3, replay, and batching; no open PR currently adds H3 replay timestep batching.

Checklist

  • I reviewed the changed code and removed unrelated/generated artifacts.
  • I updated tests, docs, and configs where needed, or explained why not.

@github-actions github-actions Bot added the wip Draft / work in progress label Sep 22, 2026

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

wip Draft / work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant