You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cuda : rms_norm writes no q8_1 copy for rows that are no multiple of 512 #109
Gemma 4 31B has an embedding length of 5376, which is no multiple of 512 (MATRIX_ROW_PADDING). The rms_norm kernel writes the q8_1 copy of its result only for rows without padding, so on this model the copy is never made and two quantize_q8_1 launches per layer and token remain (inputs of the Q / K / V projections and of gate / up): 120 of the 241 quantize launches per token.
The mat-vec kernel reads ne10 / 32 blocks of each q8_1 row and never the padding, so the norm kernel can write the blocks of a padded row at the padded row stride and leave the padding alone.
Activity