AI-Hypercomputer / AI-Hypercomputer/maxtext

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

Ouverte
#4,347 1 commentaire 0 réactions 1 personne assignée Réclamée par @parambole Voir sur GitHub
Langage dominant
Python
Étoiles
2.4k
Forks
608
Merge moyen
2 j 19 h
PR mergées (30 j)
158

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
machine-learning, performance
Type d'issue
Refactorisation
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.