Repository navigation
Conversation
Serialize configs without the empty state-dict cleanup path and replace completed shard files atomically. Keep live config fields authoritative and preserve source-only extensions. Retain the previous shard on write failures.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Qubitium
reviewed
Nov 9, 2026
Qubitium
left a comment
Collaborator
There was a problem hiding this comment.
Review (layer 16)
Reviewed the incremental layer-16 commit (d27c77f53, 4 files, +421). The fail-closed score-function binding, live top-k verification, and tied-boundary handling are correct; the live selection is used as the authoritative prefix and only the remaining experts are ranked. No implementation bugs found, so I did not push code changes.
Verification
tests/test_exl3_router_candidates.py: 6 passed. ruff check clean.
Notes (not changed)
selected_indicesis validated for dtype/shape but not range; an out-of-range live index would surface asIndexErrorfromgatherrather than the module'sRuntimeError. Amin()/max()check would keep the failure contract consistent._apply_group_policyassumes GLM's top-2-per-group score; that is correct for the bound router but is not parameterized by the policy contract.has_learned_router_recoveryrequires a correction bias for grouped routers; a grouped router without one would be reported as unsupported even if it binds a score function.
Qubitium
marked this pull request as ready for review
November 9, 2026 09:02
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.
Summary
Preserve native live top-k choices at tied boundaries while exposing ranked softmax and grouped-sigmoid candidates for bounded recovery. Model bindings are introduced with the model integrations.
This is layer 16/36, extracted from an already-used fork for initial maintainer feedback. It depends on #3595. Review only this feature; the cross-fork Files changed view is cumulative because the PR targets upstream
main.Incremental change: 4 files, +421/−0 lines, including carried tests and the mechanism reference. No merge is automatic. Review value and API shape first; substantial rework can follow that feedback.
Flow and existing-code boundary
flowchart TD S0["learned_router_ranked_choices"] S1["bind_softmax_router_recovery"] S2["bind_sigmoid_grouped_router_recovery"] E["RuntimeError, ValueError"] S0 -->|"raises on rejected input/state"| E S1 -->|"raises on rejected input/state"| E S2 -->|"raises on rejected input/state"| E style E fill:#fee,stroke:#b22gptqmodel/utils/exl3_router_candidates.py:79:learned_router_ranked_choicesgptqmodel/utils/exl3_router_candidates.py:225:bind_softmax_router_recoverygptqmodel/utils/exl3_router_candidates.py:238:bind_sigmoid_grouped_router_recoveryCommitted reference: docs/exl3-router-recovery.md, linked from README. Class entry points/calls and rejected-state paths describe code present in this branch, rather than planned integrations.
Validation
Carried test files:
tests/test_exl3_router_candidates.pyThis packaging pass checked Python parsing, whitespace, dependency order and balanced Mermaid blocks. The author reports successful prior use of these features. Per the requested resource limit and feedback-first scope, existing model quantization, GPU/ROCm tests, heavyweight CPU workloads and full model benchmarks were not rerun; no new performance or model-accuracy claim is made. Tests accompanying earlier stack layers retain their previously reported results.