Support models with merged up/gate experts#1408
Merged
Conversation
Haha, mainline has elected to arrange the merged tensors the other way around compared to what I had done in the on-the-fly merge.
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.
OK, my first reaction was not to support mainline nonsense, but it will be a losing battle, so here it is the support for models now popping up on HF with merged
ffn_up_expsandffn_gate_exps.Obviously mainline developers had to do it the other way around compared to what pre-existed in
ik_llama.cpp: they did put theffn_gate_expsdata first, while inik_llama.cpptheffn_up_expsdata was first. Hence, I had to also change howik_llama.cppmerges on-the-fly with the-mugecommand line option, so the PR became bigger than it should have been.I think it works, but is getting late here, so I'll check more tomorrow. In the meantime, you can try as well.
Important
These pre-merged models will not work with split mode graph, so don't download them if you have 2 or more GPUs. I may or may not decide to add split mode graph support for merged up/gate experts.