Which version of LM Studio?
LM Studio 0.3.39 (Build 2)
Which operating system?
Windows 11 Home 25H2 26200.7623
What is the bug?
Failed to load last used model.
Error loading model.
(Exit code: 18446744072635812000). Unknown error. Try a different model and/or config.
After updating to the latest drivers for my Radeon RX 7800 XT (Adrenalin 26.1.1), I think it also installed ROCm system wide or something. I noticed that in my Runtime menu, I now had ROCm llama.cpp available to be used, where previously there was only Vulkan. I decided to try the new ROCm runtime available to see if there would be any performance uplift.
However, when I went to load a model (both Gemma3 12B Instruct QAT and gpt-oss 20B were tested), I got the error in the logs section. I noticed in my hardware monitoring that my RAM usage was going up (completely saturating it, actually), but VRAM usage stayed stagnant. Looking at the logs, it looks like it may be using my integrated GPU.
The issue persists after restarting LM Studio (by the way, is there really no way to truly close this other than to go into Task Manager and Force Quit it?) (works now) and my PC.
Everything works normally when switching back to Vulkan.
I'm not sure why it isn't detecting my dGPU as the ROCm device, the hardware tab says it should be good.
Is there any way to fix this without disabling my iGPU? I still use it for hardware acceleration in my browser.
Screenshots
Logs
2026-01-21 16:56:52 [DEBUG]
[LM Studio] GPU Configuration:
Strategy: evenly
Priority: []
Disabled GPUs: []
Limit weight offload to dedicated GPU Memory: OFF
Offload KV Cache to GPU: ON
2026-01-21 16:56:52 [DEBUG]
[LM Studio] Live GPU memory info:
No live GPU info available
2026-01-21 16:56:52 [DEBUG]
[LM Studio] Model load size estimate with raw num offload layers 'max' and context length '11483':
Model: 7.97 GB
Context: 4.77 GB
Total: 12.74 GB
2026-01-21 16:56:52 [DEBUG]
[LM Studio] Not using full context length for VRAM overflow calculations due to single GPU setup. Instead, using '8192' as context length for the calculation. Original context length: '11483'.
[LM Studio] Strict GPU VRAM cap is OFF: GPU offload layers will not be checked for adjustment
[LM Studio] Resolved GPU config options:
Num Offload Layers: max
Num CPU Expert Layers: 0
Main GPU: 0
Tensor Split: [0]
Disabled GPUs: []
2026-01-21 16:56:52 [DEBUG]
ggml_cuda_init: found 1 ROCm devices:
2026-01-21 16:56:52 [DEBUG]
Device 0: AMD Radeon(TM) Graphics, gfx1036 (0x1036), VMM: no, Wave Size: 32
2026-01-21 16:56:52 [DEBUG]
ROCm : NO_VMM = 1 | NO_PEER_COPY = 1 | PEER_MAX_BATCH_SIZE = 128 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | REPACK = 1 |
2026-01-21 16:56:52 [DEBUG]
2026-01-21 16:56:52 [DEBUG]
llama_model_load_from_file_impl: using device ROCm0 (AMD Radeon(TM) Graphics) (0000:0e:00.0) - 12215 MiB free
2026-01-21 16:56:52 [DEBUG]
llama_model_loader: loaded meta data with 39 key-value pairs and 626 tensors from C:\Users\nicci\.lmstudio\models\lmstudio-community\gemma-3-12B-it-qat-GGUF\gemma-3-12B-it-QAT-Q4_0.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = gemma3
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.name str = Gemma 3 12b
llama_model_loader: - kv 3: general.basename str = gemma-3
llama_model_loader: - kv 4: general.size_label str = 12B
llama_model_loader: - kv 5: general.license str = gemma
llama_model_loader: - kv 6: general.base_model.count u32 = 1
llama_model_loader: - kv 7: general.base_model.0.name str = Gemma 3 12b It
llama_model_loader: - kv 8: general.base_model.0.organization str = Google
llama_model_loader: - kv 9: general.base_model.0.repo_url str = https://huggingface.co/google/gemma-3...
llama_model_loader: - kv 10: general.tags arr[str,4] = ["gemma3", "gemma", "google", "image-...
llama_model_loader: - kv 11: gemma3.context_length u32 = 131072
llama_model_loader: - kv 12: gemma3.embedding_length u32 = 3840
llama_model_loader: - kv 13: gemma3.block_count u32 = 48
llama_model_loader: - kv 14: gemma3.feed_forward_length u32 = 15360
llama_model_loader: - kv 15: gemma3.attention.head_count u32 = 16
llama_model_loader: - kv 16: gemma3.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 17: gemma3.attention.key_length u32 = 256
llama_model_loader: - kv 18: gemma3.attention.value_length u32 = 256
llama_model_loader: - kv 19: gemma3.rope.freq_base f32 = 1000000.000000
llama_model_loader: - kv 20: gemma3.attention.sliding_window u32 = 1024
llama_model_loader: - kv 21: gemma3.attention.head_count_kv u32 = 8
llama_model_loader: - kv 22: gemma3.rope.scaling.type str = linear
llama_model_loader: - kv 23: gemma3.rope.scaling.factor f32 = 8.000000
llama_model_loader: - kv 24: tokenizer.ggml.model str = llama
llama_model_loader: - kv 25: tokenizer.ggml.pre str = default
2026-01-21 16:56:52 [DEBUG]
llama_model_loader: - kv 26: tokenizer.ggml.tokens arr[str,262208] = ["<pad>", "<eos>", "<bos>", "<unk>", ...
2026-01-21 16:56:52 [DEBUG]
llama_model_loader: - kv 27: tokenizer.ggml.scores arr[f32,262208] = [-1000.000000, -1000.000000, -1000.00...
2026-01-21 16:56:52 [DEBUG]
llama_model_loader: - kv 28: tokenizer.ggml.token_type arr[i32,262208] = [3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, ...
llama_model_loader: - kv 29: tokenizer.ggml.bos_token_id u32 = 2
llama_model_loader: - kv 30: tokenizer.ggml.eos_token_id u32 = 1
llama_model_loader: - kv 31: tokenizer.ggml.unknown_token_id u32 = 3
llama_model_loader: - kv 32: tokenizer.ggml.padding_token_id u32 = 0
llama_model_loader: - kv 33: tokenizer.ggml.add_bos_token bool = true
llama_model_loader: - kv 34: tokenizer.ggml.add_eos_token bool = false
llama_model_loader: - kv 35: tokenizer.chat_template str = {{ bos_token }}\n{%- if messages[0]['r...
llama_model_loader: - kv 36: tokenizer.ggml.add_space_prefix bool = false
llama_model_loader: - kv 37: general.quantization_version u32 = 2
llama_model_loader: - kv 38: general.file_type u32 = 2
llama_model_loader: - type f32: 289 tensors
llama_model_loader: - type q4_0: 336 tensors
llama_model_loader: - type q6_K: 1 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q4_0
print_info: file size = 6.41 GiB (4.68 BPW)
2026-01-21 16:56:53 [DEBUG]
load: 6242 unused tokens
2026-01-21 16:56:53 [DEBUG]
load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
load: printing all EOG tokens:
load: - 1 ('<eos>')
load: - 106 ('<end_of_turn>')
2026-01-21 16:56:53 [DEBUG]
load: special tokens cache size = 6415
2026-01-21 16:56:53 [DEBUG]
load: token to piece cache size = 1.9446 MB
print_info: arch = gemma3
print_info: vocab_only = 0
print_info: no_alloc = 0
print_info: n_ctx_train = 131072
print_info: n_embd = 3840
print_info: n_embd_inp = 3840
print_info: n_layer = 48
2026-01-21 16:56:53 [DEBUG]
print_info: n_head = 16
print_info: n_head_kv = 8
print_info: n_rot = 256
print_info: n_swa = 1024
print_info: is_swa_any = 1
print_info: n_embd_head_k = 256
print_info: n_embd_head_v = 256
print_info: n_gqa = 2
print_info: n_embd_k_gqa = 2048
print_info: n_embd_v_gqa = 2048
print_info: f_norm_eps = 0.0e+00
print_info: f_norm_rms_eps = 1.0e-06
print_info: f_clamp_kqv = 0.0e+00
print_info: f_max_alibi_bias = 0.0e+00
print_info: f_logit_scale = 0.0e+00
print_info: f_attn_scale = 6.2e-02
print_info: n_ff = 15360
print_info: n_expert = 0
print_info: n_expert_used = 0
print_info: n_expert_groups = 0
print_info: n_group_used = 0
print_info: causal attn = 1
print_info: pooling type = 0
print_info: rope type = 2
print_info: rope scaling = linear
print_info: freq_base_train = 1000000.0
print_info: freq_scale_train = 0.125
print_info: freq_base_swa = 10000.0
print_info: freq_scale_swa = 1
print_info: n_ctx_orig_yarn = 131072
print_info: rope_yarn_log_mul = 0.0000
print_info: rope_finetuned = unknown
print_info: model type = 12B
print_info: model params = 11.77 B
print_info: general.name = Gemma 3 12b
print_info: vocab type = SPM
print_info: n_vocab = 262208
print_info: n_merges = 0
print_info: BOS token = 2 '<bos>'
print_info: EOS token = 1 '<eos>'
print_info: EOT token = 106 '<end_of_turn>'
print_info: UNK token = 3 '<unk>'
print_info: PAD token = 0 '<pad>'
print_info: LF token = 248 '<0x0A>'
print_info: EOG token = 1 '<eos>'
print_info: EOG token = 106 '<end_of_turn>'
print_info: max token length = 48
load_tensors: loading model tensors, this can take a while... (mmap = true, direct_io = false)
2026-01-21 16:56:54 [DEBUG]
load_tensors: offloading output layer to GPU
load_tensors: offloading 47 repeating layers to GPU
load_tensors: offloaded 49/49 layers to GPU
load_tensors: CPU_Mapped model buffer size = 787.69 MiB
load_tensors: ROCm0 model buffer size = 6561.92 MiB
2026-01-21 16:56:58 [DEBUG]
common_init_result: added <eos> logit bias = -inf
common_init_result: added <end_of_turn> logit bias = -inf
2026-01-21 16:56:58 [DEBUG]
llama_context: constructing llama_context
llama_context: n_seq_max = 1
llama_context: n_ctx = 11520
llama_context: n_ctx_seq = 11520
llama_context: n_batch = 512
llama_context: n_ubatch = 512
llama_context: causal_attn = 1
llama_context: flash_attn = disabled
llama_context: kv_unified = false
llama_context: freq_base = 1000000.0
llama_context: freq_scale = 0.125
llama_context: n_ctx_seq (11520) < n_ctx_train (131072) -- the full capacity of the model will not be utilized
2026-01-21 16:56:58 [DEBUG]
llama_context: ROCm_Host output buffer size = 1.00 MiB
llama_kv_cache_iswa: using full-size SWA cache (ref: https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055)
llama_kv_cache_iswa: creating non-SWA KV cache, size = 11520 cells
2026-01-21 16:56:58 [DEBUG]
llama_kv_cache: ROCm0 KV buffer size = 720.00 MiB
2026-01-21 16:56:59 [DEBUG]
llama_kv_cache: size = 720.00 MiB ( 11520 cells, 8 layers, 1/1 seqs), K (f16): 360.00 MiB, V (f16): 360.00 MiB
llama_kv_cache_iswa: creating SWA KV cache, size = 11520 cells
2026-01-21 16:57:00 [DEBUG]
llama_kv_cache: ROCm0 KV buffer size = 3600.00 MiB
2026-01-21 16:57:06 [DEBUG]
llama_kv_cache: size = 3600.00 MiB ( 11520 cells, 40 layers, 1/1 seqs), K (f16): 1800.00 MiB, V (f16): 1800.00 MiB
sched_reserve: reserving ...
2026-01-21 16:57:06 [DEBUG]
sched_reserve: ROCm0 compute buffer size = 519.62 MiB
sched_reserve: ROCm_Host compute buffer size = 68.51 MiB
sched_reserve: graph nodes = 2167
sched_reserve: graph splits = 2
sched_reserve: reserve took 64.74 ms, sched copies = 1
2026-01-21 16:57:06 [DEBUG]
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
2026-01-21 16:57:06 [DEBUG]
ggml_cuda_compute_forward: SCALE failed
llama.cpp abort:96: ROCm error
ROCm error: invalid device function
current device: 0, in function ggml_cuda_compute_forward at C:/actions-runner/_work/llmster/llmster/electron/vendor/llm-engine/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:2751
err
To Reproduce
Steps to reproduce the behavior:
- Set ROCm as the runtime.
- Open an old chat log.
- Load either Gemma3 12B Instruct QAT or gpt-oss 20B
- See error
Which version of LM Studio?
LM Studio 0.3.39 (Build 2)
Which operating system?
Windows 11 Home 25H2 26200.7623
What is the bug?
After updating to the latest drivers for my Radeon RX 7800 XT (Adrenalin 26.1.1), I think it also installed ROCm system wide or something. I noticed that in my Runtime menu, I now had ROCm llama.cpp available to be used, where previously there was only Vulkan. I decided to try the new ROCm runtime available to see if there would be any performance uplift.
However, when I went to load a model (both Gemma3 12B Instruct QAT and gpt-oss 20B were tested), I got the error in the logs section. I noticed in my hardware monitoring that my RAM usage was going up (completely saturating it, actually), but VRAM usage stayed stagnant. Looking at the logs, it looks like it may be using my integrated GPU.
The issue persists after restarting LM Studio
(by the way, is there really no way to truly close this other than to go into Task Manager and Force Quit it?)(works now) and my PC.Everything works normally when switching back to Vulkan.
I'm not sure why it isn't detecting my dGPU as the ROCm device, the hardware tab says it should be good.
Is there any way to fix this without disabling my iGPU? I still use it for hardware acceleration in my browser.
Screenshots
Logs
To Reproduce
Steps to reproduce the behavior: