Skip to content

Studio: always show loaded GGUF weight placement - #17449

Merged
danielhanchen merged 4 commits into
unslothai:mainfrom
oobabooga:studio-gguf-placement-visible
Nov 11, 2026
Merged

danielhanchen merged 4 commits into
unslothai:mainfrom
oobabooga:studio-gguf-placement-visible

Conversation

@oobabooga

@oobabooga oobabooga commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Related to #16055.

Problem

Studio knows where a loaded GGUF's weights are, but the only lasting readout is the "Weight placement" row in Run settings (#14909), and it sits behind a switch that is off by default. In a Reddit thread about slow generation, people could not tell whether the model had spilled to the CPU. They tried to read it from the memory estimate, which is a forecast.

Fix

  • The "Weight placement" row always shows for the loaded GGUF, in the same grey text for every placement.
  • The switch that used to gate it now only controls the live speed lines, so "Detailed speed and loading info" becomes "Detailed speed info" in all 25 locales. That label is from Studio: realtime option for speed and context stats, shorter Chat defaults #16888, so please say if you prefer another name.
  • The "partly on CPU" and "none of the layers fit" warnings now end with the weight amounts, for example "Model weights: 1.9 GiB on the GPU, 2.8 GiB on the CPU." These are totals, and they count the weights only. This is the idea from Studio: say how much VRAM and RAM the weights take in the partial-offload notice #16064 (thanks @debojyoti-dev), worded so it is also correct with unified memory.
  • A MoE load with expert weights in RAM, which llama.cpp counts as fully on the GPU, now says so on its success toast.
  • A load that llama.cpp logs as fully offloaded while every buffer is in system memory, on a machine with a GPU, now gets the existing "llama.cpp could not use it" warning.

There are no backend changes, and which loads get a warning is otherwise the same.

Before and after

Main (011129b355) vs this PR (7e9fd96cc5), with the same real load on both sides.

A model that is fully on the GPU:

placement_01_fully_on_gpu

14 of 37 layers on the GPU:

placement_02_partly_on_cpu

A MoE model with the expert weights of 24 layers in RAM:

placement_03_moe_expert_weights_in_ram

Testing

  • Live in Studio on Linux with an RTX 3090: the three loads above, and the row after a page reload. A small tool makes the card report less free VRAM than it has, so a model that would fit lands partly on the CPU.
  • 7 new frontend tests. The failed GPU backend case is covered by these tests only.
  • typecheck, i18n:check:strict and the frontend and tests/studio tests that cover these files pass.
  • Not tested on Windows or macOS.

Before and after, separate installs

Merge base 011129b355 vs this PR dbd790c8ed, each built from its own tree, "Detailed speed info" left at its default (off).

Run settings with gemma-3-270m GGUF loaded on an NVIDIA L4. Main shows no placement; this PR shows all 19 layers on the GPU and the weight split:

pr17449_gpu_l4

Run settings with Qwen3-0.6B GGUF loaded on a CPU-only Linux machine. This PR says all 29 layers are on the CPU, with 0.5 GiB in RAM:

pr17449_cpu_only

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T22:07:27.340690Z dbd790c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: dbd790c8ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants