Skip to content

[Feature] Add options to strictly uses completely custom llamacpp flags without unsloth studio internal flags optimizers #10359

Closed as not planned

Description

@yusrmuttaqien

While i love how intuitive and feature rich unsloth studio webUI is, I often find myself fighting its llamacpp flags optimizers.

For context, i have been running my own llamacpp, built directly from the mainline repo with following config file (llama-server):

; llama.cpp build command
; cmake -B build -DGGML_CUDA=ON -DGGML_CUDA_GRAPHS=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DGGML_CUDA_F16=ON -DGGML_NATIVE=ON -DGGML_CUDA_FA=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j

[*]
c = 128000
fitc = 128000
load-on-startup = false
b = 2048 ; formula: base b size * np
ub = 2048
np = 1 ; sync with router np flag
t = 6
tb = 6
ngl = -1
fit = off
flash-attn = on
jinja = true
ctk = q8_0
ctkd = q8_0
ctv = q8_0
ctvd = q8_0
cache-reuse = 512
reasoning = on
no-warmup = true
keep = -1
chat-template-kwargs = {"preserve_thinking": true}
image-min-tokens = 1120

; Qwen-3.8-27B ----------------------------

[free-27B-Q3.8]
m = /mnt/AI/models/LLM/Dirk-Qwen-3.8-27B-UD-Q4_K_S/Dirk-Qwen-3.8-27B-UD-Q4_K_S.gguf
mm = /mnt/AI/models/LLM/Dirk-Qwen-3.8-27B-UD-Q4_K_S/mmproj-F16-Dirk-Qwen-3.8-27B.gguf
mmproj-offload = false
c = 56000
fitc = 56000
temp = 1
top-p = 0.95
top-k = 20
min-p = 0.0
presence-penalty = 0.0
repeat-penalty = 1.0
chat-template-kwargs = {"preserve_thinking": true, "reasoning_effort": "medium"}

; Qwen-3.8-35B_A3B ----------------------------

[free-35B_A3B-Q3.8]
m = /mnt/AI/models/LLM/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL.gguf
mm = /mnt/AI/models/LLM/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL/mmproj-F16-Occult-Nail-Qwen-3.6-35B-A3B.gguf
temp = 1
top-p = 0.95
top-k = 20
min-p = 0.0
n-cpu-moe = 30

[free-extended-35B_A3B-Q3.8]
m = /mnt/AI/models/LLM/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL.gguf
mm = /mnt/AI/models/LLM/Occult-Nail-1.0-35B-A3B-UD-Q6_K_XL/mmproj-F16-Occult-Nail-Qwen-3.6-35B-A3B.gguf
c = 262144
fitc = 262144
temp = 1
top-p = 0.95
top-k = 20
min-p = 0.0
n-cpu-moe = 30

; Unused commands ----------------------------

; reasoning-budget = 8192
; reasoning-budget-message = "Okay, enough thinking no more waiting. Let's just jump into it."
; ----------------------------
; mmproj-offload = false
; image-max-tokens = 1120
; ----------------------------
; spec-type = ngram-mod
; spec-ngram-mod-n-match = 2
; spec-ngram-mod-n-min = 2
; spec-ngram-mod-n-max = 3
; ----------------------------
; spec-type = draft-mtp
; spec-draft-ngl = all
; spec-draft-n-max = 3
; spec-draft-n-min = 2
; ----------------------------
; repeat-penalty = 1.05
; repeat-last-n = 512

It works wonderful and fast.

Now, let's focus on the 27B preset.
With that config it utilizes almost 100% VRAM, maybe some spilling to RAM, but it can hit 17t/s decoding.

With unsloth studio, without fighting the webUI, i only can get it to work at ~10t/s decoding. My guess is because it enforces --fit on, thus being conservative with VRAM usage and spill much more to RAM, causes the lower decode speed.

I've used the extra flag feature, and can get the --fit off to be passed to the bundled llamacpp. But, it causes OOM which i never get with my own llamacpp instance + config.

It would be great if we have the option to just bypass the unsloth studio webUI llamacpp configs override and just pass the ini config (can be globally or per model).

With that then we can get the best of both worlds, the great unsloth studio webUI features + flexibilty and full ownership of llamacpp flags.

Activity

  1. added
    feature request
    on Sep 5, 2026
  2. self-assigned this
    on Oct 9, 2026
  3. danielhanchen commented on Oct 10, 2026

    @danielhanchen
    Member

    Thanks for the detailed write-up! We looked into this and we won't be adding a custom llama.cpp config mode to Studio for now.

    If you want full control of the llama-server flags today, you can run your own llama-server with your preset (llama-server --models-preset config.ini) and connect Studio to it as a llama.cpp provider (http://localhost:8080/v1).

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

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions