Dense Qwen retains duplicate attention and FP8 input staging across graph capacities

Aperta
#46 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
python
Ambito
performance

Direzione di ricerca

Read the experimental branch linked in the issue and compare its scratch-bank capacity views with the upstream path at 1fd1f91. The issue does not name source files or tests to begin with; first trace the attention and FP8 input-staging lifetimes across graph capacities and full/recurrent layers. Done means a separately scoped implementation is chosen and validated on current main, with the stated regression and memory checks.

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

Descrizione

area:memory area:preparation model:qwen3.8-27b performance triage:verify-for-closure
Measured problem

The attention change at prefill 4096 is not GPU-qualified.

Dense Qwen constructor allocations retain full-attention and TensorFP8 input intermediates separately across graph capacities and across full/recurrent layers. Sharing the CUDA graph pool alone does not remove those allocations. This leaves less memory for native prefix cache and contributes to 32GB preparation pressure with the official target plus a parallel drafter.

The focused MLP issue (https://github.com/NVIDIA/flare-local-inference/issues/45) handles four MLP buffers independently. This issue records the remaining attention/input-staging work and offers a separate experimental implementation: https://github.com/Maxrio9/flare-local-inference/tree/qwen38-dense-memory-experiments-20261023, the combined MLP/attention follow-up to the DFlash2 proposal branch. It is not an independently rebased current-main fix.

Evidence

On RTX PRO4500 Blackwell/SM120/32GB, official nvidia/Qwen3.8-27B-NVFP4@482ca0f plus calibrated maurienne-ai/Qwen3.8-27B-DFlash2-NVFP4-RTNcal@bd7a934, C4/64K/prefill1024, 2GiB reserve:

  • native fixed mappings approximately22.23→22.07GiB;
  • final cache budget7.02GiB, KV-token ceiling192512→196608, snapshot slots30→31.

These limits share a physical memory budget and are not simultaneous per-request guarantees. Retained allocation totals are not measured live-memory peaks. No throughput improvement is claimed for this storage change.

The implementation binds seven disjoint BF16 attention fields and FP8 input staging through capacity views in the existing prefill/decode Scratch banks. Full and recurrent target layers consume input staging serially. Persistent caches, verification records and draft windows remain independent. Other recipes' context projections or overlapping branches must not inherit these aliases without their own lifetime analysis.

Validation boundary and requested direction

On the original experimental stack: two CPU storage/tail tests;69 state/ring,21 MTP and one compiled-scoring GPU check per memory stage;C4 inactive-hole coverage. Target full-vocabulary logits at18 fixed prefixes/512-row compiled graphs were bit-exact before/after. A64K/prefill1024 exported package passed native long-prefix reuse and capacity checks; a131072-context package passed130800prompt+128generated tokens. These are not current-main rebase results.

The qualified4096 package contains only the earlier MLP change. The optional22-prefix/1024-row comparison needs its corrected reference fixture rerun. Full other-model/shared-path regressions, FP8 draft KV and embedding offload are not claimed.

Would you prefer a separate attention/staging PR after the DFlash2 integration, or an ordinary-dense-only port first? Upstream was checked at1fd1f91; equivalent paths in other recipes need individual lifetime review rather than a general switch.

Authored and scratch-lifetime-reviewed by Codex (GPT-6), AI-assisted. Claude's review is limited to accounting, tests and reporting, not restricted Opus scratch-design work.

Lingua principale
Rust
Stelle
800
Fork
106
Merge medio
1g 3h
PR unite (30g)
100

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/hyperflare-inference

Tutte le issue di NVIDIA/hyperflare-inference

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.