convert : set expert gating func in base class#17279
Merged
Conversation
ngxson
reviewed
Nov 15, 2025
| self.gguf_writer.add_expert_weights_scale(self.hparams["routed_scaling_factor"]) | ||
| self.gguf_writer.add_expert_weights_norm(self.hparams["norm_topk_prob"]) | ||
|
|
||
| if self.hparams["scoring_func"] == "noaux_tc": |
Contributor
There was a problem hiding this comment.
This noaux_tc is probably not handled now
Member
Author
There was a problem hiding this comment.
Yes, that's on purpose, as mentioned in OP, this was incorrectly set in dots1, and fixed shortly after release, but never here.
| self.gguf_writer.add_expert_group_used_count(n_group_used) | ||
| logger.info(f"gguf: expert groups used count = {n_group_used}") | ||
|
|
||
| if (score_func := self.find_hparam(["score_function", "scoring_func", "score_func"], optional=True)) is not None: |
Contributor
There was a problem hiding this comment.
I'm wondering if there is a way to mark this as required (optional=False) for certain model
Member
Author
There was a problem hiding this comment.
Then you'd have to maintain a list, not very practical, besides if your model requires this it will throw at graph build.
ngxson
approved these changes
Nov 15, 2025
Anico2
added a commit
to Anico2/llama.cpp
that referenced
this pull request
Jan 15, 2026
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
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.
Move
add_expert_gating_funccall to base class, no point in duplicating this.Also fixes conversion failure for
dots1since the following fixes to the model: