[MiniMax-H3] RoPE re-assembles the rotated and pass-through channels with torch.cat, which is slow on ROCm
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
- #15393 de @Shan2L — fechado sem integrar
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 15/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Domínio
- ai, performance
Direção de pesquisa
The RoPE helper in the MiniMax-H3 transformer code is the entry point: it slices the first rotary_dim channels, rotates them, and rebuilds the tensor with torch.cat. Work is already under way in linked pull request #15393, which has the change implemented, so this is not open for a new contributor. Done would mean the same output with the concat replaced by an in-place write into a copy of the input, verified by the existing MiniMax-H3 tests.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Is your feature request related to a problem? Please describe.
The MiniMax-H3 and MiniMax-H3-Image transformers apply RoPE to the first rotary_dim channels of each head and pass the rest through. The helper slices, rotates, and re-assembles the result with torch.cat of last-dimension slices. On ROCm that torch.cat takes a slow generic copy path (pytorch/pytorch#206557), so the RoPE apply costs about twice what it needs to.
Describe the solution you'd like.
Write the rotated part into a copy of the input instead of concatenating. The arithmetic is unchanged and the output is bitwise identical. On one Radeon AI PRO R9600D (gfx1201): RoPE apply 2.15x faster on the MiniMax-H3-Image shape, a 2048x2048 request 31.43 -> 31.00 s.
Describe alternatives you've considered.
Fixing torch.cat itself (pytorch/pytorch#206555) helps every caller but only lands with a future PyTorch release; the model-side change needs no new PyTorch.
Additional context.
Implemented in #15393.
- Linguagem predominante
- Python
- Estrelas
- 35k
- Forks
- 7.5k
- Merge médio
- 2d 22h
- PRs com merge (30d)
- 58
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de huggingface/diffusers
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
huggingface/diffusers#15436 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
huggingface/diffusers#15433 ·
Mantenedores costumam responder em até 1 dia
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Talvez já em andamento @hparik11 assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
huggingface/diffusers#15423 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Docs: 13 docstrings document parameters their functions don't haveTalvez já em andamento @M-Colley assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
huggingface/diffusers#15363 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorTalvez já em andamento @chessing234 assumiu há 11 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
huggingface/diffusers#15337 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de huggingface/diffusers
Issues semelhantes
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 79/100
developmentseed/titiler-covjson#164 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
awslabs/visual-asset-management-system#2164 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
MakazhanAlpamys/Soup#3589 ·
Mantenedores costumam responder em até 1 dia
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia