Question: Can modality row selection be moved before the output projections?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
Research direction
Start at MiniMaxH3Transformer3DModel.forward and trace how norm_out, proj_out, audio_proj_out, video_indices, and audio_indices interact with context-parallel output gathering. Check whether indices are local or global and whether distributed inference or reference-row predictions depend on the current order; done means establishing the optimization's validity and documenting any constraints.
Written by the indexing model from the issue text.
Description
Question
In MiniMaxH3Transformer3DModel.forward, the output heads are currently applied to the entire packed sequence before selecting the video and audio rows:
hidden_states = self.norm_out(hidden_states, temb, timestep_indices)
video_output = self.proj_out(hidden_states).index_select(1, video_indices)
audio_output = self.audio_proj_out(hidden_states).index_select(1, audio_indices)
Since both output projections operate independently on the last feature dimension, would the following be mathematically equivalent?
hidden_states = self.norm_out(hidden_states, temb, timestep_indices)
video_hidden_states = hidden_states.index_select(1, video_indices)
audio_hidden_states = hidden_states.index_select(1, audio_indices)
video_output = self.proj_out(video_hidden_states)
audio_output = self.audio_proj_out(audio_hidden_states)
In other words:
index_select(Linear(H), I) = Linear(index_select(H, I))
This would avoid applying proj_out and audio_proj_out to rows that are not needed by the corresponding output head.
Is there any reason why the current order is required, such as:
- context-parallel output gathering;
- global versus local sequence indices;
- distributed inference constraints;
- numerical or checkpoint compatibility;
- or the need to preserve predictions for all reference rows?
I would appreciate any clarification about whether selecting the rows before the modality-specific output projections is a valid optimization.
- Dominant language
- Python
- Stars
- 12.4k
- Forks
- 932
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/MiniMax-H3
-
Promo HAY corpOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
MiniMax-AI/MiniMax-H3#104 · 1 comment ·
-
minimax H3Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
MiniMax-AI/MiniMax-H3#103 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 15/100
MiniMax-AI/MiniMax-H3#101 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
MiniMax-AI/MiniMax-H3#100 ·
-
dxdxcOpen
Difficulty 5/5 Over a week Newbie friendliness 3/100
MiniMax-AI/MiniMax-H3#98 ·
All issues in MiniMax-AI/MiniMax-H3
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bad-antics/lateralus-lang#1489 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 1/5 Under an hour Newbie friendliness 69/100
anderspitman/awesome-tunneling#330 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
scikit-hep/coffea#1668 ·