Skip to content

common,server : fix custom preset dedup against cached models#25235

Open
angt wants to merge 1 commit into
ggml-org:masterfrom
angt:common-server-fix-custom-preset-dedup-against-cached-models
Open

common,server : fix custom preset dedup against cached models#25235
angt wants to merge 1 commit into
ggml-org:masterfrom
angt:common-server-fix-custom-preset-dedup-against-cached-models

Conversation

@angt

@angt angt commented Jul 2, 2026

Copy link
Copy Markdown
Member

Overview

Revert the canonical_tag() case-folding in preset.cpp that collapsed distinct alias presets (e.g. Q4_K_XL-thinking and Q8_0-thinking into THINKING) and broke downstream tools keying by name.

Instead, add cached_base_name() in server-models.cpp so a custom preset section whose quant tag carries a convenience prefix merges into the cached entry the cache stores without that prefix. Presets whose tag suffix is not a cached quant keep their own name as a separate alias row.

Also track custom_names during the merge so the '*' marker lands on the actual mapping key rather than the unmerged custom name.

Additional information

This is another solution that is #25226.

Requirements

Revert the canonical_tag() case-folding in preset.cpp that collapsed
distinct alias presets (e.g. Q4_K_XL-thinking and Q8_0-thinking into
THINKING) and broke downstream tools keying by name.

Instead, add cached_base_name() in server-models.cpp so a custom preset
section whose quant tag carries a convenience prefix merges into the
cached entry the cache stores without that prefix. Presets whose tag
suffix is not a cached quant keep their own name as a separate alias row.

Also track custom_names during the merge so the '*' marker lands on the
actual mapping key rather than the unmerged custom name.
@angt angt requested review from a team as code owners July 2, 2026 10:21
@github-actions github-actions Bot added the server label Jul 2, 2026
@angt angt linked an issue Jul 2, 2026 that may be closed by this pull request
@angt angt requested review from ggerganov and ngxson July 3, 2026 08:33
@ngxson

ngxson commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

IMO it might be less error-prone if the dedup logic firstly resolves the model to exact local path. I'll will try this direction and push a fix if it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: preset names changed and some presets ignored

2 participants