Repository navigation
Conversation
…apse's RMSNorm, under the kernel contract tf_ernie55_mhc_pre, in a new ernie5_5_mhc image, runs a row of ERNIE 5.5's 4 residual streams through vLLM-ERNIE's mHC pre step: the 24 mixes against fn's float32 rows (a thread's 64 terms in one fma chain, the warp's butterfly, the 8 warps' partials in order) times ERNIE's mix RMS, 1 / (sqrt(mean) + eps); pre, post (2 sigmoid) and comb (each row's softmax plus hc_eps, then hc_sinkhorn_iters rounds of column and row sums); then the collapse sum_s pre_s x_s, its RMSNorm from the unrounded sums' squares, and the norm's weight times the bf16 collapse, rounded to bf16 once. GLM's finish in common/mhc.cuh takes the mix RMS from its caller, but it also reads fn in bf16, squares the rounded collapse and rounds the normed value before the weight, so ERNIE's rounding points need their own body. The vendor's mixes are a TF32 GEMM; these are fp32 products of bf16 x and fp32 fn. Each output is checked alone against float64 (ernie5_5/mhc.zig), as GLM's float32-weight finish is, with two controls: the plain mix RMS, 1 / sqrt(mean + eps), on rows below 1e-6, and comb's softmax over a column.
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI for a landing train: #5301 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.