[GH-ISSUE #4437] Ollama vs Llama-cpp-python : Slow response time as compared to llama-cpp-python #28531

Closed
opened 2026-04-22 06:46:39 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @anuragrawal2024 on GitHub (May 14, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4437

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

Hi,

I built a RAG Q&A pipeline using LlamaIndex and Llama-cpp-python in the past. I want to switch from llama-cpp to ollama because ollama is more stable and easier to install. When I made the switch, I noticed a significant increase in response time. Would you know what might cause this slowdown?

I have kept everything same for the comparison and have only changed llm component to point to ollama instead of llama-cpp. I am using the same quantized version of llama-3 for comparison.

Appreciate your inputs! Thanks!

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.1.33

Originally created by @anuragrawal2024 on GitHub (May 14, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4437 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? Hi, I built a RAG Q&A pipeline using LlamaIndex and Llama-cpp-python in the past. I want to switch from llama-cpp to ollama because ollama is more stable and easier to install. When I made the switch, I noticed a significant increase in response time. Would you know what might cause this slowdown? I have kept everything same for the comparison and have only changed llm component to point to ollama instead of llama-cpp. I am using the same quantized version of llama-3 for comparison. Appreciate your inputs! Thanks! ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.33
GiteaMirror added the gpunvidiabug labels 2026-04-22 06:46:40 -05:00
Author
Owner

@pdevine commented on GitHub (May 14, 2024):

@utility-aagrawal What kind of GPU are you using? Is the model offloaded entirely onto the GPU or only partially?

<!-- gh-comment-id:2111061250 --> @pdevine commented on GitHub (May 14, 2024): @utility-aagrawal What kind of GPU are you using? Is the model offloaded entirely onto the GPU or only partially?
Author
Owner

@anuragrawal2024 commented on GitHub (May 14, 2024):

Thanks for your response, @pdevine!

I have an NVIDIA GeForce RTX 3060 (12 GB VRAM). Yes, I am using these parameters {"n_gpu_layers": -1, "offload_kqv": True} which offload the entire model onto the GPU. Let me know if you need anything additional. Thanks!

Also, I wanted to quantify the slowdown. Using ollama, it's taking 1.5-2x compared to llama-cpp.

Adding server logs to confirm that the entire model is offloaded to GPU:

May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: ggml ctx size = 0.30 MiB
May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: offloading 32 repeating layers to GPU
May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: offloading non-repeating layers to GPU
May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: offloaded 33/33 layers to GPU
May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: CPU buffer size = 281.81 MiB
May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: CUDA0 buffer size = 4155.99 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: .......................................................................................
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_ctx = 8000
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_batch = 512
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_ubatch = 512
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: freq_base = 500000.0
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: freq_scale = 1
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_kv_cache_init: CUDA0 KV buffer size = 1000.00 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: KV self size = 1000.00 MiB, K (f16): 500.00 MiB, V (f16): 500.00 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA_Host output buffer size = 0.50 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA0 compute buffer size = 547.63 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA_Host compute buffer size = 23.63 MiB
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: graph nodes = 1030
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: graph splits = 2
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"initialize","level":"INFO","line":448,"msg":"initializing slots","n_slots":1,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"initialize","level":"INFO","line":457,"msg":"new slot","n_ctx_slot":8000,"slot_id":0,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"main","level":"INFO","line":3067,"msg":"model loaded","tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"main","hostname":"127.0.0.1","level":"INFO","line":3270,"msg":"HTTP server listening","n_threads_http":"23","port":"42843","tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1581,"msg":"all slots are idle and system prompt is empty, clear the KV cache","tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":0,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":1,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47896,"status":200,"tid":"124139184582656","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":2,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":3,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47910,"status":200,"tid":"124138672824320","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":4,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47928,"status":200,"tid":"124139184582656","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47944,"status":200,"tid":"124141474951168","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47926,"status":200,"tid":"124138681217024","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":5,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47954,"status":200,"tid":"124138672824320","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":6,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":7,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"POST","msg":"request","params":{},"path":"/tokenize","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":8,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171>
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"launch_slot_with_data","level":"INFO","line":830,"msg":"slot is processing task","slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","ga_i":0,"level":"INFO","line":1812,"msg":"slot progression","n_past":0,"n_past_se":0,"n_prompt_tokens_processed":2161,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1839,"msg":"kv cache rm [p0, end)","p0":0,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884}
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":269,"msg":"prompt eval time = 2687.66 ms / 2161 tokens ( 1.24 ms per token, 804.04 tokens per second)","n_prompt_tokens_processed":2161,"n_tokens_second":8>
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":283,"msg":"generation eval time = 637.36 ms / 33 runs ( 19.31 ms per token, 51.78 tokens per second)","n_decoded":33,"n_tokens_second":51.77623878573738,">
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":293,"msg":" total time = 3325.02 ms","slot_id":0,"t_prompt_processing":2687.665,"t_token_generation":637.358,"t_total":3325.023,"task_id":9,"tid":"124142108>
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1643,"msg":"slot released","n_cache_tokens":2194,"n_ctx":8000,"n_past":2193,"n_system_tokens":0,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718888,"t>
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"POST","msg":"request","params":{},"path":"/completion","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp>
May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 16:34:48 | 200 | 5.512035902s | 127.0.0.1 | POST "/api/chat"
May 14 17:01:55 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 17:01:55 | 200 | 16.467µs | 127.0.0.1 | HEAD "/"
May 14 17:01:55 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 17:01:55 | 200 | 211.634µs | 127.0.0.1 | GET "/api/tags"

<!-- gh-comment-id:2111087516 --> @anuragrawal2024 commented on GitHub (May 14, 2024): Thanks for your response, @pdevine! I have an NVIDIA GeForce RTX 3060 (12 GB VRAM). Yes, I am using these parameters {"n_gpu_layers": -1, "offload_kqv": True} which offload the entire model onto the GPU. Let me know if you need anything additional. Thanks! Also, I wanted to quantify the slowdown. Using ollama, it's taking 1.5-2x compared to llama-cpp. Adding server logs to confirm that the entire model is offloaded to GPU: May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: ggml ctx size = 0.30 MiB May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: offloading 32 repeating layers to GPU May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: offloading non-repeating layers to GPU May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: **offloaded 33/33 layers to GPU** May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: CPU buffer size = 281.81 MiB May 14 16:34:43 anurag-Legion-T5-26IRB8 ollama[1726]: llm_load_tensors: CUDA0 buffer size = 4155.99 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: ....................................................................................... May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_ctx = 8000 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_batch = 512 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: n_ubatch = 512 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: freq_base = 500000.0 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: freq_scale = 1 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_kv_cache_init: CUDA0 KV buffer size = 1000.00 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: KV self size = 1000.00 MiB, K (f16): 500.00 MiB, V (f16): 500.00 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA_Host output buffer size = 0.50 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA0 compute buffer size = 547.63 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: CUDA_Host compute buffer size = 23.63 MiB May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: graph nodes = 1030 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[1726]: llama_new_context_with_model: graph splits = 2 May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"initialize","level":"INFO","line":448,"msg":"initializing slots","n_slots":1,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"initialize","level":"INFO","line":457,"msg":"new slot","n_ctx_slot":8000,"slot_id":0,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"main","level":"INFO","line":3067,"msg":"model loaded","tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"main","hostname":"127.0.0.1","level":"INFO","line":3270,"msg":"HTTP server listening","n_threads_http":"23","port":"42843","tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1581,"msg":"all slots are idle and system prompt is empty, clear the KV cache","tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":0,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":1,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47896,"status":200,"tid":"124139184582656","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":2,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":3,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47910,"status":200,"tid":"124138672824320","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":4,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47928,"status":200,"tid":"124139184582656","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47944,"status":200,"tid":"124141474951168","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47926,"status":200,"tid":"124138681217024","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":5,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47954,"status":200,"tid":"124138672824320","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":6,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":7,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"POST","msg":"request","params":{},"path":"/tokenize","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"process_single_task","level":"INFO","line":1509,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":8,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp":171> May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"launch_slot_with_data","level":"INFO","line":830,"msg":"slot is processing task","slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","ga_i":0,"level":"INFO","line":1812,"msg":"slot progression","n_past":0,"n_past_se":0,"n_prompt_tokens_processed":2161,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:44 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1839,"msg":"kv cache rm [p0, end)","p0":0,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718884} May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":269,"msg":"prompt eval time = 2687.66 ms / 2161 tokens ( 1.24 ms per token, 804.04 tokens per second)","n_prompt_tokens_processed":2161,"n_tokens_second":8> May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":283,"msg":"generation eval time = 637.36 ms / 33 runs ( 19.31 ms per token, 51.78 tokens per second)","n_decoded":33,"n_tokens_second":51.77623878573738,"> May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"print_timings","level":"INFO","line":293,"msg":" total time = 3325.02 ms","slot_id":0,"t_prompt_processing":2687.665,"t_token_generation":637.358,"t_total":3325.023,"task_id":9,"tid":"124142108> May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"update_slots","level":"INFO","line":1643,"msg":"slot released","n_cache_tokens":2194,"n_ctx":8000,"n_past":2193,"n_system_tokens":0,"slot_id":0,"task_id":9,"tid":"124142108921856","timestamp":1715718888,"t> May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[31689]: {"function":"log_server_request","level":"INFO","line":2737,"method":"POST","msg":"request","params":{},"path":"/completion","remote_addr":"127.0.0.1","remote_port":47968,"status":200,"tid":"124139096690688","timestamp> May 14 16:34:48 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 16:34:48 | 200 | 5.512035902s | 127.0.0.1 | POST "/api/chat" May 14 17:01:55 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 17:01:55 | 200 | 16.467µs | 127.0.0.1 | HEAD "/" May 14 17:01:55 anurag-Legion-T5-26IRB8 ollama[1726]: [GIN] 2024/05/14 - 17:01:55 | 200 | 211.634µs | 127.0.0.1 | GET "/api/tags"
Author
Owner

@anuragrawal2024 commented on GitHub (May 16, 2024):

@pdevine @dhiltgen Do you have any suggestions on this?

<!-- gh-comment-id:2115414156 --> @anuragrawal2024 commented on GitHub (May 16, 2024): @pdevine @dhiltgen Do you have any suggestions on this?
Author
Owner

@anuragrawal2024 commented on GitHub (Jun 18, 2024):

@pdevine @dhiltgen Reminder!

<!-- gh-comment-id:2176397313 --> @anuragrawal2024 commented on GitHub (Jun 18, 2024): @pdevine @dhiltgen Reminder!
Author
Owner

@dhiltgen commented on GitHub (Jun 18, 2024):

A few things to try to narrow this one down...

Try passing "use_mmap": false and see if that changes things.

Also can you share the llama.cpp configuration log line. In the Ollama logs it will look something like this:

INFO [main] system info | n_threads=4 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 0 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="140021226209280" timestamp=1718729924 total_threads=8

Perhaps there's a material difference in the compilation of the llama.cpp that's leading to the performance difference.

<!-- gh-comment-id:2176568822 --> @dhiltgen commented on GitHub (Jun 18, 2024): A few things to try to narrow this one down... Try passing `"use_mmap": false` and see if that changes things. Also can you share the llama.cpp configuration log line. In the Ollama logs it will look something like this: ``` INFO [main] system info | n_threads=4 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 0 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="140021226209280" timestamp=1718729924 total_threads=8 ``` Perhaps there's a material difference in the compilation of the llama.cpp that's leading to the performance difference.
Author
Owner

@dhiltgen commented on GitHub (Jul 3, 2024):

Let us know if you're still having performance problems.

<!-- gh-comment-id:2207468992 --> @dhiltgen commented on GitHub (Jul 3, 2024): Let us know if you're still having performance problems.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#28531