Skip to content

UPSTREAM PR #21573: autoparser: fix MiniMax handling#1339

Open
loci-dev wants to merge 1 commit intomainfrom
loci/pr-21573-template-minimax-fix
Open

UPSTREAM PR #21573: autoparser: fix MiniMax handling#1339
loci-dev wants to merge 1 commit intomainfrom
loci/pr-21573-template-minimax-fix

Conversation

@loci-dev
Copy link
Copy Markdown

@loci-dev loci-dev commented Apr 8, 2026

Note

Source pull request: ggml-org/llama.cpp#21573

Overview

There was a problem handling the generation prompt from MiniMax because it shares a trailing newline with the non-generation-prompt line.

Additional information

Added extra tests for Minimax.

Requirements

@loci-review
Copy link
Copy Markdown

loci-review Bot commented Apr 8, 2026

Overview

Analysis of commit f0b2b56 ("parser: fix MiniMax handling") shows negligible performance impact. Out of 125,224 functions analyzed, 84 were modified (0.067%), with no new or removed functions. All changes are compiler optimization artifacts, not source code modifications—the commit only changed MiniMax template parsing in 2 files.

Power Consumption: Virtually unchanged across all binaries (max change: -0.039%)

Binary Power Change
libllama.so -0.0002%
libggml.so 0.0%
libggml-base.so 0.0%
libggml-cpu.so 0.0%
libmtmd.so -0.0001%
llama-tts -0.039%
llama-cvector-generator +0.0004%
llama-bench 0.0%
llama-quantize 0.0%
llama-tokenize 0.0%
llama-gguf-split 0.0%
llama-qwen2vl-cli 0.0%
llama-gemma3-cli 0.0%
llama-llava-cli 0.0%
llama-minicpmv-cli 0.0%

Function Analysis

All modified functions are STL templates, JSON utilities, HTTP handlers, and template engine code—none affect inference hot paths (matrix operations, attention, KV cache). Changes show balanced improvements and regressions:

Improvements (75% of functions):

  • STL iterators: 45-74% faster (entry block consolidation, eliminated branches)
  • HTTP utilities: 20-27% faster (removed trampoline blocks)
  • Template operations: 25-36% faster (optimized entry sequences)

Regressions (25% of functions):

  • std::swap, std::function::operator=: 75-110% slower (indirect jumps for PIC/ASLR)
  • JSON operations: 14-82% slower (extra entry indirection)

All absolute changes under 200ns. No performance-critical functions affected.

💬 Questions? Tag @loci-dev

@loci-dev loci-dev force-pushed the main branch 7 times, most recently from e800934 to a024d9c Compare April 15, 2026 02:19
@loci-dev loci-dev force-pushed the main branch 6 times, most recently from 7638ab4 to f1b46d5 Compare April 20, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants