Repository navigation
Conversation
… + bias, under the kernel contract tf_ernie55_route, in a new ernie5_5_moe image, routes a row as vLLM-ERNIE's ernie5_5_routing does: each of the 512 experts scored from its two routers' fp32 logits as sigmoid(l0) + sigmoid(l1), the top 10 of score + bias by core's row select (tf_topk::select_row: ties to the lower id, the picks in ascending ids, as the vendor's slots but for ties at the k-th value, which it puts last), and each pick's weight its score over the picks' sum, at least 1e-20, times the expert's learned scale. It writes the int32 picks and fp32 weights core's combine takes. moe_glue's sigmoid routes sum the logits before one sigmoid and scale by one factor, so ERNIE's router is a family kernel (#4926). The picks and weights are checked against float64 (ernie5_5/route.zig, whose host test holds it to the vendor's torch routing): the same ranks with only near-ties swapped and exact ties to the lower id, and the weights within 2^-20. Two controls: one sigmoid of the two logits summed, and weights from score + bias.
Owner
Author
|
Stopped at #5368. |
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: #5368 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.