GDN chunkwise P1.2: VTCM state prefill=neutre, prouve compute-bound 3S2/tok -> gain=WY matmul (palier dur). oracle 28/28, pp98

This commit is contained in:
Richard Loyer 2026-05-26 16:30:08 +02:00
parent f638bdbd94
commit dd29169672
1 changed files with 1 additions and 0 deletions

View File

@ -22,3 +22,4 @@ Récurrence/token: S(SxS)*=gate ; sum=S·k ; δ=(v-sum)·β ; S+=k⊗δ ; out=S
Chunkwise C=64: A=tri(K K^T) corrigé β,gate → W=(I-A)^-1 ; intra: out += (Q K^T tri)·V ; inter: out += Q·S, S=gate·S+K^T(βV). 3 GEMM CxS au lieu de 3·S² rank1/tok. f32 d'abord, bit-exact oracle, gain cache. C=64 mappe tuile HMX. Gate: GGML_HEXAGON_GDN_CHUNK=1 opt-in tant que pas validé. Chunkwise C=64: A=tri(K K^T) corrigé β,gate → W=(I-A)^-1 ; intra: out += (Q K^T tri)·V ; inter: out += Q·S, S=gate·S+K^T(βV). 3 GEMM CxS au lieu de 3·S² rank1/tok. f32 d'abord, bit-exact oracle, gain cache. C=64 mappe tuile HMX. Gate: GGML_HEXAGON_GDN_CHUNK=1 opt-in tant que pas validé.
Étapes: (1) refactor pp en boucle de chunks C=64 (1 chunk=ancien path) -> 28/28 inchangé. (2) intra-chunk parallèle f32. (3) bench. risque=δ inter-chunk gate, garder pp_thread comme fallback C=1. Étapes: (1) refactor pp en boucle de chunks C=64 (1 chunk=ancien path) -> 28/28 inchangé. (2) intra-chunk parallèle f32. (3) bench. risque=δ inter-chunk gate, garder pp_thread comme fallback C=1.
P1.1 FAIT: chunk loop C=64 in gated-delta-net-ops.c:626, calcul identique, oracle 28/28 + pp512=98 = neutre. ql=fork local (.git propre). Suite: intra-chunk GEMM. Build pp512 = ~30s ninja htp-v79. P1.1 FAIT: chunk loop C=64 in gated-delta-net-ops.c:626, calcul identique, oracle 28/28 + pp512=98 = neutre. ql=fork local (.git propre). Suite: intra-chunk GEMM. Build pp512 = ~30s ninja htp-v79.
P1.2 FAIT (neutre): state en VTCM aussi au prefill -> 28/28, pp512=98 = AUCUN gain. Preuve: prefill GDN compute-bound (3·S² rank1/token), pas data-bound. Donc gain = REDUIRE flops = WY transform (rank1 -> matmul intra-chunk), pas placement memoire. = palier dur (jours, math delta-rule), gros morceau, fallback C=1 garde. VTCM state laissé (sert HMX P2).