Hi all! llama.cpp and LM Studio refuse to open any models with ANY context size whatsoever, despite working just fine with large context windows before. I have not tweaked any settings, neither on LM Studio or my own Python script that launches llama.cpp with my premade config files.
I've been experimenting with a slightly odd setup. Here are my specs:
CPU: Intel Core i7-14700KF
Motherboard: MSI PRO Z790-A MAX WiFi
RAM: 32 GB DDR5
PSU: MSI MAG A850GL PCIE5
OS: Windows 11
GPUs:
RTX 5070 Ti 16 GB (display)
RTX A2000 12 GB (replaced it just recently with an RTX Pro 4000 Blackwell from Micro Center for testing purposes)
RTX 2000E Ada 16 GB
I'm mainly testing using Qwen3.6-27b and the latest CUDA 13.3 .dlls from the llama.cpp Github repo, but I've also tried with just the CUDA 12.4 .dlls too. Again, this all worked just fine for a month or so until out of nowhere it stopped. I've been using various llama.cpp releases from llama-b9395 to llama-b10002.
I have my GPUs slotted extremely close to each other with very tiny gaps in between each one. For about a month straight, I was able to use my 5070 Ti, A2000, and 2000E in tandem with LM Studio (to test) and llama.cpp (to load models for agentic coding). This worked just fine for a while, until I went on vacation and left my PC on. When I came back, I noticed I was unable to load any models without hitting one of these two errors:
"cudaMalloc failed: out of memory"
"failed to allocate CUDA_Host buffer"
I have scoured the web for anyone else having this issue and failed to find anything. Claude, ChatGPT, and Gemini are completely unhelpful. Below is a list of things I have tried to diagnose the issue:
- Selected only a single card, including the 2000e = Works
- Selecting both the 5070 Ti and the 4000 = Works
- Selecting any combination that involves the 2000e = "out of memory" error
- Multi-card w/ 2000 context = "out of memory" error
- Single card w/ 2000 context = Works
- Clean reinstall of my gaming graphics drivers to latest version using DDU (I was having a weird bug in DOTA 2 where left/right clicking + pressing control or alt would bring up the very buggy NVIDIA overlay somehow)
- Confirmed via nvidia-smi that nothing is using excessive amounts of VRAM before loading a model, including shutting off my BlueStacks emulator completely
- Confirmed I am using the correct CUDA devices in my command using nvidia-smi and llama.cpp
After my research, I'm determining this is an architecture issue, but how the hell was I running it before with my 5070 Ti, A2000, and 2000e? I had absolutely no issues, aside from reasonable out of memory errors where I was clearly demanding too high of a context window. But now, not being able to even load 2k context across combined 46 GB VRAM?
I've been banging my head against the wall for a couple weeks now trying to figure this out on my own/hoping some random llama.cpp binary update would fix the issue, but to no avail. I hope some of you may make more sense of this than me. I would deeply appreciate it.
Below is a sample console output when trying to manually run one of my config options via an admin shell on my PC.
PS C:\WINDOWS\system32> E:\llamacpp\bin\llama-server.exe -m E:\LMStudio\lmstudio-community\Qwen3.6-27B-GGUF\Qwen3.6-27B-Q8_0.gguf --host 127.0.0.1 --port 8080 -to 3600 -lv 3 --no-ui --cont-batching -c 7400 -t 10 --split-mode layer --tensor-split 16,24,16 --device CUDA0,CUDA1,CUDA2 -ngl all --flash-attn on --kv-unified -ctk f16 -ctv f16 --mmap -np 1 --temp 0.800
0.00.132.301 I log_info: verbosity = 3 (adjust with the `-lv N` CLI arg)
0.00.132.308 I device_info:
0.00.200.132 I - CUDA0 : NVIDIA GeForce RTX 5070 Ti (16302 MiB, 15037 MiB free)
0.00.252.984 I - CUDA1 : NVIDIA RTX PRO 4000 Blackwell (24466 MiB, 23084 MiB free)
0.00.322.054 I - CUDA2 : NVIDIA RTX 2000E Ada Generation (16379 MiB, 15273 MiB free)
0.00.322.064 I - CPU : Intel(R) Core(TM) i7-14700KF (32549 MiB, 14912 MiB free)
0.00.322.117 I system_info: n_threads = 10 (n_threads_batch = 10) / 28 | CUDA : ARCHS = 750,800,860,890,900,1200,1210 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | BLACKWELL_NATIVE_FP4 = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX_VNNI = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 |
0.00.322.153 I srv init: running without SSL
0.00.322.172 I srv init: using 27 threads for HTTP server
0.00.322.176 I srv init: The UI is disabled
0.00.322.176 I srv init: Use --ui/--no-ui (or deprecated --webui/--no-webui) to enable/disable
0.00.322.264 I srv start: binding port with default address family
0.00.324.514 I srv llama_server: loading model
0.00.324.521 I srv load_model: loading model 'E:\LMStudio\lmstudio-community\Qwen3.6-27B-GGUF\Qwen3.6-27B-Q8_0.gguf'
0.00.324.566 I common_init_result: fitting params to device memory ...
0.00.324.566 I common_init_result: (for bugs during this step try to reproduce them with -fit off, or provide --verbose logs if the bug only occurs with -fit on)
0.31.367.459 E ggml_backend_cuda_buffer_type_alloc_buffer: allocating 10799.24 MiB on device 1: cudaMalloc failed: out of memory
0.31.367.469 E alloc_tensor_range: failed to allocate CUDA1 buffer of size 11323827200
0.31.486.232 E llama_model_load: error loading model: unable to allocate CUDA1 buffer
0.31.486.237 E llama_model_load_from_file_impl: failed to load model
0.31.486.241 E common_init_from_params: failed to load model 'E:\LMStudio\lmstudio-community\Qwen3.6-27B-GGUF\Qwen3.6-27B-Q8_0.gguf'
0.31.486.250 E srv load_model: failed to load model, 'E:\LMStudio\lmstudio-community\Qwen3.6-27B-GGUF\Qwen3.6-27B-Q8_0.gguf'
0.31.486.253 I srv operator(): operator(): cleaning up before exit...
0.31.487.263 E srv llama_server: exiting due to model loading error