Repository navigation
Studio: show the --fit placement search instead of counting its header reads as loaded weights - #18725
Merged
danielhanchen merged 5 commits intoNov 22, 2026
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Nov 21, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 22, 2026
[skip ci]
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.
Problem
When a GGUF load uses llama-server's
--fit on, the load toast shows weights loading at 15 to 50 MB/s with a 10 to 15 minute ETA while no weights are being read. On a load that cannot fit (Inkling-2-Mini at 800K context, #18689), every retry repeats this, so the failure looks like slow storage.Root cause
LlamaCppBackend.load_progressreportsmax(RssFile, rchar)of the llama-server process as bytes loaded. Before loading any tensor,--fittries dozens of layer placements and re-reads the GGUF header for each one.rcharcounts those reads (about 0.45 GB over 20 s for Inkling-2-Mini), and the frontend turns them into a rate and an ETA.Fix
_drain_stdoutfollows the load stages in llama-server's log: the--fitsearch, from its first line to itscommon_fit_params:result line (llama_params_fit:on b8864 and older), then the firstload_tensors: loading model tensorsafter it, wherercharandRssFileare recorded as a baseline. At verbosity 5 each probe prints its ownload_tensorsline, so that line only counts outside a search.load_progressreturnsphase: "fit"with 0 bytes during the search, and measures both counters from the baseline after it.Verification
Inkling-2-Mini UD-Q4_K_XL (18.3 GB), RTX 6000 Ada + RTX 3090, 800K context,
/api/inference/load-progresspolled every 0.25 s on main and on this branch. Each load made 6 llama-server attempts, 4 of them with--fit on:--fitattemptphase: "fit", 0 bytes, 18.7 sphase: "fit", 0 bytes, 20.5 sphase: "fit", 0 bytes, 24.9 sphase: "fit", 0 bytes, 50.9 sAfter each search, the branch counted the weights up to 17.5 to 17.6 GB. The same load at
--verbosity 5(35 probeload_tensorslines in one search) also stayed infituntil the real load, and at--verbosity 2it reported as on main.Unit tests cover the stage parser, including the verbosity 2 and 5 log sequences and the b8864 markers, and the MCP poller.
Before / after in the shipped UI
Both trees' frontends, load started from the chat picker with a cached Qwen3-4B Q4_K_M GGUF.
/api/inference/load-progressanswers what each tree's own backend returned when a real llama-server trace (Colab L4,--fit on --fit-target 20000 -lv 4, prebuilt b12588) was replayed through its_drain_stdoutandload_progress, slowed 4x. On main the search shows 0.2 GB loaded with a rate and ETA (mapped CUDA libraries in RssFile plus about 30 MB of header re-reads across 5 probes); on this branch it shows the placement search, then counts the weights from the first real read.