[GH-ISSUE #8743] amdgpu not being used although ollama ps states 100% GPU #52184

Closed
opened 2026-04-28 22:26:20 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @bivsk on GitHub (Feb 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8743

What is the issue?

For some reason, Ollama refuses to utilize either of my AMD GPU's.

rocminfo:

# rocminfo
ROCk module is loaded
=====================    
HSA System Attributes    
=====================    
Runtime Version:         1.1
Runtime Ext Version:     1.6
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE                              
System Endianness:       LITTLE                             
Mwaitx:                  DISABLED
DMAbuf Support:          YES

==========               
HSA Agents               
==========               
*******                  
Agent 1                  
*******                  
  Name:                    AMD Ryzen Threadripper 3960X 24-Core Processor
  Uuid:                    CPU-XX                             
  Marketing Name:          AMD Ryzen Threadripper 3960X 24-Core Processor
  Vendor Name:             CPU                                
  Feature:                 None specified                     
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        0(0x0)                             
  Queue Min Size:          0(0x0)                             
  Queue Max Size:          0(0x0)                             
  Queue Type:              MULTI                              
  Node:                    0                                  
  Device Type:             CPU                                
  Cache Info:              
    L1:                      32768(0x8000) KB                   
  Chip ID:                 0(0x0)                             
  ASIC Revision:           0(0x0)                             
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   3800                               
  BDFID:                   0                                  
  Internal Node ID:        0                                  
  Compute Unit:            48                                 
  SIMDs per CU:            0                                  
  Shader Engines:          0                                  
  Shader Arrs. per Eng.:   0                                  
  WatchPts on Addr. Ranges:1                                  
  Memory Properties:       
  Features:                None
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: FINE GRAINED        
      Size:                    131772220(0x7daaf3c) KB            
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED
      Size:                    131772220(0x7daaf3c) KB            
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 3                   
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    131772220(0x7daaf3c) KB            
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 4                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    131772220(0x7daaf3c) KB            
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
  ISA Info:                
*******                  
Agent 2                  
*******                  
  Name:                    gfx1010                            
  Uuid:                    GPU-XX                             
  Marketing Name:          AMD Radeon RX 5600 XT              
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                          
  Queue Min Size:          64(0x40)                           
  Queue Max Size:          131072(0x20000)                    
  Queue Type:              MULTI                              
  Node:                    1                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      16(0x10) KB                        
    L2:                      4096(0x1000) KB                    
  Chip ID:                 29471(0x731f)                      
  ASIC Revision:           2(0x2)                             
  Cacheline Size:          128(0x80)                          
  Max Clock Freq. (MHz):   1650                               
  BDFID:                   8960                               
  Internal Node ID:        1                                  
  Compute Unit:            36                                 
  SIMDs per CU:            2                                  
  Shader Engines:          2                                  
  Shader Arrs. per Eng.:   2                                  
  WatchPts on Addr. Ranges:4                                  
  Coherent Host Access:    FALSE                              
  Memory Properties:       
  Features:                KERNEL_DISPATCH 
  Fast F16 Operation:      TRUE                               
  Wavefront Size:          32(0x20)                           
  Workgroup Max Size:      1024(0x400)                        
  Workgroup Max Size per Dimension:
    x                        1024(0x400)                        
    y                        1024(0x400)                        
    z                        1024(0x400)                        
  Max Waves Per CU:        40(0x28)                           
  Max Work-item Per CU:    1280(0x500)                        
  Grid Max Size:           4294967295(0xffffffff)             
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)             
    y                        4294967295(0xffffffff)             
    z                        4294967295(0xffffffff)             
  Max fbarriers/Workgrp:   32                                 
  Packet Processor uCode:: 151                                
  SDMA engine uCode::      35                                 
  IOMMU Support::          None                               
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    6275072(0x5fc000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED
      Size:                    6275072(0x5fc000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 3                   
      Segment:                 GROUP                              
      Size:                    64(0x40) KB                        
      Allocatable:             FALSE                              
      Alloc Granule:           0KB                                
      Alloc Recommended Granule:0KB                                
      Alloc Alignment:         0KB                                
      Accessible by all:       FALSE                              
  ISA Info:                
    ISA 1                    
      Name:                    amdgcn-amd-amdhsa--gfx1010:xnack-  
      Machine Models:          HSA_MACHINE_MODEL_LARGE            
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Size:      1024(0x400)                        
      Workgroup Max Size per Dimension:
        x                        1024(0x400)                        
        y                        1024(0x400)                        
        z                        1024(0x400)                        
      Grid Max Size:           4294967295(0xffffffff)             
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)             
        y                        4294967295(0xffffffff)             
        z                        4294967295(0xffffffff)             
      FBarrier Max Size:       32                                 
*******                  
Agent 3                  
*******                  
  Name:                    gfx1030                            
  Uuid:                    GPU-d9d22422ae1b7b8c               
  Marketing Name:          AMD Radeon RX 6900 XT              
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                          
  Queue Min Size:          64(0x40)                           
  Queue Max Size:          131072(0x20000)                    
  Queue Type:              MULTI                              
  Node:                    2                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      16(0x10) KB                        
    L2:                      4096(0x1000) KB                    
    L3:                      131072(0x20000) KB                 
  Chip ID:                 29631(0x73bf)                      
  ASIC Revision:           1(0x1)                             
  Cacheline Size:          128(0x80)                          
  Max Clock Freq. (MHz):   2660                               
  BDFID:                   19968                              
  Internal Node ID:        2                                  
  Compute Unit:            80                                 
  SIMDs per CU:            2                                  
  Shader Engines:          4                                  
  Shader Arrs. per Eng.:   2                                  
  WatchPts on Addr. Ranges:4                                  
  Coherent Host Access:    FALSE                              
  Memory Properties:       
  Features:                KERNEL_DISPATCH 
  Fast F16 Operation:      TRUE                               
  Wavefront Size:          32(0x20)                           
  Workgroup Max Size:      1024(0x400)                        
  Workgroup Max Size per Dimension:
    x                        1024(0x400)                        
    y                        1024(0x400)                        
    z                        1024(0x400)                        
  Max Waves Per CU:        32(0x20)                           
  Max Work-item Per CU:    1024(0x400)                        
  Grid Max Size:           4294967295(0xffffffff)             
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)             
    y                        4294967295(0xffffffff)             
    z                        4294967295(0xffffffff)             
  Max fbarriers/Workgrp:   32                                 
  Packet Processor uCode:: 120                                
  SDMA engine uCode::      85                                 
  IOMMU Support::          None                               
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    16760832(0xffc000) KB              
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED
      Size:                    16760832(0xffc000) KB              
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 3                   
      Segment:                 GROUP                              
      Size:                    64(0x40) KB                        
      Allocatable:             FALSE                              
      Alloc Granule:           0KB                                
      Alloc Recommended Granule:0KB                                
      Alloc Alignment:         0KB                                
      Accessible by all:       FALSE                              
  ISA Info:                
    ISA 1                    
      Name:                    amdgcn-amd-amdhsa--gfx1030         
      Machine Models:          HSA_MACHINE_MODEL_LARGE            
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Size:      1024(0x400)                        
      Workgroup Max Size per Dimension:
        x                        1024(0x400)                        
        y                        1024(0x400)                        
        z                        1024(0x400)                        
      Grid Max Size:           4294967295(0xffffffff)             
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)             
        y                        4294967295(0xffffffff)             
        z                        4294967295(0xffffffff)             
      FBarrier Max Size:       32                                 

Here are logs with OLLAMA_DEBUG=1
# journalctl -b -u ollama
For some reason, Ollama refuses to utilize either of my AMD GPU's.

Jan 31 19:32:23 robin systemd[1]: Started Ollama Service.
Jan 31 19:32:23 robin ollama[4854]: 2025/01/31 19:32:23 routes.go:1186: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION:10.3.0 HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
time=2025-01-31T19:32:23.215-05:00 level=INFO source=images.go:432 msg="total blobs: 13"
time=2025-01-31T19:32:23.215-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:        export GIN_MODE=release
 - using code:        gin.SetMode(gin.ReleaseMode)
