Conversation
Performance Review Report: llama.cpp Version ComparisonExecutive SummaryAnalysis of 12 functions across 5 commits (44bc40f → 1fa084e) reveals no performance impact on inference operations. All analyzed functions are C++ Standard Template Library (STL) utilities showing changes from build configuration differences, not algorithmic modifications. Cumulative overhead: <5 milliseconds per application lifecycle (<0.05% of inference time). Impact Classification: MinorRoot Causes:
Performance-Critical Areas (Unaffected):
Key FindingsLargest Changes:
Commit Context: Code Changes: Power Consumption: Most-Impacted Functions: AssessmentAcceptable for development build. Target version exhibits debug build characteristics (assertions, reduced optimization) appropriate for active development indicated by commit messages. Release builds with Recommendation: No action required. Focus optimization efforts on actual inference kernels (matrix operations, attention, quantization) which dominate performance by 6+ orders of magnitude. See the complete breakdown in Version Insights |
7d57416 to
5fea2ef
Compare
af96516 to
36c499e
Compare
Mirrored from ggml-org/llama.cpp#19182
I was working on ggml-org/llama.cpp#19167 but realized that the normal (non-ngram) model is not even supported yet.
Thinking it will be simple, I gave it a try, but ended up stuck at implementing their notion of "zero-computing experts" (ref: link to paper)
The main problem is that
ggml_mul_mat_idisn't made for this purpose and I have no idea how to adapt it, or which ops may need to be added to make it work.To illustrate what's the problem, I will take an example of how a normal MoE FFN work:
ggml_mul_mat_idThis means we spend the the same amount of computation for each token, proportionally to
n_expert_usedHowever, with longcat-flash:
n_zero_expertswill go through FFN; for the rest, they skip the FFN altogetherApart from the weird MoE, the model has double block architecture, meaning there are 2 attentions and 2 FFNs per layer. Upon converting to GGUF, we convert it to a model of
2 * n_layer, which make the implementation much easier.