AI-Hypercomputer / AI-Hypercomputer/maxtext

Qwen3-Next: sequential GDN paths (lax.scan recurrence, solve_triangular) bound TPU step time

Aperta
#4,347 1 commento 0 reazioni 1 assegnatario Rivendicata da @parambole Vedi su GitHub
Lingua principale
Python
Stelle
2.4k
Fork
608
Merge medio
2g 19h
PR unite (30g)
158

Descrizione

### Problem

In the Qwen3-Next Gated Delta Net (`jax_chunk_gated_delta_rule`), the two sequential computations dominate TPU step time:

- the inter-chunk recurrence runs as `lax.scan`, so the recurrent state round-trips HBM on every chunk step, and
- the UT-transform inverse `A = (I+S)^-1` uses `solve_triangular`, which substitutes row by row and barely uses the MXU.

Neither overlaps with other work, so they bound the step directly.

### Measurement

v5e-256, Qwen3-Next dense-8B config, seq 4096, bs 1, remat full (details in #4348):

| build | step time | tokens/s/device |
|---|---|---|
| main | 3.373s | 1,214 |
| #4348 (Pallas kernels) | **2.571s** | **1,593 (+31%)** |

Loss trajectories match to bf16 rounding level.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at the Qwen3-Next Gated Delta Net entry point jax_chunk_gated_delta_rule and inspect the lax.scan recurrence and solve_triangular inverse described in the issue. Compare the Pallas-kernel results referenced in #4348, then benchmark the v5e-256, dense-8B, sequence-4096, batch-1 configuration; done means lower step time with loss matching to bf16 rounding.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
machine-learning, performance
Tipo di issue
Refactoring
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.