time=2025-01-31T19:32:23.217-05:00 level=INFO source=gpu.go:218 msg="looking for compatible GPUs"
time=2025-01-31T19:32:23.230-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
time=2025-01-31T19:32:23.233-05:00 level=INFO source=amd_linux.go:389 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION=10.3.0
time=2025-01-31T19:32:23.233-05:00 level=INFO source=amd_linux.go:389 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION=10.3.0
time=2025-01-31T19:32:23.233-05:00 level=INFO source=types.go:130 msg="inference compute" id=0 library=rocm variant="" compute=gfx1010 driver=0.0 name=1002:731f total="6.0 GiB" available="6.0 GiB"
time=2025-01-31T19:32:23.233-05:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB"
opping Ollama Service...
lama.service: Deactivated successfully.
opped Ollama Service.
arted Ollama Service.
 2025/01/31 19:56:25 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
 time=2025-01-31T19:56:25.183-05:00 level=INFO source=images.go:432 msg="total blobs: 13"
 time=2025-01-31T19:56:25.184-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
 [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
 [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
  - using env:        export GIN_MODE=release
  - using code:        gin.SetMode(gin.ReleaseMode)
 time=2025-01-31T19:56:25.184-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )"
 time=2025-01-31T19:56:25.185-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[cpu rocm]"
 time=2025-01-31T19:56:25.186-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs"
 time=2025-01-31T19:56:25.196-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
 time=2025-01-31T19:56:25.199-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=0 gpu_type=gfx1010
 time=2025-01-31T19:56:25.199-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030
 time=2025-01-31T19:56:25.200-05:00 level=INFO source=types.go:131 msg="inference compute" id=0 library=rocm variant="" compute=gfx1010 driver=0.0 name=1002:731f total="6.0 GiB" available="5.9 GiB"
 time=2025-01-31T19:56:25.200-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB"
 [GIN] 2025/01/31 - 19:56:35 | 200 |     495.192µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 19:56:35 | 200 |     264.762µs |       127.0.0.1 | GET      "/api/ps"
 [GIN] 2025/01/31 - 19:56:58 | 200 |     3.31792ms |       127.0.0.1 | GET      "/api/tags"
 [GIN] 2025/01/31 - 19:56:58 | 200 |     144.896µs |       127.0.0.1 | GET      "/api/version"
 time=2025-01-31T19:57:10.214-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16702410752 required="14.3 GiB"
 time=2025-01-31T19:57:10.214-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="116.1 GiB" free_swap="0 B"
 time=2025-01-31T19:57:10.215-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.6 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB"
 time=2025-01-31T19:57:10.216-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 39549"
 time=2025-01-31T19:57:10.217-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 35981"
 time=2025-01-31T19:57:10.218-05:00 level=INFO source=sched.go:449 msg="loaded runners" count=1
 time=2025-01-31T19:57:10.218-05:00 level=INFO source=server.go:555 msg="waiting for llama runner to start responding"
 time=2025-01-31T19:57:10.218-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server error"
 time=2025-01-31T19:57:10.231-05:00 level=INFO source=runner.go:936 msg="starting go runner"
 time=2025-01-31T19:57:10.231-05:00 level=INFO source=runner.go:937 msg=system info="CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | cgo(clang)" threads=24
 time=2025-01-31T19:57:10.232-05:00 level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:35981"
 llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (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              = llama
 llama_model_loader: - kv   1:                               general.type str              = model
 llama_model_loader: - kv   2:                               general.name str              = Mistral Small 24B Instruct 2501
 llama_model_loader: - kv   3:                            general.version str              = 2501
 llama_model_loader: - kv   4:                           general.finetune str              = Instruct
 llama_model_loader: - kv   5:                           general.basename str              = Mistral-Small
 llama_model_loader: - kv   6:                         general.size_label str              = 24B
 llama_model_loader: - kv   7:                            general.license str              = apache-2.0
 llama_model_loader: - kv   8:                   general.base_model.count u32              = 1
 llama_model_loader: - kv   9:                  general.base_model.0.name str              = Mistral Small Base 2501
 llama_model_loader: - kv  10:               general.base_model.0.version str              = 2501
 llama_model_loader: - kv  11:          general.base_model.0.organization str              = Mistralai
 llama_model_loader: - kv  12:              general.base_model.0.repo_url str              = https://huggingface.co/mistralai/Mist...
 llama_model_loader: - kv  13:                          general.languages arr[str,10]      = ["en", "fr", "de", "es", "it", "pt", ...
 llama_model_loader: - kv  14:                          llama.block_count u32              = 40
 llama_model_loader: - kv  15:                       llama.context_length u32              = 32768
 llama_model_loader: - kv  16:                     llama.embedding_length u32              = 5120
 llama_model_loader: - kv  17:                  llama.feed_forward_length u32              = 32768
 llama_model_loader: - kv  18:                 llama.attention.head_count u32              = 32
 llama_model_loader: - kv  19:              llama.attention.head_count_kv u32              = 8
 llama_model_loader: - kv  20:                       llama.rope.freq_base f32              = 100000000.000000
 llama_model_loader: - kv  21:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
 llama_model_loader: - kv  22:                 llama.attention.key_length u32              = 128
 llama_model_loader: - kv  23:               llama.attention.value_length u32              = 128
 llama_model_loader: - kv  24:                          general.file_type u32              = 15
 llama_model_loader: - kv  25:                           llama.vocab_size u32              = 131072
 llama_model_loader: - kv  26:                 llama.rope.dimension_count u32              = 128
 llama_model_loader: - kv  27:                       tokenizer.ggml.model str              = gpt2
 llama_model_loader: - kv  28:                         tokenizer.ggml.pre str              = qwen2
 llama_model_loader: - kv  29:                      tokenizer.ggml.tokens arr[str,131072]  = ["<unk>", "<s>", "</s>", "[INST]", "[...
 llama_model_loader: - kv  30:                  tokenizer.ggml.token_type arr[i32,131072]  = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
 [132B blob data]
 llama_model_loader: - kv  32:                tokenizer.ggml.bos_token_id u32              = 1
 llama_model_loader: - kv  33:                tokenizer.ggml.eos_token_id u32              = 2
 llama_model_loader: - kv  34:            tokenizer.ggml.unknown_token_id u32              = 0
 llama_model_loader: - kv  35:               tokenizer.ggml.add_bos_token bool             = true
 llama_model_loader: - kv  36:               tokenizer.ggml.add_eos_token bool             = false
 llama_model_loader: - kv  37:                    tokenizer.chat_template str              = {{ bos_token }}{% for message in mess...
 llama_model_loader: - kv  38:            tokenizer.ggml.add_space_prefix bool             = false
 llama_model_loader: - kv  39:               general.quantization_version u32              = 2
 llama_model_loader: - type  f32:   81 tensors
 llama_model_loader: - type q4_K:  241 tensors
 llama_model_loader: - type q6_K:   41 tensors
 time=2025-01-31T19:57:10.470-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server loading model"
 llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
 llm_load_vocab: special tokens cache size = 1000
 llm_load_vocab: token to piece cache size = 0.8498 MB
 llm_load_print_meta: format           = GGUF V3 (latest)
 llm_load_print_meta: arch             = llama
 llm_load_print_meta: vocab type       = BPE
 llm_load_print_meta: n_vocab          = 131072
 llm_load_print_meta: n_merges         = 269443
 llm_load_print_meta: vocab_only       = 0
 llm_load_print_meta: n_ctx_train      = 32768
 llm_load_print_meta: n_embd           = 5120
 llm_load_print_meta: n_layer          = 40
 llm_load_print_meta: n_head           = 32
 llm_load_print_meta: n_head_kv        = 8
 llm_load_print_meta: n_rot            = 128
 llm_load_print_meta: n_swa            = 0
 llm_load_print_meta: n_embd_head_k    = 128
 llm_load_print_meta: n_embd_head_v    = 128
 llm_load_print_meta: n_gqa            = 4
 llm_load_print_meta: n_embd_k_gqa     = 1024
 llm_load_print_meta: n_embd_v_gqa     = 1024
 llm_load_print_meta: f_norm_eps       = 0.0e+00
 llm_load_print_meta: f_norm_rms_eps   = 1.0e-05
 llm_load_print_meta: f_clamp_kqv      = 0.0e+00
 llm_load_print_meta: f_max_alibi_bias = 0.0e+00
 llm_load_print_meta: f_logit_scale    = 0.0e+00
 llm_load_print_meta: n_ff             = 32768
 llm_load_print_meta: n_expert         = 0
 llm_load_print_meta: n_expert_used    = 0
 llm_load_print_meta: causal attn      = 1
 llm_load_print_meta: pooling type     = 0
 llm_load_print_meta: rope type        = 0
 llm_load_print_meta: rope scaling     = linear
 llm_load_print_meta: freq_base_train  = 100000000.0
 llm_load_print_meta: freq_scale_train = 1
 llm_load_print_meta: n_ctx_orig_yarn  = 32768
 llm_load_print_meta: rope_finetuned   = unknown
 llm_load_print_meta: ssm_d_conv       = 0
 llm_load_print_meta: ssm_d_inner      = 0
 llm_load_print_meta: ssm_d_state      = 0
 llm_load_print_meta: ssm_dt_rank      = 0
 llm_load_print_meta: ssm_dt_b_c_rms   = 0
 llm_load_print_meta: model type       = 13B
 llm_load_print_meta: model ftype      = Q4_K - Medium
 llm_load_print_meta: model params     = 23.57 B
 llm_load_print_meta: model size       = 13.34 GiB (4.86 BPW)
 llm_load_print_meta: general.name     = Mistral Small 24B Instruct 2501
 llm_load_print_meta: BOS token        = 1 '<s>'
 llm_load_print_meta: EOS token        = 2 '</s>'
 llm_load_print_meta: UNK token        = 0 '<unk>'
 llm_load_print_meta: LF token         = 1196 'Ä'
 llm_load_print_meta: EOG token        = 2 '</s>'
 llm_load_print_meta: max token length = 150
 [GIN] 2025/01/31 - 19:57:26 | 200 |      29.451µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 19:57:26 | 200 |      51.722µs |       127.0.0.1 | GET      "/api/ps"
 [GIN] 2025/01/31 - 19:57:29 | 200 |      48.172µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 19:57:29 | 200 |      40.351µs |       127.0.0.1 | GET      "/api/ps"
 llm_load_tensors:   CPU_Mapped model buffer size = 13662.36 MiB
 llama_new_context_with_model: n_seq_max     = 1
 llama_new_context_with_model: n_ctx         = 2048
 llama_new_context_with_model: n_ctx_per_seq = 2048
 llama_new_context_with_model: n_batch       = 512
 llama_new_context_with_model: n_ubatch      = 512
 llama_new_context_with_model: flash_attn    = 0
 llama_new_context_with_model: freq_base     = 100000000.0
 llama_new_context_with_model: freq_scale    = 1
 llama_new_context_with_model: n_ctx_per_seq (2048) < n_ctx_train (32768) -- the full capacity of the model will not be utilized
 llama_kv_cache_init: kv_size = 2048, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 40, can_shift = 1
 llama_kv_cache_init:        CPU KV buffer size =   320.00 MiB
 llama_new_context_with_model: KV self size  =  320.00 MiB, K (f16):  160.00 MiB, V (f16):  160.00 MiB
 llama_new_context_with_model:        CPU  output buffer size =     0.52 MiB
 llama_new_context_with_model:        CPU compute buffer size =   266.00 MiB
 llama_new_context_with_model: graph nodes  = 1286
 llama_new_context_with_model: graph splits = 1
 time=2025-01-31T19:57:38.563-05:00 level=INFO source=server.go:594 msg="llama runner started in 28.35 seconds"
 llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (version GGUF V3 (latest))
 llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
 llama_model_loader: - type  f32:   81 tensors
 llama_model_loader: - type q4_K:  241 tensors
 llama_model_loader: - type q6_K:   41 tensors
 llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
 llm_load_vocab: special tokens cache size = 1000
 llm_load_vocab: token to piece cache size = 0.8498 MB
 llm_load_print_meta: format           = GGUF V3 (latest)
 llm_load_print_meta: arch             = llama
 llm_load_print_meta: vocab type       = BPE
 llm_load_print_meta: n_vocab          = 131072
 llm_load_print_meta: n_merges         = 269443
 llm_load_print_meta: vocab_only       = 1
 llm_load_print_meta: model type       = ?B
 llm_load_print_meta: model ftype      = all F32
 llm_load_print_meta: model params     = 23.57 B
 llm_load_print_meta: model size       = 13.34 GiB (4.86 BPW)
 llm_load_print_meta: general.name     = Mistral Small 24B Instruct 2501
 llm_load_print_meta: BOS token        = 1 '<s>'
 llm_load_print_meta: EOS token        = 2 '</s>'
 llm_load_print_meta: UNK token        = 0 '<unk>'
 llm_load_print_meta: LF token         = 1196 'Ä'
 llm_load_print_meta: EOG token        = 2 '</s>'
 llm_load_print_meta: max token length = 150
 llama_model_load: vocab only - skipping tensors
 [GIN] 2025/01/31 - 19:58:02 | 200 | 51.968581883s |       127.0.0.1 | POST     "/api/chat"
 [GIN] 2025/01/31 - 20:00:18 | 200 |         2m55s |       127.0.0.1 | POST     "/api/chat"
 [GIN] 2025/01/31 - 20:00:46 | 200 | 27.492712468s |       127.0.0.1 | POST     "/api/chat"
 [GIN] 2025/01/31 - 20:01:21 | 200 | 34.971304231s |       127.0.0.1 | POST     "/api/chat"
opping Ollama Service...
lama.service: Deactivated successfully.
opped Ollama Service.
lama.service: Consumed 1h 28min 18.833s CPU time, 14G memory peak.
arted Ollama Service.
 2025/01/31 20:04:22 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES:GPU-d9d22422ae1b7b8c http_proxy: https_proxy: no_proxy:]"
 time=2025-01-31T20:04:22.742-05:00 level=INFO source=images.go:432 msg="total blobs: 13"
 time=2025-01-31T20:04:22.742-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
 [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
 [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
  - using env:        export GIN_MODE=release
  - using code:        gin.SetMode(gin.ReleaseMode)
 time=2025-01-31T20:04:22.743-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )"
 time=2025-01-31T20:04:22.743-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[cpu rocm]"
 time=2025-01-31T20:04:22.743-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs"
 time=2025-01-31T20:04:22.754-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
 time=2025-01-31T20:04:22.755-05:00 level=INFO source=amd_linux.go:333 msg="filtering out device per user request" id=0 visible_devices=[GPU-d9d22422ae1b7b8c]
 time=2025-01-31T20:04:22.757-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030
 time=2025-01-31T20:04:22.757-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB"
 [GIN] 2025/01/31 - 20:05:02 | 200 |      44.184µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 20:05:02 | 200 |     245.709µs |       127.0.0.1 | GET      "/api/ps"
 [GIN] 2025/01/31 - 20:05:12 | 200 |      22.781µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 20:05:12 | 200 |    17.11868ms |       127.0.0.1 | POST     "/api/show"
 time=2025-01-31T20:05:12.555-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16715296768 required="14.3 GiB"
 time=2025-01-31T20:05:12.555-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="102.2 GiB" free_swap="0 B"
 time=2025-01-31T20:05:12.556-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.6 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB"
 time=2025-01-31T20:05:12.558-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 32789"
 time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 36337"
 time=2025-01-31T20:05:12.559-05:00 level=INFO source=sched.go:449 msg="loaded runners" count=1
 time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:555 msg="waiting for llama runner to start responding"
 time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server error"
 time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:936 msg="starting go runner"
 time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:937 msg=system info="CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | cgo(clang)" threads=24
 time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:36337"
 llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (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              = llama
 llama_model_loader: - kv   1:                               general.type str              = model
 llama_model_loader: - kv   2:                               general.name str              = Mistral Small 24B Instruct 2501
 llama_model_loader: - kv   3:                            general.version str              = 2501
 llama_model_loader: - kv   4:                           general.finetune str              = Instruct
 llama_model_loader: - kv   5:                           general.basename str              = Mistral-Small
 llama_model_loader: - kv   6:                         general.size_label str              = 24B
 llama_model_loader: - kv   7:                            general.license str              = apache-2.0
 llama_model_loader: - kv   8:                   general.base_model.count u32              = 1
 llama_model_loader: - kv   9:                  general.base_model.0.name str              = Mistral Small Base 2501
 llama_model_loader: - kv  10:               general.base_model.0.version str              = 2501
 llama_model_loader: - kv  11:          general.base_model.0.organization str              = Mistralai
 llama_model_loader: - kv  12:              general.base_model.0.repo_url str              = https://huggingface.co/mistralai/Mist...
 llama_model_loader: - kv  13:                          general.languages arr[str,10]      = ["en", "fr", "de", "es", "it", "pt", ...
 llama_model_loader: - kv  14:                          llama.block_count u32              = 40
 llama_model_loader: - kv  15:                       llama.context_length u32              = 32768
 llama_model_loader: - kv  16:                     llama.embedding_length u32              = 5120
 llama_model_loader: - kv  17:                  llama.feed_forward_length u32              = 32768
 llama_model_loader: - kv  18:                 llama.attention.head_count u32              = 32
 llama_model_loader: - kv  19:              llama.attention.head_count_kv u32              = 8
 llama_model_loader: - kv  20:                       llama.rope.freq_base f32              = 100000000.000000
 llama_model_loader: - kv  21:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
 llama_model_loader: - kv  22:                 llama.attention.key_length u32              = 128
 llama_model_loader: - kv  23:               llama.attention.value_length u32              = 128
 llama_model_loader: - kv  24:                          general.file_type u32              = 15
 llama_model_loader: - kv  25:                           llama.vocab_size u32              = 131072
 llama_model_loader: - kv  26:                 llama.rope.dimension_count u32              = 128
 llama_model_loader: - kv  27:                       tokenizer.ggml.model str              = gpt2
 llama_model_loader: - kv  28:                         tokenizer.ggml.pre str              = qwen2
 llama_model_loader: - kv  29:                      tokenizer.ggml.tokens arr[str,131072]  = ["<unk>", "<s>", "</s>", "[INST]", "[...
 llama_model_loader: - kv  30:                  tokenizer.ggml.token_type arr[i32,131072]  = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
 [132B blob data]
 llama_model_loader: - kv  32:                tokenizer.ggml.bos_token_id u32              = 1
 llama_model_loader: - kv  33:                tokenizer.ggml.eos_token_id u32              = 2
 llama_model_loader: - kv  34:            tokenizer.ggml.unknown_token_id u32              = 0
 llama_model_loader: - kv  35:               tokenizer.ggml.add_bos_token bool             = true
 llama_model_loader: - kv  36:               tokenizer.ggml.add_eos_token bool             = false
 llama_model_loader: - kv  37:                    tokenizer.chat_template str              = {{ bos_token }}{% for message in mess...
 llama_model_loader: - kv  38:            tokenizer.ggml.add_space_prefix bool             = false
 llama_model_loader: - kv  39:               general.quantization_version u32              = 2
 llama_model_loader: - type  f32:   81 tensors
 llama_model_loader: - type q4_K:  241 tensors
 llama_model_loader: - type q6_K:   41 tensors
 time=2025-01-31T20:05:12.811-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server loading model"
 llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
 llm_load_vocab: special tokens cache size = 1000
 llm_load_vocab: token to piece cache size = 0.8498 MB
 llm_load_print_meta: format           = GGUF V3 (latest)
 llm_load_print_meta: arch             = llama
 llm_load_print_meta: vocab type       = BPE
 llm_load_print_meta: n_vocab          = 131072
 llm_load_print_meta: n_merges         = 269443
 llm_load_print_meta: vocab_only       = 0
 llm_load_print_meta: n_ctx_train      = 32768
 llm_load_print_meta: n_embd           = 5120
 llm_load_print_meta: n_layer          = 40
 llm_load_print_meta: n_head           = 32
 llm_load_print_meta: n_head_kv        = 8
 llm_load_print_meta: n_rot            = 128
 llm_load_print_meta: n_swa            = 0
 llm_load_print_meta: n_embd_head_k    = 128
 llm_load_print_meta: n_embd_head_v    = 128
 llm_load_print_meta: n_gqa            = 4
 llm_load_print_meta: n_embd_k_gqa     = 1024
 llm_load_print_meta: n_embd_v_gqa     = 1024
 llm_load_print_meta: f_norm_eps       = 0.0e+00
 llm_load_print_meta: f_norm_rms_eps   = 1.0e-05
 llm_load_print_meta: f_clamp_kqv      = 0.0e+00
 llm_load_print_meta: f_max_alibi_bias = 0.0e+00
 llm_load_print_meta: f_logit_scale    = 0.0e+00
 llm_load_print_meta: n_ff             = 32768
 llm_load_print_meta: n_expert         = 0
 llm_load_print_meta: n_expert_used    = 0
 llm_load_print_meta: causal attn      = 1
 llm_load_print_meta: pooling type     = 0
 llm_load_print_meta: rope type        = 0
 llm_load_print_meta: rope scaling     = linear
 llm_load_print_meta: freq_base_train  = 100000000.0
 llm_load_print_meta: freq_scale_train = 1
 llm_load_print_meta: n_ctx_orig_yarn  = 32768
 llm_load_print_meta: rope_finetuned   = unknown
 llm_load_print_meta: ssm_d_conv       = 0
 llm_load_print_meta: ssm_d_inner      = 0
 llm_load_print_meta: ssm_d_state      = 0
 llm_load_print_meta: ssm_dt_rank      = 0
 llm_load_print_meta: ssm_dt_b_c_rms   = 0
 llm_load_print_meta: model type       = 13B
 llm_load_print_meta: model ftype      = Q4_K - Medium
 llm_load_print_meta: model params     = 23.57 B
 llm_load_print_meta: model size       = 13.34 GiB (4.86 BPW)
 llm_load_print_meta: general.name     = Mistral Small 24B Instruct 2501
 llm_load_print_meta: BOS token        = 1 '<s>'
 llm_load_print_meta: EOS token        = 2 '</s>'
 llm_load_print_meta: UNK token        = 0 '<unk>'
 llm_load_print_meta: LF token         = 1196 'Ä'
 llm_load_print_meta: EOG token        = 2 '</s>'
 llm_load_print_meta: max token length = 150
 llm_load_tensors:   CPU_Mapped model buffer size = 13662.36 MiB
 llama_new_context_with_model: n_seq_max     = 1
 llama_new_context_with_model: n_ctx         = 2048
 llama_new_context_with_model: n_ctx_per_seq = 2048
 llama_new_context_with_model: n_batch       = 512
 llama_new_context_with_model: n_ubatch      = 512
 llama_new_context_with_model: flash_attn    = 0
 llama_new_context_with_model: freq_base     = 100000000.0
 llama_new_context_with_model: freq_scale    = 1
 llama_new_context_with_model: n_ctx_per_seq (2048) < n_ctx_train (32768) -- the full capacity of the model will not be utilized
 llama_kv_cache_init: kv_size = 2048, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 40, can_shift = 1
 llama_kv_cache_init:        CPU KV buffer size =   320.00 MiB
 llama_new_context_with_model: KV self size  =  320.00 MiB, K (f16):  160.00 MiB, V (f16):  160.00 MiB
 llama_new_context_with_model:        CPU  output buffer size =     0.52 MiB
 llama_new_context_with_model:        CPU compute buffer size =   266.00 MiB
 llama_new_context_with_model: graph nodes  = 1286
 llama_new_context_with_model: graph splits = 1
 time=2025-01-31T20:05:14.316-05:00 level=INFO source=server.go:594 msg="llama runner started in 1.76 seconds"
 [GIN] 2025/01/31 - 20:05:14 | 200 |  1.854387471s |       127.0.0.1 | POST     "/api/generate"
 llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (version GGUF V3 (latest))
 llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
 llama_model_loader: - type q4_K:  241 tensors
 llama_model_loader: - type q6_K:   41 tensors
 llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
 llm_load_vocab: special tokens cache size = 1000
 llm_load_vocab: token to piece cache size = 0.8498 MB
 llm_load_print_meta: format           = GGUF V3 (latest)
 llm_load_print_meta: arch             = llama
 llm_load_print_meta: vocab type       = BPE
 llm_load_print_meta: n_vocab          = 131072
 llm_load_print_meta: n_merges         = 269443
 llm_load_print_meta: vocab_only       = 1
 llm_load_print_meta: model type       = ?B
 llm_load_print_meta: model ftype      = all F32
 llm_load_print_meta: model params     = 23.57 B
 llm_load_print_meta: model size       = 13.34 GiB (4.86 BPW)
 llm_load_print_meta: general.name     = Mistral Small 24B Instruct 2501
 llm_load_print_meta: BOS token        = 1 '<s>'
 llm_load_print_meta: EOS token        = 2 '</s>'
 llm_load_print_meta: UNK token        = 0 '<unk>'
 llm_load_print_meta: LF token         = 1196 'Ä'
 llm_load_print_meta: EOG token        = 2 '</s>'
 llm_load_print_meta: max token length = 150
 llama_model_load: vocab only - skipping tensors
 [GIN] 2025/01/31 - 20:08:18 | 200 |         2m46s |       127.0.0.1 | POST     "/api/chat"
opping Ollama Service...
lama.service: Deactivated successfully.
opped Ollama Service.
lama.service: Consumed 1h 5min 32.261s CPU time, 561.7M memory peak.
arted Ollama Service.
 2025/01/31 20:10:11 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:true OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES:GPU-d9d22422ae1b7b8c http_proxy: https_proxy: no_proxy:]"
 time=2025-01-31T20:10:11.261-05:00 level=INFO source=images.go:432 msg="total blobs: 13"
 time=2025-01-31T20:10:11.262-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
 [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
 [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
  - using env:        export GIN_MODE=release
  - using code:        gin.SetMode(gin.ReleaseMode)
 time=2025-01-31T20:10:11.263-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )"
 time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=common.go:80 msg="runners located" dir=/usr/lib/ollama/runners
 time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server
 time=2025-01-31T20:10:11.263-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[rocm cpu]"
 time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=routes.go:1268 msg="Override detection logic by setting OLLAMA_LLM_LIBRARY"
 time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=sched.go:105 msg="starting llm scheduler"
 time=2025-01-31T20:10:11.263-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs"
 time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:99 msg="searching for GPU discovery libraries for NVIDIA"
 time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:517 msg="Searching for GPU library" name=libcuda.so*
 time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:543 msg="gpu library search" globs="[/usr/lib/ollama/libcuda.so* /usr/lib/ollama/libcuda.so* /libcuda.so* /usr/local/cuda*/targets/*/lib/libcuda.so* /usr/lib/*-linux-gnu/nvidia/current/libcuda.so* /usr/lib/*-linux-gnu/libcuda.so* /usr/lib/wsl/lib/libcuda.so* /usr/lib/wsl/drivers/*/libcuda.so* /opt/cuda/lib*/libcuda.so* /usr/local/cuda/lib*/libcuda.so* /usr/lib*/libcuda.so* /usr/local/lib*/libcuda.so*]"
 time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:576 msg="discovered GPU libraries" paths=[]
 time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:517 msg="Searching for GPU library" name=libcudart.so*
 time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:543 msg="gpu library search" globs="[/usr/lib/ollama/libcudart.so* /usr/lib/ollama/libcudart.so* /libcudart.so* /usr/lib/ollama/libcudart.so* /usr/lib/ollama/libcudart.so* /usr/local/cuda/lib64/libcudart.so* /usr/lib/x86_64-linux-gnu/nvidia/current/libcudart.so* /usr/lib/x86_64-linux-gnu/libcudart.so* /usr/lib/wsl/lib/libcudart.so* /usr/lib/wsl/drivers/*/libcudart.so* /opt/cuda/lib64/libcudart.so* /usr/local/cuda*/targets/aarch64-linux/lib/libcudart.so* /usr/lib/aarch64-linux-gnu/nvidia/current/libcudart.so* /usr/lib/aarch64-linux-gnu/libcudart.so* /usr/local/cuda/lib*/libcudart.so* /usr/lib*/libcudart.so* /usr/local/lib*/libcudart.so*]"
 time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=gpu.go:576 msg="discovered GPU libraries" paths=[]
 time=2025-01-31T20:10:11.281-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
 time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/0/properties"
 time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:122 msg="detected CPU /sys/class/kfd/kfd/topology/nodes/0/properties"
 time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/1/properties"
 time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:207 msg="mapping amdgpu to drm sysfs nodes" amdgpu=/sys/class/kfd/kfd/topology/nodes/1/properties vendor=4098 device=29471 unique_id=0
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:241 msg=matched amdgpu=/sys/class/kfd/kfd/topology/nodes/1/properties drm=/sys/class/drm/card0/device
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:319 msg="amdgpu memory" gpu=0 total="6.0 GiB"
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:320 msg="amdgpu memory" gpu=0 available="5.9 GiB"
 time=2025-01-31T20:10:11.282-05:00 level=INFO source=amd_linux.go:333 msg="filtering out device per user request" id=0 visible_devices=[GPU-d9d22422ae1b7b8c]
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/2/properties"
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:207 msg="mapping amdgpu to drm sysfs nodes" amdgpu=/sys/class/kfd/kfd/topology/nodes/2/properties vendor=4098 device=29631 unique_id=15695647382708124556
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-1/device/vendor error="open /sys/class/drm/card0-DP-1/device/vendor: no such file or directory"
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-2/device/vendor error="open /sys/class/drm/card0-DP-2/device/vendor: no such file or directory"
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-3/device/vendor error="open /sys/class/drm/card0-DP-3/device/vendor: no such file or directory"
 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-HDMI-A-1/device/vendor error="open /sys/class/drm/card0-HDMI-A-1/device/vendor: no such file or directory"
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:241 msg=matched amdgpu=/sys/class/kfd/kfd/topology/nodes/2/properties drm=/sys/class/drm/card1/device
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:319 msg="amdgpu memory" gpu=1 total="16.0 GiB"
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:320 msg="amdgpu memory" gpu=1 available="15.6 GiB"
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /usr/lib/ollama"
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /opt/rocm/lib"
 time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /usr/lib64"
 time=2025-01-31T20:10:11.286-05:00 level=DEBUG source=amd_linux.go:373 msg="rocm supported GPUs" types="[gfx1010 gfx1030]"
 time=2025-01-31T20:10:11.286-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030
 time=2025-01-31T20:10:11.287-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB"
 [GIN] 2025/01/31 - 20:13:08 | 200 |      66.893µs |       127.0.0.1 | HEAD     "/"
 [GIN] 2025/01/31 - 20:13:08 | 200 |   20.721869ms |       127.0.0.1 | POST     "/api/show"
 time=2025-01-31T20:13:08.242-05:00 level=DEBUG source=gpu.go:406 msg="updating system memory data" before.total="125.7 GiB" before.free="102.4 GiB" before.free_swap="0 B" now.total="125.7 GiB" now.free="102.5 GiB" now.free_swap="0 B"
 time=2025-01-31T20:13:08.243-05:00 level=DEBUG source=amd_linux.go:490 msg="updating rocm free memory" gpu=GPU-d9d22422ae1b7b8c name=1002:73bf before="15.6 GiB" now="15.5 GiB"
 time=2025-01-31T20:13:08.243-05:00 level=DEBUG source=sched.go:181 msg="updating default concurrency" OLLAMA_MAX_LOADED_MODELS=0x55921d3bf0e0 gpu_count=1
 time=2025-01-31T20:13:08.288-05:00 level=DEBUG source=sched.go:224 msg="loading first model" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f
 time=2025-01-31T20:13:08.288-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]"
 time=2025-01-31T20:13:08.289-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]"
 time=2025-01-31T20:13:08.290-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16678277120 required="14.3 GiB"
 time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=gpu.go:406 msg="updating system memory data" before.total="125.7 GiB" before.free="102.5 GiB" before.free_swap="0 B" now.total="125.7 GiB" now.free="102.5 GiB" now.free_swap="0 B"
 time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=amd_linux.go:490 msg="updating rocm free memory" gpu=GPU-d9d22422ae1b7b8c name=1002:73bf before="15.5 GiB" now="15.5 GiB"
 time=2025-01-31T20:13:08.290-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="102.5 GiB" free_swap="0 B"
 time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]"
 time=2025-01-31T20:13:08.291-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.5 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB"
 time=2025-01-31T20:13:08.291-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server
 time=2025-01-31T20:13:08.291-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server
 time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/lib64:/usr/lib/ollama/runners/rocm]"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=gpu.go:713 msg="no filter required for library cpu"
 time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 38043"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin]"

Distro: Gentoo
GPU: gtx1030 (6900XT), gtx1010 (5600XT)"
CPU: AMD 3960x

Some lines cut due to char limit. Let me know if additional logs are needed.

OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.5.7

Originally created by @bivsk on GitHub (Feb 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8743 ### What is the issue? For some reason, Ollama refuses to utilize either of my AMD GPU's. `rocminfo`: ``` # rocminfo ROCk module is loaded ===================== HSA System Attributes ===================== Runtime Version: 1.1 Runtime Ext Version: 1.6 System Timestamp Freq.: 1000.000000MHz Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count) Machine Model: LARGE System Endianness: LITTLE Mwaitx: DISABLED DMAbuf Support: YES ========== HSA Agents ========== ******* Agent 1 ******* Name: AMD Ryzen Threadripper 3960X 24-Core Processor Uuid: CPU-XX Marketing Name: AMD Ryzen Threadripper 3960X 24-Core Processor Vendor Name: CPU Feature: None specified Profile: FULL_PROFILE Float Round Mode: NEAR Max Queue Number: 0(0x0) Queue Min Size: 0(0x0) Queue Max Size: 0(0x0) Queue Type: MULTI Node: 0 Device Type: CPU Cache Info: L1: 32768(0x8000) KB Chip ID: 0(0x0) ASIC Revision: 0(0x0) Cacheline Size: 64(0x40) Max Clock Freq. (MHz): 3800 BDFID: 0 Internal Node ID: 0 Compute Unit: 48 SIMDs per CU: 0 Shader Engines: 0 Shader Arrs. per Eng.: 0 WatchPts on Addr. Ranges:1 Memory Properties: Features: None Pool Info: Pool 1 Segment: GLOBAL; FLAGS: FINE GRAINED Size: 131772220(0x7daaf3c) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:4KB Alloc Alignment: 4KB Accessible by all: TRUE Pool 2 Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED Size: 131772220(0x7daaf3c) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:4KB Alloc Alignment: 4KB Accessible by all: TRUE Pool 3 Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED Size: 131772220(0x7daaf3c) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:4KB Alloc Alignment: 4KB Accessible by all: TRUE Pool 4 Segment: GLOBAL; FLAGS: COARSE GRAINED Size: 131772220(0x7daaf3c) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:4KB Alloc Alignment: 4KB Accessible by all: TRUE ISA Info: ******* Agent 2 ******* Name: gfx1010 Uuid: GPU-XX Marketing Name: AMD Radeon RX 5600 XT Vendor Name: AMD Feature: KERNEL_DISPATCH Profile: BASE_PROFILE Float Round Mode: NEAR Max Queue Number: 128(0x80) Queue Min Size: 64(0x40) Queue Max Size: 131072(0x20000) Queue Type: MULTI Node: 1 Device Type: GPU Cache Info: L1: 16(0x10) KB L2: 4096(0x1000) KB Chip ID: 29471(0x731f) ASIC Revision: 2(0x2) Cacheline Size: 128(0x80) Max Clock Freq. (MHz): 1650 BDFID: 8960 Internal Node ID: 1 Compute Unit: 36 SIMDs per CU: 2 Shader Engines: 2 Shader Arrs. per Eng.: 2 WatchPts on Addr. Ranges:4 Coherent Host Access: FALSE Memory Properties: Features: KERNEL_DISPATCH Fast F16 Operation: TRUE Wavefront Size: 32(0x20) Workgroup Max Size: 1024(0x400) Workgroup Max Size per Dimension: x 1024(0x400) y 1024(0x400) z 1024(0x400) Max Waves Per CU: 40(0x28) Max Work-item Per CU: 1280(0x500) Grid Max Size: 4294967295(0xffffffff) Grid Max Size per Dimension: x 4294967295(0xffffffff) y 4294967295(0xffffffff) z 4294967295(0xffffffff) Max fbarriers/Workgrp: 32 Packet Processor uCode:: 151 SDMA engine uCode:: 35 IOMMU Support:: None Pool Info: Pool 1 Segment: GLOBAL; FLAGS: COARSE GRAINED Size: 6275072(0x5fc000) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:2048KB Alloc Alignment: 4KB Accessible by all: FALSE Pool 2 Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED Size: 6275072(0x5fc000) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:2048KB Alloc Alignment: 4KB Accessible by all: FALSE Pool 3 Segment: GROUP Size: 64(0x40) KB Allocatable: FALSE Alloc Granule: 0KB Alloc Recommended Granule:0KB Alloc Alignment: 0KB Accessible by all: FALSE ISA Info: ISA 1 Name: amdgcn-amd-amdhsa--gfx1010:xnack- Machine Models: HSA_MACHINE_MODEL_LARGE Profiles: HSA_PROFILE_BASE Default Rounding Mode: NEAR Default Rounding Mode: NEAR Fast f16: TRUE Workgroup Max Size: 1024(0x400) Workgroup Max Size per Dimension: x 1024(0x400) y 1024(0x400) z 1024(0x400) Grid Max Size: 4294967295(0xffffffff) Grid Max Size per Dimension: x 4294967295(0xffffffff) y 4294967295(0xffffffff) z 4294967295(0xffffffff) FBarrier Max Size: 32 ******* Agent 3 ******* Name: gfx1030 Uuid: GPU-d9d22422ae1b7b8c Marketing Name: AMD Radeon RX 6900 XT Vendor Name: AMD Feature: KERNEL_DISPATCH Profile: BASE_PROFILE Float Round Mode: NEAR Max Queue Number: 128(0x80) Queue Min Size: 64(0x40) Queue Max Size: 131072(0x20000) Queue Type: MULTI Node: 2 Device Type: GPU Cache Info: L1: 16(0x10) KB L2: 4096(0x1000) KB L3: 131072(0x20000) KB Chip ID: 29631(0x73bf) ASIC Revision: 1(0x1) Cacheline Size: 128(0x80) Max Clock Freq. (MHz): 2660 BDFID: 19968 Internal Node ID: 2 Compute Unit: 80 SIMDs per CU: 2 Shader Engines: 4 Shader Arrs. per Eng.: 2 WatchPts on Addr. Ranges:4 Coherent Host Access: FALSE Memory Properties: Features: KERNEL_DISPATCH Fast F16 Operation: TRUE Wavefront Size: 32(0x20) Workgroup Max Size: 1024(0x400) Workgroup Max Size per Dimension: x 1024(0x400) y 1024(0x400) z 1024(0x400) Max Waves Per CU: 32(0x20) Max Work-item Per CU: 1024(0x400) Grid Max Size: 4294967295(0xffffffff) Grid Max Size per Dimension: x 4294967295(0xffffffff) y 4294967295(0xffffffff) z 4294967295(0xffffffff) Max fbarriers/Workgrp: 32 Packet Processor uCode:: 120 SDMA engine uCode:: 85 IOMMU Support:: None Pool Info: Pool 1 Segment: GLOBAL; FLAGS: COARSE GRAINED Size: 16760832(0xffc000) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:2048KB Alloc Alignment: 4KB Accessible by all: FALSE Pool 2 Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED Size: 16760832(0xffc000) KB Allocatable: TRUE Alloc Granule: 4KB Alloc Recommended Granule:2048KB Alloc Alignment: 4KB Accessible by all: FALSE Pool 3 Segment: GROUP Size: 64(0x40) KB Allocatable: FALSE Alloc Granule: 0KB Alloc Recommended Granule:0KB Alloc Alignment: 0KB Accessible by all: FALSE ISA Info: ISA 1 Name: amdgcn-amd-amdhsa--gfx1030 Machine Models: HSA_MACHINE_MODEL_LARGE Profiles: HSA_PROFILE_BASE Default Rounding Mode: NEAR Default Rounding Mode: NEAR Fast f16: TRUE Workgroup Max Size: 1024(0x400) Workgroup Max Size per Dimension: x 1024(0x400) y 1024(0x400) z 1024(0x400) Grid Max Size: 4294967295(0xffffffff) Grid Max Size per Dimension: x 4294967295(0xffffffff) y 4294967295(0xffffffff) z 4294967295(0xffffffff) FBarrier Max Size: 32 ``` Here are logs with `OLLAMA_DEBUG=1` `# journalctl -b -u ollama` For some reason, Ollama refuses to utilize either of my AMD GPU's. ``` Jan 31 19:32:23 robin systemd[1]: Started Ollama Service. Jan 31 19:32:23 robin ollama[4854]: 2025/01/31 19:32:23 routes.go:1186: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION:10.3.0 HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-01-31T19:32:23.215-05:00 level=INFO source=images.go:432 msg="total blobs: 13" time=2025-01-31T19:32:23.215-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) time=2025-01-31T19:32:23.217-05:00 level=INFO source=gpu.go:218 msg="looking for compatible GPUs" time=2025-01-31T19:32:23.230-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" time=2025-01-31T19:32:23.233-05:00 level=INFO source=amd_linux.go:389 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION=10.3.0 time=2025-01-31T19:32:23.233-05:00 level=INFO source=amd_linux.go:389 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION=10.3.0 time=2025-01-31T19:32:23.233-05:00 level=INFO source=types.go:130 msg="inference compute" id=0 library=rocm variant="" compute=gfx1010 driver=0.0 name=1002:731f total="6.0 GiB" available="6.0 GiB" time=2025-01-31T19:32:23.233-05:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB" opping Ollama Service... lama.service: Deactivated successfully. opped Ollama Service. arted Ollama Service. 2025/01/31 19:56:25 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-01-31T19:56:25.183-05:00 level=INFO source=images.go:432 msg="total blobs: 13" time=2025-01-31T19:56:25.184-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) time=2025-01-31T19:56:25.184-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )" time=2025-01-31T19:56:25.185-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[cpu rocm]" time=2025-01-31T19:56:25.186-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs" time=2025-01-31T19:56:25.196-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" time=2025-01-31T19:56:25.199-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=0 gpu_type=gfx1010 time=2025-01-31T19:56:25.199-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030 time=2025-01-31T19:56:25.200-05:00 level=INFO source=types.go:131 msg="inference compute" id=0 library=rocm variant="" compute=gfx1010 driver=0.0 name=1002:731f total="6.0 GiB" available="5.9 GiB" time=2025-01-31T19:56:25.200-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB" [GIN] 2025/01/31 - 19:56:35 | 200 | 495.192µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 19:56:35 | 200 | 264.762µs | 127.0.0.1 | GET "/api/ps" [GIN] 2025/01/31 - 19:56:58 | 200 | 3.31792ms | 127.0.0.1 | GET "/api/tags" [GIN] 2025/01/31 - 19:56:58 | 200 | 144.896µs | 127.0.0.1 | GET "/api/version" time=2025-01-31T19:57:10.214-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16702410752 required="14.3 GiB" time=2025-01-31T19:57:10.214-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="116.1 GiB" free_swap="0 B" time=2025-01-31T19:57:10.215-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.6 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB" time=2025-01-31T19:57:10.216-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 39549" time=2025-01-31T19:57:10.217-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 35981" time=2025-01-31T19:57:10.218-05:00 level=INFO source=sched.go:449 msg="loaded runners" count=1 time=2025-01-31T19:57:10.218-05:00 level=INFO source=server.go:555 msg="waiting for llama runner to start responding" time=2025-01-31T19:57:10.218-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server error" time=2025-01-31T19:57:10.231-05:00 level=INFO source=runner.go:936 msg="starting go runner" time=2025-01-31T19:57:10.231-05:00 level=INFO source=runner.go:937 msg=system info="CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | cgo(clang)" threads=24 time=2025-01-31T19:57:10.232-05:00 level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:35981" llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (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 = llama llama_model_loader: - kv 1: general.type str = model llama_model_loader: - kv 2: general.name str = Mistral Small 24B Instruct 2501 llama_model_loader: - kv 3: general.version str = 2501 llama_model_loader: - kv 4: general.finetune str = Instruct llama_model_loader: - kv 5: general.basename str = Mistral-Small llama_model_loader: - kv 6: general.size_label str = 24B llama_model_loader: - kv 7: general.license str = apache-2.0 llama_model_loader: - kv 8: general.base_model.count u32 = 1 llama_model_loader: - kv 9: general.base_model.0.name str = Mistral Small Base 2501 llama_model_loader: - kv 10: general.base_model.0.version str = 2501 llama_model_loader: - kv 11: general.base_model.0.organization str = Mistralai llama_model_loader: - kv 12: general.base_model.0.repo_url str = https://huggingface.co/mistralai/Mist... llama_model_loader: - kv 13: general.languages arr[str,10] = ["en", "fr", "de", "es", "it", "pt", ... llama_model_loader: - kv 14: llama.block_count u32 = 40 llama_model_loader: - kv 15: llama.context_length u32 = 32768 llama_model_loader: - kv 16: llama.embedding_length u32 = 5120 llama_model_loader: - kv 17: llama.feed_forward_length u32 = 32768 llama_model_loader: - kv 18: llama.attention.head_count u32 = 32 llama_model_loader: - kv 19: llama.attention.head_count_kv u32 = 8 llama_model_loader: - kv 20: llama.rope.freq_base f32 = 100000000.000000 llama_model_loader: - kv 21: llama.attention.layer_norm_rms_epsilon f32 = 0.000010 llama_model_loader: - kv 22: llama.attention.key_length u32 = 128 llama_model_loader: - kv 23: llama.attention.value_length u32 = 128 llama_model_loader: - kv 24: general.file_type u32 = 15 llama_model_loader: - kv 25: llama.vocab_size u32 = 131072 llama_model_loader: - kv 26: llama.rope.dimension_count u32 = 128 llama_model_loader: - kv 27: tokenizer.ggml.model str = gpt2 llama_model_loader: - kv 28: tokenizer.ggml.pre str = qwen2 llama_model_loader: - kv 29: tokenizer.ggml.tokens arr[str,131072] = ["<unk>", "<s>", "</s>", "[INST]", "[... llama_model_loader: - kv 30: tokenizer.ggml.token_type arr[i32,131072] = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ... [132B blob data] llama_model_loader: - kv 32: tokenizer.ggml.bos_token_id u32 = 1 llama_model_loader: - kv 33: tokenizer.ggml.eos_token_id u32 = 2 llama_model_loader: - kv 34: tokenizer.ggml.unknown_token_id u32 = 0 llama_model_loader: - kv 35: tokenizer.ggml.add_bos_token bool = true llama_model_loader: - kv 36: tokenizer.ggml.add_eos_token bool = false llama_model_loader: - kv 37: tokenizer.chat_template str = {{ bos_token }}{% for message in mess... llama_model_loader: - kv 38: tokenizer.ggml.add_space_prefix bool = false llama_model_loader: - kv 39: general.quantization_version u32 = 2 llama_model_loader: - type f32: 81 tensors llama_model_loader: - type q4_K: 241 tensors llama_model_loader: - type q6_K: 41 tensors time=2025-01-31T19:57:10.470-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server loading model" llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect llm_load_vocab: special tokens cache size = 1000 llm_load_vocab: token to piece cache size = 0.8498 MB llm_load_print_meta: format = GGUF V3 (latest) llm_load_print_meta: arch = llama llm_load_print_meta: vocab type = BPE llm_load_print_meta: n_vocab = 131072 llm_load_print_meta: n_merges = 269443 llm_load_print_meta: vocab_only = 0 llm_load_print_meta: n_ctx_train = 32768 llm_load_print_meta: n_embd = 5120 llm_load_print_meta: n_layer = 40 llm_load_print_meta: n_head = 32 llm_load_print_meta: n_head_kv = 8 llm_load_print_meta: n_rot = 128 llm_load_print_meta: n_swa = 0 llm_load_print_meta: n_embd_head_k = 128 llm_load_print_meta: n_embd_head_v = 128 llm_load_print_meta: n_gqa = 4 llm_load_print_meta: n_embd_k_gqa = 1024 llm_load_print_meta: n_embd_v_gqa = 1024 llm_load_print_meta: f_norm_eps = 0.0e+00 llm_load_print_meta: f_norm_rms_eps = 1.0e-05 llm_load_print_meta: f_clamp_kqv = 0.0e+00 llm_load_print_meta: f_max_alibi_bias = 0.0e+00 llm_load_print_meta: f_logit_scale = 0.0e+00 llm_load_print_meta: n_ff = 32768 llm_load_print_meta: n_expert = 0 llm_load_print_meta: n_expert_used = 0 llm_load_print_meta: causal attn = 1 llm_load_print_meta: pooling type = 0 llm_load_print_meta: rope type = 0 llm_load_print_meta: rope scaling = linear llm_load_print_meta: freq_base_train = 100000000.0 llm_load_print_meta: freq_scale_train = 1 llm_load_print_meta: n_ctx_orig_yarn = 32768 llm_load_print_meta: rope_finetuned = unknown llm_load_print_meta: ssm_d_conv = 0 llm_load_print_meta: ssm_d_inner = 0 llm_load_print_meta: ssm_d_state = 0 llm_load_print_meta: ssm_dt_rank = 0 llm_load_print_meta: ssm_dt_b_c_rms = 0 llm_load_print_meta: model type = 13B llm_load_print_meta: model ftype = Q4_K - Medium llm_load_print_meta: model params = 23.57 B llm_load_print_meta: model size = 13.34 GiB (4.86 BPW) llm_load_print_meta: general.name = Mistral Small 24B Instruct 2501 llm_load_print_meta: BOS token = 1 '<s>' llm_load_print_meta: EOS token = 2 '</s>' llm_load_print_meta: UNK token = 0 '<unk>' llm_load_print_meta: LF token = 1196 'Ä' llm_load_print_meta: EOG token = 2 '</s>' llm_load_print_meta: max token length = 150 [GIN] 2025/01/31 - 19:57:26 | 200 | 29.451µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 19:57:26 | 200 | 51.722µs | 127.0.0.1 | GET "/api/ps" [GIN] 2025/01/31 - 19:57:29 | 200 | 48.172µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 19:57:29 | 200 | 40.351µs | 127.0.0.1 | GET "/api/ps" llm_load_tensors: CPU_Mapped model buffer size = 13662.36 MiB llama_new_context_with_model: n_seq_max = 1 llama_new_context_with_model: n_ctx = 2048 llama_new_context_with_model: n_ctx_per_seq = 2048 llama_new_context_with_model: n_batch = 512 llama_new_context_with_model: n_ubatch = 512 llama_new_context_with_model: flash_attn = 0 llama_new_context_with_model: freq_base = 100000000.0 llama_new_context_with_model: freq_scale = 1 llama_new_context_with_model: n_ctx_per_seq (2048) < n_ctx_train (32768) -- the full capacity of the model will not be utilized llama_kv_cache_init: kv_size = 2048, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 40, can_shift = 1 llama_kv_cache_init: CPU KV buffer size = 320.00 MiB llama_new_context_with_model: KV self size = 320.00 MiB, K (f16): 160.00 MiB, V (f16): 160.00 MiB llama_new_context_with_model: CPU output buffer size = 0.52 MiB llama_new_context_with_model: CPU compute buffer size = 266.00 MiB llama_new_context_with_model: graph nodes = 1286 llama_new_context_with_model: graph splits = 1 time=2025-01-31T19:57:38.563-05:00 level=INFO source=server.go:594 msg="llama runner started in 28.35 seconds" llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (version GGUF V3 (latest)) llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. llama_model_loader: - type f32: 81 tensors llama_model_loader: - type q4_K: 241 tensors llama_model_loader: - type q6_K: 41 tensors llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect llm_load_vocab: special tokens cache size = 1000 llm_load_vocab: token to piece cache size = 0.8498 MB llm_load_print_meta: format = GGUF V3 (latest) llm_load_print_meta: arch = llama llm_load_print_meta: vocab type = BPE llm_load_print_meta: n_vocab = 131072 llm_load_print_meta: n_merges = 269443 llm_load_print_meta: vocab_only = 1 llm_load_print_meta: model type = ?B llm_load_print_meta: model ftype = all F32 llm_load_print_meta: model params = 23.57 B llm_load_print_meta: model size = 13.34 GiB (4.86 BPW) llm_load_print_meta: general.name = Mistral Small 24B Instruct 2501 llm_load_print_meta: BOS token = 1 '<s>' llm_load_print_meta: EOS token = 2 '</s>' llm_load_print_meta: UNK token = 0 '<unk>' llm_load_print_meta: LF token = 1196 'Ä' llm_load_print_meta: EOG token = 2 '</s>' llm_load_print_meta: max token length = 150 llama_model_load: vocab only - skipping tensors [GIN] 2025/01/31 - 19:58:02 | 200 | 51.968581883s | 127.0.0.1 | POST "/api/chat" [GIN] 2025/01/31 - 20:00:18 | 200 | 2m55s | 127.0.0.1 | POST "/api/chat" [GIN] 2025/01/31 - 20:00:46 | 200 | 27.492712468s | 127.0.0.1 | POST "/api/chat" [GIN] 2025/01/31 - 20:01:21 | 200 | 34.971304231s | 127.0.0.1 | POST "/api/chat" opping Ollama Service... lama.service: Deactivated successfully. opped Ollama Service. lama.service: Consumed 1h 28min 18.833s CPU time, 14G memory peak. arted Ollama Service. 2025/01/31 20:04:22 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES:GPU-d9d22422ae1b7b8c http_proxy: https_proxy: no_proxy:]" time=2025-01-31T20:04:22.742-05:00 level=INFO source=images.go:432 msg="total blobs: 13" time=2025-01-31T20:04:22.742-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) time=2025-01-31T20:04:22.743-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )" time=2025-01-31T20:04:22.743-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[cpu rocm]" time=2025-01-31T20:04:22.743-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs" time=2025-01-31T20:04:22.754-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" time=2025-01-31T20:04:22.755-05:00 level=INFO source=amd_linux.go:333 msg="filtering out device per user request" id=0 visible_devices=[GPU-d9d22422ae1b7b8c] time=2025-01-31T20:04:22.757-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030 time=2025-01-31T20:04:22.757-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB" [GIN] 2025/01/31 - 20:05:02 | 200 | 44.184µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 20:05:02 | 200 | 245.709µs | 127.0.0.1 | GET "/api/ps" [GIN] 2025/01/31 - 20:05:12 | 200 | 22.781µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 20:05:12 | 200 | 17.11868ms | 127.0.0.1 | POST "/api/show" time=2025-01-31T20:05:12.555-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16715296768 required="14.3 GiB" time=2025-01-31T20:05:12.555-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="102.2 GiB" free_swap="0 B" time=2025-01-31T20:05:12.556-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.6 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB" time=2025-01-31T20:05:12.558-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 32789" time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --threads 24 --parallel 1 --port 36337" time=2025-01-31T20:05:12.559-05:00 level=INFO source=sched.go:449 msg="loaded runners" count=1 time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:555 msg="waiting for llama runner to start responding" time=2025-01-31T20:05:12.559-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server error" time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:936 msg="starting go runner" time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:937 msg=system info="CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | AARCH64_REPACK = 1 | cgo(clang)" threads=24 time=2025-01-31T20:05:12.571-05:00 level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:36337" llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (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 = llama llama_model_loader: - kv 1: general.type str = model llama_model_loader: - kv 2: general.name str = Mistral Small 24B Instruct 2501 llama_model_loader: - kv 3: general.version str = 2501 llama_model_loader: - kv 4: general.finetune str = Instruct llama_model_loader: - kv 5: general.basename str = Mistral-Small llama_model_loader: - kv 6: general.size_label str = 24B llama_model_loader: - kv 7: general.license str = apache-2.0 llama_model_loader: - kv 8: general.base_model.count u32 = 1 llama_model_loader: - kv 9: general.base_model.0.name str = Mistral Small Base 2501 llama_model_loader: - kv 10: general.base_model.0.version str = 2501 llama_model_loader: - kv 11: general.base_model.0.organization str = Mistralai llama_model_loader: - kv 12: general.base_model.0.repo_url str = https://huggingface.co/mistralai/Mist... llama_model_loader: - kv 13: general.languages arr[str,10] = ["en", "fr", "de", "es", "it", "pt", ... llama_model_loader: - kv 14: llama.block_count u32 = 40 llama_model_loader: - kv 15: llama.context_length u32 = 32768 llama_model_loader: - kv 16: llama.embedding_length u32 = 5120 llama_model_loader: - kv 17: llama.feed_forward_length u32 = 32768 llama_model_loader: - kv 18: llama.attention.head_count u32 = 32 llama_model_loader: - kv 19: llama.attention.head_count_kv u32 = 8 llama_model_loader: - kv 20: llama.rope.freq_base f32 = 100000000.000000 llama_model_loader: - kv 21: llama.attention.layer_norm_rms_epsilon f32 = 0.000010 llama_model_loader: - kv 22: llama.attention.key_length u32 = 128 llama_model_loader: - kv 23: llama.attention.value_length u32 = 128 llama_model_loader: - kv 24: general.file_type u32 = 15 llama_model_loader: - kv 25: llama.vocab_size u32 = 131072 llama_model_loader: - kv 26: llama.rope.dimension_count u32 = 128 llama_model_loader: - kv 27: tokenizer.ggml.model str = gpt2 llama_model_loader: - kv 28: tokenizer.ggml.pre str = qwen2 llama_model_loader: - kv 29: tokenizer.ggml.tokens arr[str,131072] = ["<unk>", "<s>", "</s>", "[INST]", "[... llama_model_loader: - kv 30: tokenizer.ggml.token_type arr[i32,131072] = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ... [132B blob data] llama_model_loader: - kv 32: tokenizer.ggml.bos_token_id u32 = 1 llama_model_loader: - kv 33: tokenizer.ggml.eos_token_id u32 = 2 llama_model_loader: - kv 34: tokenizer.ggml.unknown_token_id u32 = 0 llama_model_loader: - kv 35: tokenizer.ggml.add_bos_token bool = true llama_model_loader: - kv 36: tokenizer.ggml.add_eos_token bool = false llama_model_loader: - kv 37: tokenizer.chat_template str = {{ bos_token }}{% for message in mess... llama_model_loader: - kv 38: tokenizer.ggml.add_space_prefix bool = false llama_model_loader: - kv 39: general.quantization_version u32 = 2 llama_model_loader: - type f32: 81 tensors llama_model_loader: - type q4_K: 241 tensors llama_model_loader: - type q6_K: 41 tensors time=2025-01-31T20:05:12.811-05:00 level=INFO source=server.go:589 msg="waiting for server to become available" status="llm server loading model" llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect llm_load_vocab: special tokens cache size = 1000 llm_load_vocab: token to piece cache size = 0.8498 MB llm_load_print_meta: format = GGUF V3 (latest) llm_load_print_meta: arch = llama llm_load_print_meta: vocab type = BPE llm_load_print_meta: n_vocab = 131072 llm_load_print_meta: n_merges = 269443 llm_load_print_meta: vocab_only = 0 llm_load_print_meta: n_ctx_train = 32768 llm_load_print_meta: n_embd = 5120 llm_load_print_meta: n_layer = 40 llm_load_print_meta: n_head = 32 llm_load_print_meta: n_head_kv = 8 llm_load_print_meta: n_rot = 128 llm_load_print_meta: n_swa = 0 llm_load_print_meta: n_embd_head_k = 128 llm_load_print_meta: n_embd_head_v = 128 llm_load_print_meta: n_gqa = 4 llm_load_print_meta: n_embd_k_gqa = 1024 llm_load_print_meta: n_embd_v_gqa = 1024 llm_load_print_meta: f_norm_eps = 0.0e+00 llm_load_print_meta: f_norm_rms_eps = 1.0e-05 llm_load_print_meta: f_clamp_kqv = 0.0e+00 llm_load_print_meta: f_max_alibi_bias = 0.0e+00 llm_load_print_meta: f_logit_scale = 0.0e+00 llm_load_print_meta: n_ff = 32768 llm_load_print_meta: n_expert = 0 llm_load_print_meta: n_expert_used = 0 llm_load_print_meta: causal attn = 1 llm_load_print_meta: pooling type = 0 llm_load_print_meta: rope type = 0 llm_load_print_meta: rope scaling = linear llm_load_print_meta: freq_base_train = 100000000.0 llm_load_print_meta: freq_scale_train = 1 llm_load_print_meta: n_ctx_orig_yarn = 32768 llm_load_print_meta: rope_finetuned = unknown llm_load_print_meta: ssm_d_conv = 0 llm_load_print_meta: ssm_d_inner = 0 llm_load_print_meta: ssm_d_state = 0 llm_load_print_meta: ssm_dt_rank = 0 llm_load_print_meta: ssm_dt_b_c_rms = 0 llm_load_print_meta: model type = 13B llm_load_print_meta: model ftype = Q4_K - Medium llm_load_print_meta: model params = 23.57 B llm_load_print_meta: model size = 13.34 GiB (4.86 BPW) llm_load_print_meta: general.name = Mistral Small 24B Instruct 2501 llm_load_print_meta: BOS token = 1 '<s>' llm_load_print_meta: EOS token = 2 '</s>' llm_load_print_meta: UNK token = 0 '<unk>' llm_load_print_meta: LF token = 1196 'Ä' llm_load_print_meta: EOG token = 2 '</s>' llm_load_print_meta: max token length = 150 llm_load_tensors: CPU_Mapped model buffer size = 13662.36 MiB llama_new_context_with_model: n_seq_max = 1 llama_new_context_with_model: n_ctx = 2048 llama_new_context_with_model: n_ctx_per_seq = 2048 llama_new_context_with_model: n_batch = 512 llama_new_context_with_model: n_ubatch = 512 llama_new_context_with_model: flash_attn = 0 llama_new_context_with_model: freq_base = 100000000.0 llama_new_context_with_model: freq_scale = 1 llama_new_context_with_model: n_ctx_per_seq (2048) < n_ctx_train (32768) -- the full capacity of the model will not be utilized llama_kv_cache_init: kv_size = 2048, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 40, can_shift = 1 llama_kv_cache_init: CPU KV buffer size = 320.00 MiB llama_new_context_with_model: KV self size = 320.00 MiB, K (f16): 160.00 MiB, V (f16): 160.00 MiB llama_new_context_with_model: CPU output buffer size = 0.52 MiB llama_new_context_with_model: CPU compute buffer size = 266.00 MiB llama_new_context_with_model: graph nodes = 1286 llama_new_context_with_model: graph splits = 1 time=2025-01-31T20:05:14.316-05:00 level=INFO source=server.go:594 msg="llama runner started in 1.76 seconds" [GIN] 2025/01/31 - 20:05:14 | 200 | 1.854387471s | 127.0.0.1 | POST "/api/generate" llama_model_loader: loaded meta data with 40 key-value pairs and 363 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f (version GGUF V3 (latest)) llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. llama_model_loader: - type q4_K: 241 tensors llama_model_loader: - type q6_K: 41 tensors llm_load_vocab: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect llm_load_vocab: special tokens cache size = 1000 llm_load_vocab: token to piece cache size = 0.8498 MB llm_load_print_meta: format = GGUF V3 (latest) llm_load_print_meta: arch = llama llm_load_print_meta: vocab type = BPE llm_load_print_meta: n_vocab = 131072 llm_load_print_meta: n_merges = 269443 llm_load_print_meta: vocab_only = 1 llm_load_print_meta: model type = ?B llm_load_print_meta: model ftype = all F32 llm_load_print_meta: model params = 23.57 B llm_load_print_meta: model size = 13.34 GiB (4.86 BPW) llm_load_print_meta: general.name = Mistral Small 24B Instruct 2501 llm_load_print_meta: BOS token = 1 '<s>' llm_load_print_meta: EOS token = 2 '</s>' llm_load_print_meta: UNK token = 0 '<unk>' llm_load_print_meta: LF token = 1196 'Ä' llm_load_print_meta: EOG token = 2 '</s>' llm_load_print_meta: max token length = 150 llama_model_load: vocab only - skipping tensors [GIN] 2025/01/31 - 20:08:18 | 200 | 2m46s | 127.0.0.1 | POST "/api/chat" opping Ollama Service... lama.service: Deactivated successfully. opped Ollama Service. lama.service: Consumed 1h 5min 32.261s CPU time, 561.7M memory peak. arted Ollama Service. 2025/01/31 20:10:11 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:true OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/var/lib/ollama/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 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://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES:GPU-d9d22422ae1b7b8c http_proxy: https_proxy: no_proxy:]" time=2025-01-31T20:10:11.261-05:00 level=INFO source=images.go:432 msg="total blobs: 13" time=2025-01-31T20:10:11.262-05:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) time=2025-01-31T20:10:11.263-05:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version )" time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=common.go:80 msg="runners located" dir=/usr/lib/ollama/runners time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server time=2025-01-31T20:10:11.263-05:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[rocm cpu]" time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=routes.go:1268 msg="Override detection logic by setting OLLAMA_LLM_LIBRARY" time=2025-01-31T20:10:11.263-05:00 level=DEBUG source=sched.go:105 msg="starting llm scheduler" time=2025-01-31T20:10:11.263-05:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs" time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:99 msg="searching for GPU discovery libraries for NVIDIA" time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:517 msg="Searching for GPU library" name=libcuda.so* time=2025-01-31T20:10:11.269-05:00 level=DEBUG source=gpu.go:543 msg="gpu library search" globs="[/usr/lib/ollama/libcuda.so* /usr/lib/ollama/libcuda.so* /libcuda.so* /usr/local/cuda*/targets/*/lib/libcuda.so* /usr/lib/*-linux-gnu/nvidia/current/libcuda.so* /usr/lib/*-linux-gnu/libcuda.so* /usr/lib/wsl/lib/libcuda.so* /usr/lib/wsl/drivers/*/libcuda.so* /opt/cuda/lib*/libcuda.so* /usr/local/cuda/lib*/libcuda.so* /usr/lib*/libcuda.so* /usr/local/lib*/libcuda.so*]" time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:576 msg="discovered GPU libraries" paths=[] time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:517 msg="Searching for GPU library" name=libcudart.so* time=2025-01-31T20:10:11.276-05:00 level=DEBUG source=gpu.go:543 msg="gpu library search" globs="[/usr/lib/ollama/libcudart.so* /usr/lib/ollama/libcudart.so* /libcudart.so* /usr/lib/ollama/libcudart.so* /usr/lib/ollama/libcudart.so* /usr/local/cuda/lib64/libcudart.so* /usr/lib/x86_64-linux-gnu/nvidia/current/libcudart.so* /usr/lib/x86_64-linux-gnu/libcudart.so* /usr/lib/wsl/lib/libcudart.so* /usr/lib/wsl/drivers/*/libcudart.so* /opt/cuda/lib64/libcudart.so* /usr/local/cuda*/targets/aarch64-linux/lib/libcudart.so* /usr/lib/aarch64-linux-gnu/nvidia/current/libcudart.so* /usr/lib/aarch64-linux-gnu/libcudart.so* /usr/local/cuda/lib*/libcudart.so* /usr/lib*/libcudart.so* /usr/local/lib*/libcudart.so*]" time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=gpu.go:576 msg="discovered GPU libraries" paths=[] time=2025-01-31T20:10:11.281-05:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/0/properties" time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:122 msg="detected CPU /sys/class/kfd/kfd/topology/nodes/0/properties" time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/1/properties" time=2025-01-31T20:10:11.281-05:00 level=DEBUG source=amd_linux.go:207 msg="mapping amdgpu to drm sysfs nodes" amdgpu=/sys/class/kfd/kfd/topology/nodes/1/properties vendor=4098 device=29471 unique_id=0 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:241 msg=matched amdgpu=/sys/class/kfd/kfd/topology/nodes/1/properties drm=/sys/class/drm/card0/device time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:319 msg="amdgpu memory" gpu=0 total="6.0 GiB" time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:320 msg="amdgpu memory" gpu=0 available="5.9 GiB" time=2025-01-31T20:10:11.282-05:00 level=INFO source=amd_linux.go:333 msg="filtering out device per user request" id=0 visible_devices=[GPU-d9d22422ae1b7b8c] time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:102 msg="evaluating amdgpu node /sys/class/kfd/kfd/topology/nodes/2/properties" time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:207 msg="mapping amdgpu to drm sysfs nodes" amdgpu=/sys/class/kfd/kfd/topology/nodes/2/properties vendor=4098 device=29631 unique_id=15695647382708124556 time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-1/device/vendor error="open /sys/class/drm/card0-DP-1/device/vendor: no such file or directory" time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-2/device/vendor error="open /sys/class/drm/card0-DP-2/device/vendor: no such file or directory" time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-DP-3/device/vendor error="open /sys/class/drm/card0-DP-3/device/vendor: no such file or directory" time=2025-01-31T20:10:11.282-05:00 level=DEBUG source=amd_linux.go:220 msg="failed to read sysfs node" file=/sys/class/drm/card0-HDMI-A-1/device/vendor error="open /sys/class/drm/card0-HDMI-A-1/device/vendor: no such file or directory" time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:241 msg=matched amdgpu=/sys/class/kfd/kfd/topology/nodes/2/properties drm=/sys/class/drm/card1/device time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:319 msg="amdgpu memory" gpu=1 total="16.0 GiB" time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_linux.go:320 msg="amdgpu memory" gpu=1 available="15.6 GiB" time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /usr/lib/ollama" time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /opt/rocm/lib" time=2025-01-31T20:10:11.283-05:00 level=DEBUG source=amd_common.go:18 msg="evaluating potential rocm lib dir /usr/lib64" time=2025-01-31T20:10:11.286-05:00 level=DEBUG source=amd_linux.go:373 msg="rocm supported GPUs" types="[gfx1010 gfx1030]" time=2025-01-31T20:10:11.286-05:00 level=INFO source=amd_linux.go:388 msg="amdgpu is supported" gpu=GPU-d9d22422ae1b7b8c gpu_type=gfx1030 time=2025-01-31T20:10:11.287-05:00 level=INFO source=types.go:131 msg="inference compute" id=GPU-d9d22422ae1b7b8c library=rocm variant="" compute=gfx1030 driver=0.0 name=1002:73bf total="16.0 GiB" available="15.6 GiB" [GIN] 2025/01/31 - 20:13:08 | 200 | 66.893µs | 127.0.0.1 | HEAD "/" [GIN] 2025/01/31 - 20:13:08 | 200 | 20.721869ms | 127.0.0.1 | POST "/api/show" time=2025-01-31T20:13:08.242-05:00 level=DEBUG source=gpu.go:406 msg="updating system memory data" before.total="125.7 GiB" before.free="102.4 GiB" before.free_swap="0 B" now.total="125.7 GiB" now.free="102.5 GiB" now.free_swap="0 B" time=2025-01-31T20:13:08.243-05:00 level=DEBUG source=amd_linux.go:490 msg="updating rocm free memory" gpu=GPU-d9d22422ae1b7b8c name=1002:73bf before="15.6 GiB" now="15.5 GiB" time=2025-01-31T20:13:08.243-05:00 level=DEBUG source=sched.go:181 msg="updating default concurrency" OLLAMA_MAX_LOADED_MODELS=0x55921d3bf0e0 gpu_count=1 time=2025-01-31T20:13:08.288-05:00 level=DEBUG source=sched.go:224 msg="loading first model" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f time=2025-01-31T20:13:08.288-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]" time=2025-01-31T20:13:08.289-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]" time=2025-01-31T20:13:08.290-05:00 level=INFO source=sched.go:714 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f gpu=GPU-d9d22422ae1b7b8c parallel=1 available=16678277120 required="14.3 GiB" time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=gpu.go:406 msg="updating system memory data" before.total="125.7 GiB" before.free="102.5 GiB" before.free_swap="0 B" now.total="125.7 GiB" now.free="102.5 GiB" now.free_swap="0 B" time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=amd_linux.go:490 msg="updating rocm free memory" gpu=GPU-d9d22422ae1b7b8c name=1002:73bf before="15.5 GiB" now="15.5 GiB" time=2025-01-31T20:13:08.290-05:00 level=INFO source=server.go:104 msg="system memory" total="125.7 GiB" free="102.5 GiB" free_swap="0 B" time=2025-01-31T20:13:08.290-05:00 level=DEBUG source=memory.go:107 msg=evaluating library=rocm gpu_count=1 available="[15.5 GiB]" time=2025-01-31T20:13:08.291-05:00 level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=41 layers.offload=41 layers.split="" memory.available="[15.5 GiB]" memory.gpu_overhead="0 B" memory.required.full="14.3 GiB" memory.required.partial="14.3 GiB" memory.required.kv="320.0 MiB" memory.required.allocations="[14.3 GiB]" memory.weights.total="12.8 GiB" memory.weights.repeating="12.3 GiB" memory.weights.nonrepeating="525.0 MiB" memory.graph.full="266.0 MiB" memory.graph.partial="801.0 MiB" time=2025-01-31T20:13:08.291-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server time=2025-01-31T20:13:08.291-05:00 level=DEBUG source=common.go:124 msg="availableServers : found" file=/usr/lib/ollama/runners/rocm/ollama_llama_server time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/lib64:/usr/lib/ollama/runners/rocm]" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=gpu.go:713 msg="no filter required for library cpu" time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 38043" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin]" ``` Distro: Gentoo GPU: gtx1030 (6900XT), gtx1010 (5600XT)" CPU: AMD 3960x Some lines cut due to char limit. Let me know if additional logs are needed. ### OS Linux ### GPU AMD ### CPU AMD ### Ollama version 0.5.7
GiteaMirror added the bug label 2026-04-28 22:26:20 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 1, 2025):

 time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/lib64:/usr/lib/ollama/runners/rocm]"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=gpu.go:713 msg="no filter required for library cpu"
 time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 38043"
 time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin]"

It looks like tthe ROCm runner failed to start and ollama fell back to the CPU runner. What's the result if you run it manually:

ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823
<!-- gh-comment-id:2628688508 --> @rick-github commented on GitHub (Feb 1, 2025): ``` time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/lib64:/usr/lib/ollama/runners/rocm]" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=gpu.go:713 msg="no filter required for library cpu" time=2025-01-31T20:13:08.293-05:00 level=INFO source=server.go:376 msg="starting llama server" cmd="/usr/bin/ollama runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 38043" time=2025-01-31T20:13:08.293-05:00 level=DEBUG source=server.go:393 msg=subprocess environment="[PATH=$PATH ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin]" ``` It looks like tthe ROCm runner failed to start and ollama fell back to the CPU runner. What's the result if you run it manually: ``` ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823 ```
Author
Owner

@bivsk commented on GitHub (Feb 1, 2025):

It looks like tthe ROCm runner failed to start and ollama fell back to the CPU runner. What's the result if you run it manually:

ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823

This is what I get:

# ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823
bash: line 1: /usr/lib/ollama/runners/rocm/ollama_llama_server: Permission denied

ls -l /usr/lib/ollama/runners/rocm/:

-rw-r--r-- 1 root root 62254832 Jan 31 19:55 libggml_rocm.so
-rw-r--r-- 1 root root  9209016 Jan 31 19:55 ollama_llama_server

file /usr/lib/ollama/runners/rocm/ollama_llama_server:

/usr/lib/ollama/runners/rocm/ollama_llama_server: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, Go BuildID=bRHeHPlrjIPku0tn8vTR/6Oe5kgn0Ys9GLIAu7XBr/aww9UmIhp-0Hf4kv00Cz/nMJHmHBafImM8Zz48MBP, stripped
<!-- gh-comment-id:2628690959 --> @bivsk commented on GitHub (Feb 1, 2025): > It looks like tthe ROCm runner failed to start and ollama fell back to the CPU runner. What's the result if you run it manually: > > ``` > ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823 > ``` This is what I get: ``` # ROCR_VISIBLE_DEVICES=GPU-d9d22422ae1b7b8c HSA_OVERRIDE_GFX_VERSION_2=10.3.0 LD_LIBRARY_PATH=/usr/lib/ollama:/usr/lib/ollama:/usr/bin /usr/lib/ollama/runners/rocm/ollama_llama_server runner --model /var/lib/ollama/.ollama/models/blobs/sha256-102a747c137683e81d431dab05d8f2158df4ab6f162f8f9019425a43d51e0e9f --ctx-size 2048 --batch-size 512 --n-gpu-layers 41 --verbose --threads 24 --parallel 1 --port 46823 bash: line 1: /usr/lib/ollama/runners/rocm/ollama_llama_server: Permission denied ``` `ls -l /usr/lib/ollama/runners/rocm/`: ``` -rw-r--r-- 1 root root 62254832 Jan 31 19:55 libggml_rocm.so -rw-r--r-- 1 root root 9209016 Jan 31 19:55 ollama_llama_server ``` `file /usr/lib/ollama/runners/rocm/ollama_llama_server`: ``` /usr/lib/ollama/runners/rocm/ollama_llama_server: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, Go BuildID=bRHeHPlrjIPku0tn8vTR/6Oe5kgn0Ys9GLIAu7XBr/aww9UmIhp-0Hf4kv00Cz/nMJHmHBafImM8Zz48MBP, stripped ```
Author
Owner

@rick-github commented on GitHub (Feb 1, 2025):

sudo chmod +x /usr/lib/ollama/runners/rocm/ollama_llama_server

Did you build ollama yourself or is it a Gentoo package? If the latter, you should raise a ticket with the package maintainers.

<!-- gh-comment-id:2628692983 --> @rick-github commented on GitHub (Feb 1, 2025): ``` sudo chmod +x /usr/lib/ollama/runners/rocm/ollama_llama_server ``` Did you build ollama yourself or is it a Gentoo package? If the latter, you should raise a ticket with the package maintainers.
Author
Owner

@bivsk commented on GitHub (Feb 1, 2025):

sudo chmod +x /usr/lib/ollama/runners/rocm/ollama_llama_server

Did you build ollama yourself or is it a Gentoo package? If the latter, you should raise a ticket with the package maintainers.

This fixed it! Thanks!

This was installed with an experimental gentoo package, I'll be sure to contact the maintainers to get this fixed, although I know they are awaiting the next release with the changed build system.

Thanks again

<!-- gh-comment-id:2628699077 --> @bivsk commented on GitHub (Feb 1, 2025): > ``` > sudo chmod +x /usr/lib/ollama/runners/rocm/ollama_llama_server > ``` > > Did you build ollama yourself or is it a Gentoo package? If the latter, you should raise a ticket with the package maintainers. This fixed it! Thanks! This was installed with an experimental gentoo package, I'll be sure to contact the maintainers to get this fixed, although I know they are awaiting the next release with the changed build system. Thanks again
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52184