Repository navigation
Description
Model: unsloth/Qwen3.8-Flash-Next-GGUF:UD-IQ2_XS
Environment
Where are you using Unsloth?
- Unsloth desktop application
- Unsloth web UI (
unsloth studio) - Unsloth CLI
- Python package or notebook
- Colab or Kaggle
Operating system and version:
Windows 11 Pro, 10.0.26300.0 (25H2), AMD chipset driver installed, all Windows updates applied.
GPU model(s) and accelerator backend:
AMD Radeon(TM) 8060S Graphics — integrated GPU of an AMD Ryzen AI MAX+ 395 (Strix Halo, gfx1151) APU.
Backend: ROCm / HIP (ggml-hip.dll loaded from ~/.unsloth/llama.cpp/build/bin/Release/).
Hardware memory layout (this is the crux of the report):
| value | |
|---|---|
| Physical RAM installed | 64 GB (firmware reports 8 × 16 GB LPDDR5x-8000, soldered) |
Win32_OperatingSystem.TotalVisibleMemorySize |
63.6 GB |
Device memory reported by llama.cpp / ROCm (hipMemGetInfo) |
110230 MiB (≈107.6 GiB) |
ROCm : NO_VMM = 1 in the startup banner |
yes |
So the "device memory" number that --fit uses is roughly 1.7× larger than all physical RAM, because on this APU the device aperture is backed by system memory (no VMM).
Versions:
| Component | Before / after my updates |
|---|---|
| Unsloth desktop app | 0.1.9xx-beta → 0.1.919-beta |
| unsloth (package) | 2026.10.11 → 2026.11.2 → 2026.11.3 → 2026.11.4 → 2026.11.5 / 2026.11.6 |
| llama.cpp (Unsloth prebuilt bundle) | b11985 → b12128 → b12319 → b12340 → b12347-mix-241a0f3 (build 12347 (c2cf5f983), Clang 24.0.0, "Compiled by the Unsloth team") |
| torch | 2.11.0+rocm7.14.0 (hip 7.14.60850) |
| Python | 3.11.15 (uv-managed venv in ~/.unsloth/studio/unsloth_studio) |
| AMD driver | 32.0.31041.1004 |
What happened?
I updated Unsloth Desktop several times in a row (unsloth 2026.10.x → 2026.11.6, llama.cpp b11985 → b12347). After that, the same model with the exact same settings now consumes ~14 GB more system RAM than before, while my GPU still shows ~9 GB of free VRAM. I went from "comfortable" (~43 GB used / 64 GB) to "memory exhausted" (~57–62 GB used, ~1 GB free, pagefile active), and the machine is now swapping during normal use.
I verified from my own logs that this is not a settings change on my side: the llama-server.exe command line that Desktop generates is byte-for-byte equivalent across the whole period (see "the launch command did not change" below). The only new flag I can see is --fit-target 16384, which appeared around Nov 13.
Steps to reproduce:
- Strix Halo APU machine: Ryzen AI MAX+ 395 / Radeon 8060S, gfx1151, 64 GB physical RAM, ROCm backend (no VMM).
- In Unsloth Desktop, load
unsloth/Qwen3.8-Flash-Next-GGUF:UD-IQ2_XS(70.6 GiB total, 3-part GGUF), with:- context = 131072, parallel = 4, KV cache = q4_0, unified KV = on, flash-attn = on,
- MTP speculative decoding enabled (
mtp-Qwen3.8-Flash-Next-Q8_0.gguf,--spec-type draft-mtp --spec-draft-n-max 2), - vision tower
mmproj-BF16.gguf, and--fit on(the Desktop default).
- Chat normally for a few minutes, then look at Task Manager → performance / Details.
Expected behavior:
--fit on should keep the allocation inside what the machine physically has. Since this is an APU where "device memory" is system memory, I expect --fit to treat available device memory as roughly min(reported_device_memory, physical_RAM − OS/other-process reserve), i.e. never plan ~52 GiB of buffers on a 64 GB machine, and ideally respect the ~9 GB of VRAM that is still reported free instead of silently pushing everything into host RAM.
Actual behavior:
llama-server.exe alone now holds Private Bytes ≈ 51.3 GB / Working Set ≈ 50.6 GB on a 64 GB machine:
TotalVisibleMemorySize GB: 63.6
FreePhysicalMemory GB: 1.1
UsedPhysicalMemory GB: 62.5
CommitLimit GB: 77.8
Committed GB: 75.8
Id ProcessName WS_GB Priv_GB
21840 llama-server 50.58 51.27 <-- the whole machine budget
6748 python 0.67 2.71
4960 Code 0.54 0.45
Before the updates, the same model + same parameters peaked at roughly 43 GB total system usage. Meanwhile Task Manager / my monitoring still shows ~9 GB of VRAM free, so the memory is not going where --fit thinks it is going.
Model and operation involved:
- Model:
unsloth/Qwen3.8-Flash-Next-GGUF:UD-IQ2_XS(fileQwen3.8-Flash-Next-UD-IQ2_XS-00001-of-00003.gguf,file size = 70.61 GiB (3.43 BPW), archqwen4exp, hybrid SSM + full attention, 512-expert MoE). - Also loaded:
mtp-Qwen3.8-Flash-Next-Q8_0.gguf(MTP draft,file size = 3.84 GiB, fully offloaded) andmmproj-BF16.gguf(~1.1 GiB estimated). - Operation: inference / GGUF startup + chat in the desktop app (no training, no export).
The launch command did not change across versions
Extracted from ~/.unsloth/studio/logs/server/server-*.log (paths shortened, API key removed):
20261105: -m ...UD-Q2_K_XL... --parallel 4 --flash-attn on --no-context-shift -c 131072
--fit on --kv-unified --cache-type-k q4_0 --cache-type-v q4_0
--model-draft mtp-...Q8_0.gguf --spec-type draft-mtp --spec-draft-n-max 2
--mmproj mmproj-BF16.gguf (llama.cpp b12128)
20261113: same, plus --load-mode mmap --lazy-mode on (b12319/b12340)
20261118: same, plus --fit-target 16384 (b12347)
-c 131072 --parallel 4 --ctx-checkpoints 7 --kv-unified ... identical
Same model file size (70.61 GiB), same n_ctx, same --parallel 4, same draft model, same KV quant — so the +14 GB did not come from my configuration.
The smoking gun: --fit believes there is 110 GiB of device memory
From ~/.unsloth/studio/logs/llama-server/llama-<...>-try0.log (identical numbers on b12340 and b12347):
I ggml_cuda_init: found 1 ROCm devices (Total VRAM: 110230 MiB):
I Device 0: AMD Radeon(TM) 8060S Graphics, gfx1151 (0x1151), VMM: no, Wave Size: 32, VRAM: 110230 MiB
I cmn common_param: system_info: n_threads = 16 (n_threads_batch = 16) / 32 | ROCm : NO_VMM = 1 | ...
I cmn common_param: - ROCm0 : AMD Radeon(TM) 8060S Graphics (110230 MiB, 110079 MiB free)
I cmn common_param: - CPU : AMD RYZEN AI MAX+ 395 w/ Radeon 8060S (65174 MiB, 54335 MiB free)
I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
I common_memory_breakdown_print: | - ROCm0 (Radeon(TM) 8060S Graphics) | 110230 = 110001 + (47648 = 44520 + 2437 + 690) + -47419 |
I common_memory_breakdown_print: | - Host | 27948 = 27788 + 0 + 160 |
I common_params_fit_impl: projected to use 51796 MiB of device memory vs. 110001 MiB of free device memory
I common_params_fit_impl: will leave 58205 >= 17497 MiB of free device memory, no changes needed
I load_tensors: offloaded 49/49 layers to GPU (main model)
I load_tensors: offloaded 50/50 layers to GPU (MTP draft model)
I llama_prepare_model_devices: ... - 62148 MiB free (after the draft model was loaded too)
Two things stand out to me:
total = 110230 MiBdevice memory on a machine that physically has 65174 MiB — so--fithappily plans51796 MiBof device buffers and reports "will leave 58205 MiB free, no changes needed". On an APU withNO_VMM = 1those allocations are host-RAM-backed, which is exactly the ~51 GB private bytes I now measure.- The breakdown line itself is self-inconsistent:
unaccounted = -47419 MiB, and- Host ... 27948at fit time (later only 804 MiB). It looks like APU/shared-memory accounting is not being handled in the fitting path.
For comparison, the per-tensor KV numbers are small and sane (ROCm0 KV buffer size = 864.00 MiB, indexer KV 216.00 MiB), so this is not a KV-cache blow-up — it is offload/fit planning of model + draft weights on a device whose reported capacity exceeds physical RAM.
Diagnostics and logs
Desktop application
I could not reproduce an error dialog (nothing crashes, it just eats all RAM), so there is no Copy Diagnostics output. Instead I attach the newest relevant files:
~/.unsloth/studio/logs/llama-server/llama-1795003001-port-<redacted>-try0.log(b12347, current)~/.unsloth/studio/logs/llama-server/llama-1794580185-port-<redacted>-try0.log(b12340, for before/after comparison)~/.unsloth/studio/logs/server/server-20261105-220516-pid<redacted>.logandserver-20261118-195552-pid<redacted>.log(launch command lines)~/.unsloth/studio/logs/update-update-*.log(version timeline: unsloth 2026.10.11 → 2026.11.5, llama.cpp b11985 → b12347)
API keys, the --api-key-file path content and my username have been redacted; I am not uploading studio.db, chats or auth state.
Model-specific logs, if applicable
The relevant llama-server snippet is quoted above (memory breakdown + common_params_fit_impl lines).
Additional context
What I think is happening (happy to be wrong): on APUs like gfx1151 the ROCm device memory number is an aperture over system RAM, so any fit/offload logic that trusts it will over-commit host memory. Something in the b123xx range of llama.cpp and/or the newer Desktop release changed how much gets pushed through that path (or made --fit-target / draft-device handling more aggressive), which turned "fits with 20 GB headroom" into "uses every byte of RAM".
Feature request folded in: on unified-memory devices, please clamp the fit target by physical RAM (e.g. min(device_free, total_physical − user_reserve)) and/or expose a "VRAM budget / system RAM reserve" field in Desktop settings so APU users can cap it manually. Reporting both numbers ("device reports X GiB, but only Y GiB physical RAM") in the model card would also help.
Related issues I found: #18001 (APU loading into shared memory instead of dedicated buffer), #13947 (quant fit badges wrong on unified-memory laptops), #8178 (cap GPU memory / VRAM budget), #11475 (show layer + KV split before loading). None of them covers "fit plans more device memory than the machine physically has → system RAM exhausted while VRAM still looks free".
Workaround I am using now: set context lower and/or disable MTP speculative decoding, or manually limit offloaded layers, so that --fit cannot plan ~52 GiB. This brings usage back down to ~43 GB but costs speed, which is why I would rather have the fit logic fixed.
Activity
debojyoti-dev commentedon Nov 18, 2026
Hi @danielhanchen, I see this is assigned to you. If you haven't started on it, could I take it?
From the logs, Studio already sizes its own plan for a ROCm APU against system RAM, but the
--fit-target 16384it hands llama-server is only a margin, and llama.cpp's fitter measures that margin against the HIP free reading (110079 MiB here, which on Windows includes the WDDM shared heap on top of RAM). So the child sees about 94 GiB it may fill on a 64 GB machine and offloads every layer.My plan: when a launch is a single Windows ROCm APU with
--fiton and no user--fit-target, raise the emitted margin by the part of the HIP free reading that system RAM plus the BIOS carve-out can't back, so llama.cpp plans against the same budget Studio does. A user-set--fit-targetstays untouched. I'd test it end to end against the real launch path and add tests.