Skip to content

server: Dedup the draft HF model via dedup-cache-models - #27934

Merged
ngxson merged 2 commits into
ggml-org:masterfrom
DreamingWater:fix-router-dedup-draft-hf
Sep 23, 2026
Merged

ngxson merged 2 commits into
ggml-org:masterfrom
DreamingWater:fix-router-dedup-draft-hf

Conversation

@DreamingWater

@DreamingWater DreamingWater commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #27846

Overview

dedup-cache-models only handled the preset main HF model path before, so draft HF cache entries still showed up under /models. We now parse paths for both main and draft HF models via LLAMA_ARG_SPEC_DRAFT_HF_REPO and LLAMA_ARG_SPEC_DRAFT_MODEL, and add them to deduplication. Model loading, hidden_models and speculative decoding stay untouched; only dedup logic and tests are updated.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Codex assisted with code changes and testing; ChatGPT assisted with planning and review. Manual inspection, validation and final submission were completed by the author.

@DreamingWater
DreamingWater requested a review from a team as a code owner August 29, 2026 07:00
@ggml-gh-bot

ggml-gh-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

Hi @DreamingWater, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • AI-generated content: While code is allowed to be generated by AI, please write the PR description and commit messages on your own without the help of AI.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@DreamingWater
DreamingWater force-pushed the fix-router-dedup-draft-hf branch from a2f9a22 to 94c8c72 Compare August 29, 2026 07:15
@DreamingWater DreamingWater changed the title server: Deduplicate draft HF model via dedup-cache-models server: Dedup the draft HF model via dedup-cache-models Aug 29, 2026

@ServeurpersoCom ServeurpersoCom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The draft pair maps to what the runtime actually does, since -md fills hf_file for the draft when --spec-draft-hf is set, and the resolution stays fail-open, so nothing changes for presets without a draft repo. Sidecar drafters resolve to nothing here, which is right since they never show up in the listing anyway.

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Closing and reopening to retrigger the CI, the pending runs reference a workflow file that was removed from master and the approval button fails on them, no action needed on your side.

@DreamingWater

Copy link
Copy Markdown
Contributor Author

The remaining CPU CI failure appears unrelated to this PR: windows / x64-openblas builds successfully and only test-thread-safety fails with 0xc0000374 (30/31 tests pass), while build-cmake-pkg / linux fails during job setup. The server CI and the other workflows pass.

@ngxson
ngxson merged commit bcbc936 into ggml-org:master Sep 23, 2026
15 of 18 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 7, 2026
* server: Dedup the draft HF model via dedup-cache-models
Fixes ggml-org#27846

* server: avoid capturing structured binding in lambda

(cherry picked from commit bcbc936)
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: Draft models won't get deduplicated when using dedup-cache-models in models preset configuration

3 participants