[GH-ISSUE #11303] qwen3:8b - CUDA error: the resource allocation failed #7455

Open
opened 2026-04-12 19:31:51 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @sguergachi on GitHub (Jul 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11303

What is the issue?

I have tried everything I could find, but I'm stuck with this issue.

Whenever I try loading qwen3:8B I run into "CUDA error: the resource allocation failed" even though I seem to have a good amount of VRAM headroom on my RTX 3080
Image

When I run llama3.1:8b it seems to run fine.

Relevant log output

llama_model_load: vocab only - skipping tensors
time=2025-07-05T00:23:37.685-04:00 level=INFO source=server.go:438 msg="starting llama server" cmd="C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\ollama.exe runner --model E:\\ollama-models\\blobs\\sha256-a3de86cd1c132c822487ededd47a324c50491393e6565cd14bafa40d0b8e686f --ctx-size 1048 --batch-size 512 --n-gpu-layers 37 --threads 6 --flash-attn --kv-cache-type q4_0 --no-mmap --parallel 1 --port 65430"
time=2025-07-05T00:23:37.689-04:00 level=INFO source=sched.go:483 msg="loaded runners" count=1
time=2025-07-05T00:23:37.689-04:00 level=INFO source=server.go:598 msg="waiting for llama runner to start responding"
time=2025-07-05T00:23:37.690-04:00 level=INFO source=server.go:632 msg="waiting for server to become available" status="llm server error"
time=2025-07-05T00:23:37.737-04:00 level=INFO source=runner.go:815 msg="starting go runner"
ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 3080, compute capability 8.6, VMM: yes
load_backend: loaded CUDA backend from C:\Users\Sammy\AppData\Local\Programs\Ollama\lib\ollama\ggml-cuda.dll
load_backend: loaded CPU backend from C:\Users\Sammy\AppData\Local\Programs\Ollama\lib\ollama\ggml-cpu-haswell.dll
time=2025-07-05T00:23:37.856-04:00 level=INFO source=ggml.go:104 msg=system CPU.0.SSE3=1 CPU.0.SSSE3=1 CPU.0.AVX=1 CPU.0.AVX2=1 CPU.0.F16C=1 CPU.0.FMA=1 CPU.0.BMI2=1 CPU.0.LLAMAFILE=1 CPU.1.LLAMAFILE=1 CUDA.0.ARCHS=500,600,610,700,750,800,860,870,890,900,1200 CUDA.0.USE_GRAPHS=1 CUDA.0.PEER_MAX_BATCH_SIZE=128 compiler=cgo(clang)
time=2025-07-05T00:23:37.857-04:00 level=INFO source=runner.go:874 msg="Server listening on 127.0.0.1:65430"
llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 3080) - 9073 MiB free
time=2025-07-05T00:23:37.941-04:00 level=INFO source=server.go:632 msg="waiting for server to become available" status="llm server loading model"
llama_model_loader: loaded meta data with 28 key-value pairs and 399 tensors from E:\ollama-models\blobs\sha256-a3de86cd1c132c822487ededd47a324c50491393e6565cd14bafa40d0b8e686f (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              = qwen3
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = Qwen3 8B
llama_model_loader: - kv   3:                           general.basename str              = Qwen3
llama_model_loader: - kv   4:                         general.size_label str              = 8B
llama_model_loader: - kv   5:                            general.license str              = apache-2.0
llama_model_loader: - kv   6:                          qwen3.block_count u32              = 36
llama_model_loader: - kv   7:                       qwen3.context_length u32              = 40960
llama_model_loader: - kv   8:                     qwen3.embedding_length u32              = 4096
llama_model_loader: - kv   9:                  qwen3.feed_forward_length u32              = 12288
llama_model_loader: - kv  10:                 qwen3.attention.head_count u32              = 32
llama_model_loader: - kv  11:              qwen3.attention.head_count_kv u32              = 8
llama_model_loader: - kv  12:                       qwen3.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv  13:     qwen3.attention.layer_norm_rms_epsilon f32              = 0.000001
llama_model_loader: - kv  14:                 qwen3.attention.key_length u32              = 128
llama_model_loader: - kv  15:               qwen3.attention.value_length u32              = 128
llama_model_loader: - kv  16:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  17:                         tokenizer.ggml.pre str              = qwen2
llama_model_loader: - kv  18:                      tokenizer.ggml.tokens arr[str,151936]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  19:                  tokenizer.ggml.token_type arr[i32,151936]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  20:                      tokenizer.ggml.merges arr[str,151387]  = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
llama_model_loader: - kv  21:                tokenizer.ggml.eos_token_id u32              = 151645
llama_model_loader: - kv  22:            tokenizer.ggml.padding_token_id u32              = 151643
llama_model_loader: - kv  23:                tokenizer.ggml.bos_token_id u32              = 151643
llama_model_loader: - kv  24:               tokenizer.ggml.add_bos_token bool             = false
llama_model_loader: - kv  25:                    tokenizer.chat_template str              = {%- if tools %}\n    {{- '<|im_start|>...
llama_model_loader: - kv  26:               general.quantization_version u32              = 2
llama_model_loader: - kv  27:                          general.file_type u32              = 15
llama_model_loader: - type  f32:  145 tensors
llama_model_loader: - type  f16:   36 tensors
llama_model_loader: - type q4_K:  199 tensors
llama_model_loader: - type q6_K:   19 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q4_K - Medium
print_info: file size   = 4.86 GiB (5.10 BPW) 
load: special tokens cache size = 26
load: token to piece cache size = 0.9311 MB
print_info: arch             = qwen3
print_info: vocab_only       = 0
print_info: n_ctx_train      = 40960
print_info: n_embd           = 4096
print_info: n_layer          = 36
print_info: n_head           = 32
print_info: n_head_kv        = 8
print_info: n_rot            = 128
print_info: n_swa            = 0
print_info: n_swa_pattern    = 1
print_info: n_embd_head_k    = 128
print_info: n_embd_head_v    = 128
print_info: n_gqa            = 4
print_info: n_embd_k_gqa     = 1024
print_info: n_embd_v_gqa     = 1024
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     = 0.0e+00
print_info: n_ff             = 12288
print_info: n_expert         = 0
print_info: n_expert_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 = 1
print_info: n_ctx_orig_yarn  = 40960
print_info: rope_finetuned   = unknown
print_info: ssm_d_conv       = 0
print_info: ssm_d_inner      = 0
print_info: ssm_d_state      = 0
print_info: ssm_dt_rank      = 0
print_info: ssm_dt_b_c_rms   = 0
print_info: model type       = 8B
print_info: model params     = 8.19 B
print_info: general.name     = Qwen3 8B
print_info: vocab type       = BPE
print_info: n_vocab          = 151936
print_info: n_merges         = 151387
print_info: BOS token        = 151643 '<|endoftext|>'
print_info: EOS token        = 151645 '<|im_end|>'
print_info: EOT token        = 151645 '<|im_end|>'
print_info: PAD token        = 151643 '<|endoftext|>'
print_info: LF token         = 198 'Ċ'
print_info: FIM PRE token    = 151659 '<|fim_prefix|>'
print_info: FIM SUF token    = 151661 '<|fim_suffix|>'
print_info: FIM MID token    = 151660 '<|fim_middle|>'
print_info: FIM PAD token    = 151662 '<|fim_pad|>'
print_info: FIM REP token    = 151663 '<|repo_name|>'
print_info: FIM SEP token    = 151664 '<|file_sep|>'
print_info: EOG token        = 151643 '<|endoftext|>'
print_info: EOG token        = 151645 '<|im_end|>'
print_info: EOG token        = 151662 '<|fim_pad|>'
print_info: EOG token        = 151663 '<|repo_name|>'
print_info: EOG token        = 151664 '<|file_sep|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = false)
load_tensors: offloading 36 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 37/37 layers to GPU
load_tensors:          CPU model buffer size =   333.84 MiB
load_tensors:        CUDA0 model buffer size =  4643.78 MiB
llama_context: constructing llama_context
llama_context: n_seq_max     = 1
llama_context: n_ctx         = 1048
llama_context: n_ctx_per_seq = 1048
llama_context: n_batch       = 512
llama_context: n_ubatch      = 512
llama_context: causal_attn   = 1
llama_context: flash_attn    = 1
llama_context: freq_base     = 1000000.0
llama_context: freq_scale    = 1
llama_context: n_ctx_per_seq (1048) < n_ctx_train (40960) -- the full capacity of the model will not be utilized
llama_context:  CUDA_Host  output buffer size =     0.60 MiB
llama_kv_cache_unified: kv_size = 1280, type_k = 'q4_0', type_v = 'q4_0', n_layer = 36, can_shift = 1, padding = 256
llama_kv_cache_unified:      CUDA0 KV buffer size =    50.62 MiB
llama_kv_cache_unified: KV self size  =   50.62 MiB, K (q4_0):   25.31 MiB, V (q4_0):   25.31 MiB
llama_context:      CUDA0 compute buffer size =   304.75 MiB
llama_context:  CUDA_Host compute buffer size =    10.51 MiB
llama_context: graph nodes  = 1231
llama_context: graph splits = 2
time=2025-07-05T00:24:38.333-04:00 level=INFO source=server.go:637 msg="llama runner started in 60.64 seconds"
[GIN] 2025/07/05 - 00:24:38 | 200 |          1m1s |       127.0.0.1 | POST     "/api/generate"
CUDA error: the resource allocation failed
  current device: 0, in function cublas_handle at C:/a/ollama/ollama/ml/backend/ggml/ggml/src\ggml-cuda/common.cuh:823
  cublasCreate_v2(&cublas_handles[device])
C:\a\ollama\ollama\ml\backend\ggml\ggml\src\ggml-cuda\ggml-cuda.cu:76: CUDA error
time=2025-07-05T00:24:54.932-04:00 level=ERROR source=server.go:807 msg="post predict" error="Post \"http://127.0.0.1:65430/completion\": read tcp 127.0.0.1:65432->127.0.0.1:65430: wsarecv: An existing connection was forcibly closed by the remote host."
[GIN] 2025/07/05 - 00:24:54 | 200 |   12.3861672s |       127.0.0.1 | POST     "/api/chat"
time=2025-07-05T00:24:55.000-04:00 level=ERROR source=server.go:464 msg="llama runner terminated" error="exit status 0xc0000409"
time=2025-07-05T00:27:12.679-04:00 level=INFO source=routes.go:1235 msg="server config" env="map[CUDA_VISIBLE_DEVICES:0 GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:1048 OLLAMA_DEBUG:DEBUG OLLAMA_FLASH_ATTENTION:true OLLAMA_GPU_OVERHEAD:1 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE:q4_0 OLLAMA_LLM_LIBRARY:cuda OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:256 OLLAMA_MODELS:E:\\ollama-models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:true ROCR_VISIBLE_DEVICES:]"
time=2025-07-05T00:27:12.685-04:00 level=INFO source=images.go:476 msg="total blobs: 27"
time=2025-07-05T00:27:12.687-04:00 level=INFO source=images.go:483 msg="total unused blobs removed: 0"
time=2025-07-05T00:27:12.689-04:00 level=INFO source=routes.go:1288 msg="Listening on [::]:11434 (version 0.9.5)"
time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=sched.go:108 msg="starting llm scheduler"
time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs"
time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu_windows.go:167 msg=packages count=1
time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu_windows.go:214 msg="" package=0 cores=6 efficiency=0 threads=12
time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:98 msg="searching for GPU discovery libraries for NVIDIA"
time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=nvml.dll
time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\lib\\ollama\\nvml.dll C:\\Program Files\\Microsoft MPI\\Bin\\nvml.dll C:\\Program Files\\Eclipse Adoptium\\jdk-21.0.3.9-hotspot\\bin\\nvml.dll C:\\WINDOWS\\system32\\nvml.dll C:\\WINDOWS\\nvml.dll C:\\WINDOWS\\System32\\Wbem\\nvml.dll C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\nvml.dll C:\\WINDOWS\\System32\\OpenSSH\\nvml.dll C:\\Program Files (x86)\\oh-my-posh\\bin\\nvml.dll C:\\Program Files\\NVIDIA Corporation\\NVIDIA App\\NvDLISR\\nvml.dll C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvml.dll C:\\Program Files\\dotnet\\nvml.dll C:\\Program Files\\Git\\cmd\\nvml.dll C:\\Program Files\\Docker\\Docker\\resources\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\oh-my-posh\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Launcher\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Microsoft\\WindowsApps\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\nvml.dll C:\\Users\\Sammy\\.cache\\lm-studio\\bin\\nvml.dll c:\\Windows\\System32\\nvml.dll]"
time=2025-07-05T00:27:12.691-04:00 level=DEBUG source=gpu.go:529 msg="skipping PhysX cuda library path" path="C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvml.dll"
time=2025-07-05T00:27:12.691-04:00 level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths="[C:\\WINDOWS\\system32\\nvml.dll c:\\Windows\\System32\\nvml.dll]"
time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:111 msg="nvidia-ml loaded" library=C:\WINDOWS\system32\nvml.dll
time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=nvcuda.dll
time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\lib\\ollama\\nvcuda.dll C:\\Program Files\\Microsoft MPI\\Bin\\nvcuda.dll C:\\Program Files\\Eclipse Adoptium\\jdk-21.0.3.9-hotspot\\bin\\nvcuda.dll C:\\WINDOWS\\system32\\nvcuda.dll C:\\WINDOWS\\nvcuda.dll C:\\WINDOWS\\System32\\Wbem\\nvcuda.dll C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\nvcuda.dll C:\\WINDOWS\\System32\\OpenSSH\\nvcuda.dll C:\\Program Files (x86)\\oh-my-posh\\bin\\nvcuda.dll C:\\Program Files\\NVIDIA Corporation\\NVIDIA App\\NvDLISR\\nvcuda.dll C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvcuda.dll C:\\Program Files\\dotnet\\nvcuda.dll C:\\Program Files\\Git\\cmd\\nvcuda.dll C:\\Program Files\\Docker\\Docker\\resources\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\oh-my-posh\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Launcher\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Microsoft\\WindowsApps\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\nvcuda.dll C:\\Users\\Sammy\\.cache\\lm-studio\\bin\\nvcuda.dll c:\\windows\\system*\\nvcuda.dll]"
time=2025-07-05T00:27:12.715-04:00 level=DEBUG source=gpu.go:529 msg="skipping PhysX cuda library path" path="C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvcuda.dll"
time=2025-07-05T00:27:12.716-04:00 level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths=[C:\WINDOWS\system32\nvcuda.dll]
initializing C:\WINDOWS\system32\nvcuda.dll
dlsym: cuInit - 00007FF806AA1F80
dlsym: cuDriverGetVersion - 00007FF806AA2020
dlsym: cuDeviceGetCount - 00007FF806AA2816
dlsym: cuDeviceGet - 00007FF806AA2810
dlsym: cuDeviceGetAttribute - 00007FF806AA2170
dlsym: cuDeviceGetUuid - 00007FF806AA2822
dlsym: cuDeviceGetName - 00007FF806AA281C
dlsym: cuCtxCreate_v3 - 00007FF806AA2894
dlsym: cuMemGetInfo_v2 - 00007FF806AA2996
dlsym: cuCtxDestroy - 00007FF806AA28A6
calling cuInit
calling cuDriverGetVersion
raw version 0x2f3a
CUDA driver version: 12.9
calling cuDeviceGetCount
device count 1
time=2025-07-05T00:27:12.747-04:00 level=DEBUG source=gpu.go:125 msg="detected GPUs" count=1 library=C:\WINDOWS\system32\nvcuda.dll
[GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] CUDA totalMem 10239mb
[GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] CUDA freeMem 9073mb
[GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] Compute Capability 8.6
time=2025-07-05T00:27:12.874-04:00 level=DEBUG source=amd_windows.go:34 msg="unable to load amdhip64_6.dll, please make sure to upgrade to the latest amd driver: The specified module could not be found."
releasing cuda driver library
releasing nvml library
time=2025-07-05T00:27:12.875-04:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e library=cuda variant=v12 compute=8.6 driver=12.9 name="NVIDIA GeForce RTX 3080" total="10.0 GiB" available="8.9 GiB"

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.9.5

Originally created by @sguergachi on GitHub (Jul 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11303 ### What is the issue? I have tried everything I could find, but I'm stuck with this issue. Whenever I try loading qwen3:8B I run into "CUDA error: the resource allocation failed" even though I seem to have a good amount of VRAM headroom on my RTX 3080 <img width="924" height="830" alt="Image" src="https://github.com/user-attachments/assets/e63fcc65-c386-4cf5-a65a-800cf8702524" /> When I run llama3.1:8b it seems to run fine. ### Relevant log output ```shell llama_model_load: vocab only - skipping tensors time=2025-07-05T00:23:37.685-04:00 level=INFO source=server.go:438 msg="starting llama server" cmd="C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\ollama.exe runner --model E:\\ollama-models\\blobs\\sha256-a3de86cd1c132c822487ededd47a324c50491393e6565cd14bafa40d0b8e686f --ctx-size 1048 --batch-size 512 --n-gpu-layers 37 --threads 6 --flash-attn --kv-cache-type q4_0 --no-mmap --parallel 1 --port 65430" time=2025-07-05T00:23:37.689-04:00 level=INFO source=sched.go:483 msg="loaded runners" count=1 time=2025-07-05T00:23:37.689-04:00 level=INFO source=server.go:598 msg="waiting for llama runner to start responding" time=2025-07-05T00:23:37.690-04:00 level=INFO source=server.go:632 msg="waiting for server to become available" status="llm server error" time=2025-07-05T00:23:37.737-04:00 level=INFO source=runner.go:815 msg="starting go runner" ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no ggml_cuda_init: found 1 CUDA devices: Device 0: NVIDIA GeForce RTX 3080, compute capability 8.6, VMM: yes load_backend: loaded CUDA backend from C:\Users\Sammy\AppData\Local\Programs\Ollama\lib\ollama\ggml-cuda.dll load_backend: loaded CPU backend from C:\Users\Sammy\AppData\Local\Programs\Ollama\lib\ollama\ggml-cpu-haswell.dll time=2025-07-05T00:23:37.856-04:00 level=INFO source=ggml.go:104 msg=system CPU.0.SSE3=1 CPU.0.SSSE3=1 CPU.0.AVX=1 CPU.0.AVX2=1 CPU.0.F16C=1 CPU.0.FMA=1 CPU.0.BMI2=1 CPU.0.LLAMAFILE=1 CPU.1.LLAMAFILE=1 CUDA.0.ARCHS=500,600,610,700,750,800,860,870,890,900,1200 CUDA.0.USE_GRAPHS=1 CUDA.0.PEER_MAX_BATCH_SIZE=128 compiler=cgo(clang) time=2025-07-05T00:23:37.857-04:00 level=INFO source=runner.go:874 msg="Server listening on 127.0.0.1:65430" llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 3080) - 9073 MiB free time=2025-07-05T00:23:37.941-04:00 level=INFO source=server.go:632 msg="waiting for server to become available" status="llm server loading model" llama_model_loader: loaded meta data with 28 key-value pairs and 399 tensors from E:\ollama-models\blobs\sha256-a3de86cd1c132c822487ededd47a324c50491393e6565cd14bafa40d0b8e686f (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 = qwen3 llama_model_loader: - kv 1: general.type str = model llama_model_loader: - kv 2: general.name str = Qwen3 8B llama_model_loader: - kv 3: general.basename str = Qwen3 llama_model_loader: - kv 4: general.size_label str = 8B llama_model_loader: - kv 5: general.license str = apache-2.0 llama_model_loader: - kv 6: qwen3.block_count u32 = 36 llama_model_loader: - kv 7: qwen3.context_length u32 = 40960 llama_model_loader: - kv 8: qwen3.embedding_length u32 = 4096 llama_model_loader: - kv 9: qwen3.feed_forward_length u32 = 12288 llama_model_loader: - kv 10: qwen3.attention.head_count u32 = 32 llama_model_loader: - kv 11: qwen3.attention.head_count_kv u32 = 8 llama_model_loader: - kv 12: qwen3.rope.freq_base f32 = 1000000.000000 llama_model_loader: - kv 13: qwen3.attention.layer_norm_rms_epsilon f32 = 0.000001 llama_model_loader: - kv 14: qwen3.attention.key_length u32 = 128 llama_model_loader: - kv 15: qwen3.attention.value_length u32 = 128 llama_model_loader: - kv 16: tokenizer.ggml.model str = gpt2 llama_model_loader: - kv 17: tokenizer.ggml.pre str = qwen2 llama_model_loader: - kv 18: tokenizer.ggml.tokens arr[str,151936] = ["!", "\"", "#", "$", "%", "&", "'", ... llama_model_loader: - kv 19: tokenizer.ggml.token_type arr[i32,151936] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... llama_model_loader: - kv 20: tokenizer.ggml.merges arr[str,151387] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",... llama_model_loader: - kv 21: tokenizer.ggml.eos_token_id u32 = 151645 llama_model_loader: - kv 22: tokenizer.ggml.padding_token_id u32 = 151643 llama_model_loader: - kv 23: tokenizer.ggml.bos_token_id u32 = 151643 llama_model_loader: - kv 24: tokenizer.ggml.add_bos_token bool = false llama_model_loader: - kv 25: tokenizer.chat_template str = {%- if tools %}\n {{- '<|im_start|>... llama_model_loader: - kv 26: general.quantization_version u32 = 2 llama_model_loader: - kv 27: general.file_type u32 = 15 llama_model_loader: - type f32: 145 tensors llama_model_loader: - type f16: 36 tensors llama_model_loader: - type q4_K: 199 tensors llama_model_loader: - type q6_K: 19 tensors print_info: file format = GGUF V3 (latest) print_info: file type = Q4_K - Medium print_info: file size = 4.86 GiB (5.10 BPW) load: special tokens cache size = 26 load: token to piece cache size = 0.9311 MB print_info: arch = qwen3 print_info: vocab_only = 0 print_info: n_ctx_train = 40960 print_info: n_embd = 4096 print_info: n_layer = 36 print_info: n_head = 32 print_info: n_head_kv = 8 print_info: n_rot = 128 print_info: n_swa = 0 print_info: n_swa_pattern = 1 print_info: n_embd_head_k = 128 print_info: n_embd_head_v = 128 print_info: n_gqa = 4 print_info: n_embd_k_gqa = 1024 print_info: n_embd_v_gqa = 1024 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 = 0.0e+00 print_info: n_ff = 12288 print_info: n_expert = 0 print_info: n_expert_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 = 1 print_info: n_ctx_orig_yarn = 40960 print_info: rope_finetuned = unknown print_info: ssm_d_conv = 0 print_info: ssm_d_inner = 0 print_info: ssm_d_state = 0 print_info: ssm_dt_rank = 0 print_info: ssm_dt_b_c_rms = 0 print_info: model type = 8B print_info: model params = 8.19 B print_info: general.name = Qwen3 8B print_info: vocab type = BPE print_info: n_vocab = 151936 print_info: n_merges = 151387 print_info: BOS token = 151643 '<|endoftext|>' print_info: EOS token = 151645 '<|im_end|>' print_info: EOT token = 151645 '<|im_end|>' print_info: PAD token = 151643 '<|endoftext|>' print_info: LF token = 198 'Ċ' print_info: FIM PRE token = 151659 '<|fim_prefix|>' print_info: FIM SUF token = 151661 '<|fim_suffix|>' print_info: FIM MID token = 151660 '<|fim_middle|>' print_info: FIM PAD token = 151662 '<|fim_pad|>' print_info: FIM REP token = 151663 '<|repo_name|>' print_info: FIM SEP token = 151664 '<|file_sep|>' print_info: EOG token = 151643 '<|endoftext|>' print_info: EOG token = 151645 '<|im_end|>' print_info: EOG token = 151662 '<|fim_pad|>' print_info: EOG token = 151663 '<|repo_name|>' print_info: EOG token = 151664 '<|file_sep|>' print_info: max token length = 256 load_tensors: loading model tensors, this can take a while... (mmap = false) load_tensors: offloading 36 repeating layers to GPU load_tensors: offloading output layer to GPU load_tensors: offloaded 37/37 layers to GPU load_tensors: CPU model buffer size = 333.84 MiB load_tensors: CUDA0 model buffer size = 4643.78 MiB llama_context: constructing llama_context llama_context: n_seq_max = 1 llama_context: n_ctx = 1048 llama_context: n_ctx_per_seq = 1048 llama_context: n_batch = 512 llama_context: n_ubatch = 512 llama_context: causal_attn = 1 llama_context: flash_attn = 1 llama_context: freq_base = 1000000.0 llama_context: freq_scale = 1 llama_context: n_ctx_per_seq (1048) < n_ctx_train (40960) -- the full capacity of the model will not be utilized llama_context: CUDA_Host output buffer size = 0.60 MiB llama_kv_cache_unified: kv_size = 1280, type_k = 'q4_0', type_v = 'q4_0', n_layer = 36, can_shift = 1, padding = 256 llama_kv_cache_unified: CUDA0 KV buffer size = 50.62 MiB llama_kv_cache_unified: KV self size = 50.62 MiB, K (q4_0): 25.31 MiB, V (q4_0): 25.31 MiB llama_context: CUDA0 compute buffer size = 304.75 MiB llama_context: CUDA_Host compute buffer size = 10.51 MiB llama_context: graph nodes = 1231 llama_context: graph splits = 2 time=2025-07-05T00:24:38.333-04:00 level=INFO source=server.go:637 msg="llama runner started in 60.64 seconds" [GIN] 2025/07/05 - 00:24:38 | 200 | 1m1s | 127.0.0.1 | POST "/api/generate" CUDA error: the resource allocation failed current device: 0, in function cublas_handle at C:/a/ollama/ollama/ml/backend/ggml/ggml/src\ggml-cuda/common.cuh:823 cublasCreate_v2(&cublas_handles[device]) C:\a\ollama\ollama\ml\backend\ggml\ggml\src\ggml-cuda\ggml-cuda.cu:76: CUDA error time=2025-07-05T00:24:54.932-04:00 level=ERROR source=server.go:807 msg="post predict" error="Post \"http://127.0.0.1:65430/completion\": read tcp 127.0.0.1:65432->127.0.0.1:65430: wsarecv: An existing connection was forcibly closed by the remote host." [GIN] 2025/07/05 - 00:24:54 | 200 | 12.3861672s | 127.0.0.1 | POST "/api/chat" time=2025-07-05T00:24:55.000-04:00 level=ERROR source=server.go:464 msg="llama runner terminated" error="exit status 0xc0000409" time=2025-07-05T00:27:12.679-04:00 level=INFO source=routes.go:1235 msg="server config" env="map[CUDA_VISIBLE_DEVICES:0 GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:1048 OLLAMA_DEBUG:DEBUG OLLAMA_FLASH_ATTENTION:true OLLAMA_GPU_OVERHEAD:1 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE:q4_0 OLLAMA_LLM_LIBRARY:cuda OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:256 OLLAMA_MODELS:E:\\ollama-models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:true ROCR_VISIBLE_DEVICES:]" time=2025-07-05T00:27:12.685-04:00 level=INFO source=images.go:476 msg="total blobs: 27" time=2025-07-05T00:27:12.687-04:00 level=INFO source=images.go:483 msg="total unused blobs removed: 0" time=2025-07-05T00:27:12.689-04:00 level=INFO source=routes.go:1288 msg="Listening on [::]:11434 (version 0.9.5)" time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=sched.go:108 msg="starting llm scheduler" time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs" time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu_windows.go:167 msg=packages count=1 time=2025-07-05T00:27:12.689-04:00 level=INFO source=gpu_windows.go:214 msg="" package=0 cores=6 efficiency=0 threads=12 time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:98 msg="searching for GPU discovery libraries for NVIDIA" time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=nvml.dll time=2025-07-05T00:27:12.689-04:00 level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\lib\\ollama\\nvml.dll C:\\Program Files\\Microsoft MPI\\Bin\\nvml.dll C:\\Program Files\\Eclipse Adoptium\\jdk-21.0.3.9-hotspot\\bin\\nvml.dll C:\\WINDOWS\\system32\\nvml.dll C:\\WINDOWS\\nvml.dll C:\\WINDOWS\\System32\\Wbem\\nvml.dll C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\nvml.dll C:\\WINDOWS\\System32\\OpenSSH\\nvml.dll C:\\Program Files (x86)\\oh-my-posh\\bin\\nvml.dll C:\\Program Files\\NVIDIA Corporation\\NVIDIA App\\NvDLISR\\nvml.dll C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvml.dll C:\\Program Files\\dotnet\\nvml.dll C:\\Program Files\\Git\\cmd\\nvml.dll C:\\Program Files\\Docker\\Docker\\resources\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\oh-my-posh\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Launcher\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Microsoft\\WindowsApps\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\nvml.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\nvml.dll C:\\Users\\Sammy\\.cache\\lm-studio\\bin\\nvml.dll c:\\Windows\\System32\\nvml.dll]" time=2025-07-05T00:27:12.691-04:00 level=DEBUG source=gpu.go:529 msg="skipping PhysX cuda library path" path="C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvml.dll" time=2025-07-05T00:27:12.691-04:00 level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths="[C:\\WINDOWS\\system32\\nvml.dll c:\\Windows\\System32\\nvml.dll]" time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:111 msg="nvidia-ml loaded" library=C:\WINDOWS\system32\nvml.dll time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=nvcuda.dll time=2025-07-05T00:27:12.713-04:00 level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\lib\\ollama\\nvcuda.dll C:\\Program Files\\Microsoft MPI\\Bin\\nvcuda.dll C:\\Program Files\\Eclipse Adoptium\\jdk-21.0.3.9-hotspot\\bin\\nvcuda.dll C:\\WINDOWS\\system32\\nvcuda.dll C:\\WINDOWS\\nvcuda.dll C:\\WINDOWS\\System32\\Wbem\\nvcuda.dll C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\nvcuda.dll C:\\WINDOWS\\System32\\OpenSSH\\nvcuda.dll C:\\Program Files (x86)\\oh-my-posh\\bin\\nvcuda.dll C:\\Program Files\\NVIDIA Corporation\\NVIDIA App\\NvDLISR\\nvcuda.dll C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvcuda.dll C:\\Program Files\\dotnet\\nvcuda.dll C:\\Program Files\\Git\\cmd\\nvcuda.dll C:\\Program Files\\Docker\\Docker\\resources\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\oh-my-posh\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Python312\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Python\\Launcher\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Microsoft\\WindowsApps\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\nvcuda.dll C:\\Users\\Sammy\\AppData\\Local\\Programs\\Ollama\\nvcuda.dll C:\\Users\\Sammy\\.cache\\lm-studio\\bin\\nvcuda.dll c:\\windows\\system*\\nvcuda.dll]" time=2025-07-05T00:27:12.715-04:00 level=DEBUG source=gpu.go:529 msg="skipping PhysX cuda library path" path="C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common\\nvcuda.dll" time=2025-07-05T00:27:12.716-04:00 level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths=[C:\WINDOWS\system32\nvcuda.dll] initializing C:\WINDOWS\system32\nvcuda.dll dlsym: cuInit - 00007FF806AA1F80 dlsym: cuDriverGetVersion - 00007FF806AA2020 dlsym: cuDeviceGetCount - 00007FF806AA2816 dlsym: cuDeviceGet - 00007FF806AA2810 dlsym: cuDeviceGetAttribute - 00007FF806AA2170 dlsym: cuDeviceGetUuid - 00007FF806AA2822 dlsym: cuDeviceGetName - 00007FF806AA281C dlsym: cuCtxCreate_v3 - 00007FF806AA2894 dlsym: cuMemGetInfo_v2 - 00007FF806AA2996 dlsym: cuCtxDestroy - 00007FF806AA28A6 calling cuInit calling cuDriverGetVersion raw version 0x2f3a CUDA driver version: 12.9 calling cuDeviceGetCount device count 1 time=2025-07-05T00:27:12.747-04:00 level=DEBUG source=gpu.go:125 msg="detected GPUs" count=1 library=C:\WINDOWS\system32\nvcuda.dll [GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] CUDA totalMem 10239mb [GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] CUDA freeMem 9073mb [GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e] Compute Capability 8.6 time=2025-07-05T00:27:12.874-04:00 level=DEBUG source=amd_windows.go:34 msg="unable to load amdhip64_6.dll, please make sure to upgrade to the latest amd driver: The specified module could not be found." releasing cuda driver library releasing nvml library time=2025-07-05T00:27:12.875-04:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-4e1a5fb7-791d-60d6-ad53-758e0ef65b3e library=cuda variant=v12 compute=8.6 driver=12.9 name="NVIDIA GeForce RTX 3080" total="10.0 GiB" available="8.9 GiB" ``` ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.9.5
GiteaMirror added the bug label 2026-04-12 19:31:51 -05:00
Author
Owner

@blakkd commented on GitHub (Jul 7, 2025):

time=2025-07-05T00:27:12.874-04:00 level=DEBUG source=amd_windows.go:34 msg="unable to load amdhip64_6.dll, please make sure to upgrade to the latest amd driver: The specified module could not be found.

Doesn't it simply come from here?

<!-- gh-comment-id:3045606082 --> @blakkd commented on GitHub (Jul 7, 2025): > `time=2025-07-05T00:27:12.874-04:00 level=DEBUG source=amd_windows.go:34 msg="unable to load amdhip64_6.dll, please make sure to upgrade to the latest amd driver: The specified module could not be found.` Doesn't it simply come from here?
Author
Owner

@Stogas commented on GitHub (Jul 7, 2025):

I don't think they're using any AMD hardware..

<!-- gh-comment-id:3046358788 --> @Stogas commented on GitHub (Jul 7, 2025): I don't think they're using any AMD hardware..
Author
Owner

@sguergachi commented on GitHub (Jul 8, 2025):

Running RTX3080 and an i7-8700k

<!-- gh-comment-id:3046972799 --> @sguergachi commented on GitHub (Jul 8, 2025): Running RTX3080 and an i7-8700k
Author
Owner

@blakkd commented on GitHub (Jul 8, 2025):

Oh yeah right sorry didn't pay attention too much attention to the screenshot!

<!-- gh-comment-id:3049076070 --> @blakkd commented on GitHub (Jul 8, 2025): Oh yeah right sorry didn't pay attention too much attention to the screenshot!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7455