[GH-ISSUE #1018] [Bug] cant rebuild KT0.2.4 #720

Closed
opened 2026-10-29 14:43:20 +00:00 by bsakaguchi · 21 comments
Owner

Originally created by @CYSTEV-chn on GitHub (Apr 2, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1018

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed.
  • 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed.

Describe the bug

i show the log, where did i make error?
i did uninstall old KT , i sure....

Reproduction

error: subprocess-exited-with-error

× Building wheel for ktransformers (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/zewen/miniconda3/envs/ktransformers/bin/python /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp25j1mtcw
cwd: /home/zewen/ktransformers
Building wheel for ktransformers (pyproject.toml) ... error
ERROR: Failed building wheel for ktransformers
Failed to build ktransformers
ERROR: Failed to build installable wheels for some pyproject.toml based projects (ktransformers)

Environment

ubuntu 24.04
py 3.12
NVIDIA drivers 570
CUDA TOOLKIT 12.4

Originally created by @CYSTEV-chn on GitHub (Apr 2, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1018 ### Checklist - [ ] 1. I have searched related issues but cannot get the expected help. - [ ] 2. The bug has not been fixed in the latest version. - [ ] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback. - [ ] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed. - [ ] 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed. ### Describe the bug i show the log, where did i make error? i did uninstall old KT , i sure.... ### Reproduction error: subprocess-exited-with-error × Building wheel for ktransformers (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /home/zewen/miniconda3/envs/ktransformers/bin/python /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp25j1mtcw cwd: /home/zewen/ktransformers Building wheel for ktransformers (pyproject.toml) ... error ERROR: Failed building wheel for ktransformers Failed to build ktransformers ERROR: Failed to build installable wheels for some pyproject.toml based projects (ktransformers) ### Environment ubuntu 24.04 py 3.12 NVIDIA drivers 570 CUDA TOOLKIT 12.4
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 2, 2025):

i solved the bug:
2. Install dependencies:
sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf

i changed it :
sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf

then i succed.
Installation completed successfully

<!-- gh-comment-id:2772120567 --> @CYSTEV-chn commented on GitHub (Apr 2, 2025): i solved the bug: 2. Install dependencies: sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf i changed it : sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf then i succed. Installation completed successfully
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 2, 2025):

yes! but the chat likely dont work ?
the same as Cherry studio.
Image

<!-- gh-comment-id:2772261338 --> @CYSTEV-chn commented on GitHub (Apr 2, 2025): yes! but the chat likely dont work ? the same as Cherry studio. ![Image](https://github.com/user-attachments/assets/a5655354-7928-4de3-b9ed-5c2676f883fd)
Author
Owner

@qiyuxinlin commented on GitHub (Apr 2, 2025):

Hello @CYSTEV-chn, can you see the three processes running through nvidia-smi, or can you paste the log of ~/.ktransformers/logs/rpc.log

<!-- gh-comment-id:2772429944 --> @qiyuxinlin commented on GitHub (Apr 2, 2025): Hello @CYSTEV-chn, can you see the three processes running through nvidia-smi, or can you paste the log of ~/.ktransformers/logs/rpc.log
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 2, 2025):

Hello @CYSTEV-chn, can you see the three processes running through nvidia-smi, or can you paste the log of ~/.ktransformers/logs/rpc.log

A new version of the following files was downloaded from https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite-Chat:

  • configuration_deepseek.py
    . Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.
    [2025-04-02 18:31:45.930] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1
    [2025-04-02 18:31:45.930] [info] [scheduler.cpp:60] Each GPU Total: 549MiB, Model Params: 0MiB, KVCache: 549MiB, Left: 0MiB
    [2025-04-02 18:31:45.930] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 72
    [2025-04-02 18:31:45.930] [info] [scheduler.cpp:890] Using Strategy FCFS
    [2025-04-02 18:31:45.930] [info] [scheduler.cpp:442]
    Scheduler Settings:
    model_name: DeepSeek-V2-Lite-Chat
    quant_type: BF16
    model_path: deepseek-ai/DeepSeek-V2-Lite-Chat
    params_count: 0
    layer_count: 27
    num_k_heads: 1
    k_head_dim: 576
    bytes_per_params: 2
    bytes_per_kv_cache_element: 2
    page_size: 256
    gpu_device_id: 0
    gpu_memory_size: 575.67M
    memory_utilization_percentage: 1
    max_batch_size: 4
    recommended_chunk_prefill_token_count: 127
    sched_metrics_port: 55863
    kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    kvc2_root_path: /mnt/data/persist-kvc
    memory_pool_size_GB: 500
    evict_count: 40
    kvc2_metrics_port: 47883
    load_from_disk: false
    save_to_disk: true
    strategy_name: FCFS
    gpu_device_count: 1

load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
Loaded Model Configs

  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
    warnings.warn('resource_tracker: There appear to be %d '
    A new version of the following files was downloaded from https://huggingface.co/deepseek-ai/DeepSeek-R1:
  • configuration_deepseek.py
    . Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.
    [2025-04-02 19:08:34.828] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1
    [2025-04-02 19:08:34.828] [info] [scheduler.cpp:60] Each GPU Total: 6862MiB, Model Params: 0MiB, KVCache: 6862MiB, Left: 0MiB
    [2025-04-02 19:08:34.828] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 400
    [2025-04-02 19:08:34.828] [info] [scheduler.cpp:890] Using Strategy FCFS
    [2025-04-02 19:08:34.828] [info] [scheduler.cpp:442]
    Scheduler Settings:
    model_name: DeepSeek-R1
    quant_type: BF16
    model_path: deepseek-ai/DeepSeek-R1
    params_count: 0
    layer_count: 61
    num_k_heads: 1
    k_head_dim: 576
    bytes_per_params: 2
    bytes_per_kv_cache_element: 2
    page_size: 256
    gpu_device_id: 0
    gpu_memory_size: 7.20G
    memory_utilization_percentage: 1
    max_batch_size: 4
    recommended_chunk_prefill_token_count: 127
    sched_metrics_port: 37579
    kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    kvc2_root_path: /mnt/data/persist-kvc
    memory_pool_size_GB: 500
    evict_count: 40
    kvc2_metrics_port: 41737
    load_from_disk: false
    save_to_disk: true
    strategy_name: FCFS
    gpu_device_count: 1

load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
Loaded Model Configs

  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
    warnings.warn('resource_tracker: There appear to be %d '
    [2025-04-02 19:14:12.527] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1
    [2025-04-02 19:14:12.527] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB
    [2025-04-02 19:14:12.527] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128
    [2025-04-02 19:14:12.527] [info] [scheduler.cpp:890] Using Strategy FCFS
    [2025-04-02 19:14:12.527] [info] [scheduler.cpp:442]
    Scheduler Settings:
    model_name: DeepSeek-R1-INT4
    quant_type: BF16
    model_path: /home/zewen/fastllm/DeepSeek-R1-INT4
    params_count: 0
    layer_count: 61
    num_k_heads: 1
    k_head_dim: 576
    bytes_per_params: 2
    bytes_per_kv_cache_element: 2
    page_size: 256
    gpu_device_id: 0
    gpu_memory_size: 2.30G
    memory_utilization_percentage: 1
    max_batch_size: 4
    recommended_chunk_prefill_token_count: 127
    sched_metrics_port: 47951
    kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    kvc2_root_path: /mnt/data/persist-kvc
    memory_pool_size_GB: 500
    evict_count: 40
    kvc2_metrics_port: 35849
    load_from_disk: false
    save_to_disk: true
    strategy_name: FCFS
    gpu_device_count: 1

load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
Loaded Model Configs

  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1332] Creating KVC2 using these config
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1333] GPU Only: true
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1334] Load: false, Save: true
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1335] Path: /mnt/data/persist-kvc
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1336] Config Path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1337] Num Token/Page: 256, Memory Pool Size: 500.00G
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1339] Evict Count: 40, Metrics Port: 35849
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1340] Recompute Ratio: 0.20
    [2025-04-02 19:14:12.527] [info] [prefix.cpp:1344] GPU Devices: 0
    [2025-04-02 19:14:12.528] [info] [prefix.cpp:1345] Layer Count: 61, Total KVCache Pages: 128
    [2025-04-02 19:14:12.528] [info] [prefix.cpp:1347] Num Token/Page: 256, Num K Heads: 1
    [2025-04-02 19:14:12.528] [info] [prefix.cpp:1348] K Head Dim: 576, Tensor Type: 15
    [2025-04-02 19:14:12.528] [info] [prefix.cpp:1350] MemcpyCudaStreams/Device: 4
    load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
    Loaded Model Configs
  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    load_quant_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/quant_configs.json"
    Loaded Quant Configs
  • BF16
  • FP16
  • FP32
  • Q4_0
  • Q8_0
    [2025-04-02 19:14:12.528] [info] [prefix.cpp:1361] Creating kvc2 metrics exporter on 0.0.0.0:35849
    [2025-04-02 19:14:12.528] [critical] [prefix.cpp:1388] GPU ONLY MODE, NO PREFIX CACHE
    [2025-04-02 19:14:12.528] [info] [gpu_cache.cpp:15] Number of available GPUs: 1, want 1
    [2025-04-02 19:14:12.528] [warning] [gpu_cache.cpp:28] Creating GPU Cache
    [2025-04-02 19:14:12.528] [info] [gpu_cache.cpp:45] Creating KV Page Cache, Shape (61,128,256,1,576), Size 2196 MiB
    [2025-04-02 19:14:12.999] [info] [gpu_cache.cpp:54] K Page Cache of GPU 0 is created
    [2025-04-02 19:14:12.999] [warning] [gpu_cache.cpp:72] Disalbe V Cache
    [2025-04-02 19:14:12.999] [info] [scheduler.cpp:488] Creating scheduler metrics exporter on 0.0.0.0:47951
    [2025-04-02 19:14:13.001] [warning] [scheduler.cpp:635] Starting Scheduler Event Loop
    [2025-04-02 19:21:13.085] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.086] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed
    [2025-04-02 19:21:13.088] [info] [scheduler.cpp:628] Batch 0x7761540022e0 is not consumed
    [2025-04-02 19:21:13.088] [info] [scheduler.cpp:628] Batch 0x7761540022e0 is not consumed
    [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed
    [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed
    [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed
    [2025-04-02 19:21:14.740] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed
    [2025-04-02 19:21:16.499] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed
    [2025-04-02 19:21:16.800] [info] [scheduler.cpp:628] Batch 0x776154005760 is not consumed
    [2025-04-02 19:21:19.921] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed
    [2025-04-02 19:21:23.547] [info] [scheduler.cpp:628] Batch 0x776154005850 is not consumed
    [2025-04-02 19:21:24.287] [info] [scheduler.cpp:569] New Query 1 is added
    [2025-04-02 19:21:24.287] [info] [scheduler.cpp:686] Preparing Query 1
    terminate called after throwing an instance of 'std::out_of_range'
    what(): map::at
    [2025-04-02 19:38:58.798] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1
    [2025-04-02 19:38:58.798] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB
    [2025-04-02 19:38:58.798] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128
    [2025-04-02 19:38:58.798] [info] [scheduler.cpp:890] Using Strategy FCFS
    [2025-04-02 19:38:58.798] [info] [scheduler.cpp:442]
    Scheduler Settings:
    model_name: DeepSeek-R1
    quant_type: BF16
    model_path: deepseek-ai/DeepSeek-R1
    params_count: 0
    layer_count: 61
    num_k_heads: 1
    k_head_dim: 576
    bytes_per_params: 2
    bytes_per_kv_cache_element: 2
    page_size: 256
    gpu_device_id: 0
    gpu_memory_size: 2.30G
    memory_utilization_percentage: 1
    max_batch_size: 4
    recommended_chunk_prefill_token_count: 127
    sched_metrics_port: 45069
    kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    kvc2_root_path: /mnt/data/persist-kvc
    memory_pool_size_GB: 500
    evict_count: 40
    kvc2_metrics_port: 58007
    load_from_disk: false
    save_to_disk: true
    strategy_name: FCFS
    gpu_device_count: 1

load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
Loaded Model Configs

  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    [2025-04-02 19:43:11.314] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1
    [2025-04-02 19:43:11.314] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB
    [2025-04-02 19:43:11.314] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128
    [2025-04-02 19:43:11.314] [info] [scheduler.cpp:890] Using Strategy FCFS
    [2025-04-02 19:43:11.314] [info] [scheduler.cpp:442]
    Scheduler Settings:
    model_name: DeepSeek-R1-INT4
    quant_type: BF16
    model_path: /home/zewen/fastllm/DeepSeek-R1-INT4
    params_count: 0
    layer_count: 61
    num_k_heads: 1
    k_head_dim: 576
    bytes_per_params: 2
    bytes_per_kv_cache_element: 2
    page_size: 256
    gpu_device_id: 0
    gpu_memory_size: 2.30G
    memory_utilization_percentage: 1
    max_batch_size: 4
    recommended_chunk_prefill_token_count: 127
    sched_metrics_port: 38679
    kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    kvc2_root_path: /mnt/data/persist-kvc
    memory_pool_size_GB: 500
    evict_count: 40
    kvc2_metrics_port: 60305
    load_from_disk: false
    save_to_disk: true
    strategy_name: FCFS
    gpu_device_count: 1

load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
Loaded Model Configs

  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1332] Creating KVC2 using these config
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1333] GPU Only: true
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1334] Load: false, Save: true
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1335] Path: /mnt/data/persist-kvc
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1336] Config Path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1337] Num Token/Page: 256, Memory Pool Size: 500.00G
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1339] Evict Count: 40, Metrics Port: 60305
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1340] Recompute Ratio: 0.20
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1344] GPU Devices: 0
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1345] Layer Count: 61, Total KVCache Pages: 128
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1347] Num Token/Page: 256, Num K Heads: 1
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1348] K Head Dim: 576, Tensor Type: 15
    [2025-04-02 19:43:11.314] [info] [prefix.cpp:1350] MemcpyCudaStreams/Device: 4
    load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json"
    Loaded Model Configs
  • DeepSeek-Coder-V2-Instruct
  • DeepSeek-R1
  • DeepSeek-V2-Lite-Chat
  • DeepSeek-V3
  • DeepSeek-V3-bf16
  • LLaMA-2-7B-32K
  • Moonlight-16B-A3B-Instruct
  • Qwen2.5-32B-Instruct
  • Qwen2.5-32B-Instruct-GPTQ-Int4
  • Qwen2.5-7B-Instruct
  • Qwen2.5-7B-Instruct-GPTQ-Int4
  • qwen2-72b-instruct
    load_quant_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/quant_configs.json"
    Loaded Quant Configs
  • BF16
  • FP16
  • FP32
  • Q4_0
  • Q8_0
    [2025-04-02 19:43:11.315] [info] [prefix.cpp:1361] Creating kvc2 metrics exporter on 0.0.0.0:60305
    [2025-04-02 19:43:11.315] [critical] [prefix.cpp:1388] GPU ONLY MODE, NO PREFIX CACHE
    [2025-04-02 19:43:11.315] [info] [gpu_cache.cpp:15] Number of available GPUs: 1, want 1
    [2025-04-02 19:43:11.315] [warning] [gpu_cache.cpp:28] Creating GPU Cache
    [2025-04-02 19:43:11.315] [info] [gpu_cache.cpp:45] Creating KV Page Cache, Shape (61,128,256,1,576), Size 2196 MiB
    [2025-04-02 19:43:11.771] [info] [gpu_cache.cpp:54] K Page Cache of GPU 0 is created
    [2025-04-02 19:43:11.771] [warning] [gpu_cache.cpp:72] Disalbe V Cache
    [2025-04-02 19:43:11.771] [info] [scheduler.cpp:488] Creating scheduler metrics exporter on 0.0.0.0:38679
    [2025-04-02 19:43:11.773] [warning] [scheduler.cpp:635] Starting Scheduler Event Loop
    [2025-04-02 19:45:36.969] [info] [scheduler.cpp:628] Batch 0x7cf610001b00 is not consumed
    [2025-04-02 19:45:36.973] [info] [scheduler.cpp:628] Batch 0x7cf610001fb0 is not consumed
    [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002190 is not consumed
    [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002190 is not consumed
    [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002460 is not consumed
    [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002dc0 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.979] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.982] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.982] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.001] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.001] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed
    [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed
    [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed
    [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed
    [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed
    [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed
    [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed
    [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610006060 is not consumed
    [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed
    [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:45:37.008] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.008] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:45:37.392] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed
    [2025-04-02 19:45:39.462] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:45:40.382] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed
    [2025-04-02 19:45:40.783] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:45:47.429] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed
    [2025-04-02 19:45:48.638] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:48.750] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:45:51.362] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:45:52.472] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed
    [2025-04-02 19:46:05.779] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed
    [2025-04-02 19:46:08.503] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:10.199] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:46:11.105] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed
    [2025-04-02 19:46:11.119] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:11.542] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:13.079] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed
    [2025-04-02 19:46:13.097] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:15.686] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed
    [2025-04-02 19:46:18.002] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:18.034] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed
    [2025-04-02 19:46:19.142] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:19.243] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:20.148] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:22.255] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed
    [2025-04-02 19:46:22.576] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:24.263] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed
    [2025-04-02 19:46:25.548] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed
    [2025-04-02 19:46:26.022] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed
    [2025-04-02 19:46:31.696] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:32.465] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:35.546] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:46:37.063] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:38.462] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:43.583] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed
    [2025-04-02 19:46:45.567] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:46:51.692] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed
    [2025-04-02 19:46:52.896] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:56.726] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:57.757] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:46:58.404] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:47:01.768] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:01.852] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:02.957] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:03.145] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:04.262] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed
    [2025-04-02 19:47:08.624] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:09.250] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:09.743] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:09.864] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:11.099] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:14.709] [info] [scheduler.cpp:628] Batch 0x7cf610005ca0 is not consumed
    [2025-04-02 19:47:19.321] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:19.838] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:20.538] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:21.848] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:25.968] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed
    [2025-04-02 19:47:26.127] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:27.513] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:28.237] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed
    [2025-04-02 19:47:30.855] [info] [scheduler.cpp:569] New Query 1 is added
    [2025-04-02 19:47:30.855] [info] [scheduler.cpp:686] Preparing Query 1
    terminate called after throwing an instance of 'std::out_of_range'
    what(): map::at
<!-- gh-comment-id:2772499589 --> @CYSTEV-chn commented on GitHub (Apr 2, 2025): > Hello [@CYSTEV-chn](https://github.com/CYSTEV-chn), can you see the three processes running through nvidia-smi, or can you paste the log of ~/.ktransformers/logs/rpc.log A new version of the following files was downloaded from https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite-Chat: - configuration_deepseek.py . Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision. [2025-04-02 18:31:45.930] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1 [2025-04-02 18:31:45.930] [info] [scheduler.cpp:60] Each GPU Total: 549MiB, Model Params: 0MiB, KVCache: 549MiB, Left: 0MiB [2025-04-02 18:31:45.930] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 72 [2025-04-02 18:31:45.930] [info] [scheduler.cpp:890] Using Strategy FCFS [2025-04-02 18:31:45.930] [info] [scheduler.cpp:442] Scheduler Settings: model_name: DeepSeek-V2-Lite-Chat quant_type: BF16 model_path: deepseek-ai/DeepSeek-V2-Lite-Chat params_count: 0 layer_count: 27 num_k_heads: 1 k_head_dim: 576 bytes_per_params: 2 bytes_per_kv_cache_element: 2 page_size: 256 gpu_device_id: 0 gpu_memory_size: 575.67M memory_utilization_percentage: 1 max_batch_size: 4 recommended_chunk_prefill_token_count: 127 sched_metrics_port: 55863 kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs kvc2_root_path: /mnt/data/persist-kvc memory_pool_size_GB: 500 evict_count: 40 kvc2_metrics_port: 47883 load_from_disk: false save_to_disk: true strategy_name: FCFS gpu_device_count: 1 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' A new version of the following files was downloaded from https://huggingface.co/deepseek-ai/DeepSeek-R1: - configuration_deepseek.py . Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision. [2025-04-02 19:08:34.828] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1 [2025-04-02 19:08:34.828] [info] [scheduler.cpp:60] Each GPU Total: 6862MiB, Model Params: 0MiB, KVCache: 6862MiB, Left: 0MiB [2025-04-02 19:08:34.828] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 400 [2025-04-02 19:08:34.828] [info] [scheduler.cpp:890] Using Strategy FCFS [2025-04-02 19:08:34.828] [info] [scheduler.cpp:442] Scheduler Settings: model_name: DeepSeek-R1 quant_type: BF16 model_path: deepseek-ai/DeepSeek-R1 params_count: 0 layer_count: 61 num_k_heads: 1 k_head_dim: 576 bytes_per_params: 2 bytes_per_kv_cache_element: 2 page_size: 256 gpu_device_id: 0 gpu_memory_size: 7.20G memory_utilization_percentage: 1 max_batch_size: 4 recommended_chunk_prefill_token_count: 127 sched_metrics_port: 37579 kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs kvc2_root_path: /mnt/data/persist-kvc memory_pool_size_GB: 500 evict_count: 40 kvc2_metrics_port: 41737 load_from_disk: false save_to_disk: true strategy_name: FCFS gpu_device_count: 1 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' [2025-04-02 19:14:12.527] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1 [2025-04-02 19:14:12.527] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB [2025-04-02 19:14:12.527] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128 [2025-04-02 19:14:12.527] [info] [scheduler.cpp:890] Using Strategy FCFS [2025-04-02 19:14:12.527] [info] [scheduler.cpp:442] Scheduler Settings: model_name: DeepSeek-R1-INT4 quant_type: BF16 model_path: /home/zewen/fastllm/DeepSeek-R1-INT4 params_count: 0 layer_count: 61 num_k_heads: 1 k_head_dim: 576 bytes_per_params: 2 bytes_per_kv_cache_element: 2 page_size: 256 gpu_device_id: 0 gpu_memory_size: 2.30G memory_utilization_percentage: 1 max_batch_size: 4 recommended_chunk_prefill_token_count: 127 sched_metrics_port: 47951 kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs kvc2_root_path: /mnt/data/persist-kvc memory_pool_size_GB: 500 evict_count: 40 kvc2_metrics_port: 35849 load_from_disk: false save_to_disk: true strategy_name: FCFS gpu_device_count: 1 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct [2025-04-02 19:14:12.527] [info] [prefix.cpp:1332] Creating KVC2 using these config [2025-04-02 19:14:12.527] [info] [prefix.cpp:1333] GPU Only: true [2025-04-02 19:14:12.527] [info] [prefix.cpp:1334] Load: false, Save: true [2025-04-02 19:14:12.527] [info] [prefix.cpp:1335] Path: /mnt/data/persist-kvc [2025-04-02 19:14:12.527] [info] [prefix.cpp:1336] Config Path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs [2025-04-02 19:14:12.527] [info] [prefix.cpp:1337] Num Token/Page: 256, Memory Pool Size: 500.00G [2025-04-02 19:14:12.527] [info] [prefix.cpp:1339] Evict Count: 40, Metrics Port: 35849 [2025-04-02 19:14:12.527] [info] [prefix.cpp:1340] Recompute Ratio: 0.20 [2025-04-02 19:14:12.527] [info] [prefix.cpp:1344] GPU Devices: 0 [2025-04-02 19:14:12.528] [info] [prefix.cpp:1345] Layer Count: 61, Total KVCache Pages: 128 [2025-04-02 19:14:12.528] [info] [prefix.cpp:1347] Num Token/Page: 256, Num K Heads: 1 [2025-04-02 19:14:12.528] [info] [prefix.cpp:1348] K Head Dim: 576, Tensor Type: 15 [2025-04-02 19:14:12.528] [info] [prefix.cpp:1350] MemcpyCudaStreams/Device: 4 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct load_quant_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/quant_configs.json" Loaded Quant Configs - BF16 - FP16 - FP32 - Q4_0 - Q8_0 [2025-04-02 19:14:12.528] [info] [prefix.cpp:1361] Creating kvc2 metrics exporter on 0.0.0.0:35849 [2025-04-02 19:14:12.528] [critical] [prefix.cpp:1388] GPU ONLY MODE, NO PREFIX CACHE [2025-04-02 19:14:12.528] [info] [gpu_cache.cpp:15] Number of available GPUs: 1, want 1 [2025-04-02 19:14:12.528] [warning] [gpu_cache.cpp:28] Creating GPU Cache [2025-04-02 19:14:12.528] [info] [gpu_cache.cpp:45] Creating KV Page Cache, Shape (61,128,256,1,576), Size 2196 MiB [2025-04-02 19:14:12.999] [info] [gpu_cache.cpp:54] K Page Cache of GPU 0 is created [2025-04-02 19:14:12.999] [warning] [gpu_cache.cpp:72] Disalbe V Cache [2025-04-02 19:14:12.999] [info] [scheduler.cpp:488] Creating scheduler metrics exporter on 0.0.0.0:47951 [2025-04-02 19:14:13.001] [warning] [scheduler.cpp:635] Starting Scheduler Event Loop [2025-04-02 19:21:13.085] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.086] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.087] [info] [scheduler.cpp:628] Batch 0x776154001890 is not consumed [2025-04-02 19:21:13.088] [info] [scheduler.cpp:628] Batch 0x7761540022e0 is not consumed [2025-04-02 19:21:13.088] [info] [scheduler.cpp:628] Batch 0x7761540022e0 is not consumed [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed [2025-04-02 19:21:13.089] [info] [scheduler.cpp:628] Batch 0x7761540025b0 is not consumed [2025-04-02 19:21:14.740] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed [2025-04-02 19:21:16.499] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed [2025-04-02 19:21:16.800] [info] [scheduler.cpp:628] Batch 0x776154005760 is not consumed [2025-04-02 19:21:19.921] [info] [scheduler.cpp:628] Batch 0x7761540061b0 is not consumed [2025-04-02 19:21:23.547] [info] [scheduler.cpp:628] Batch 0x776154005850 is not consumed [2025-04-02 19:21:24.287] [info] [scheduler.cpp:569] New Query 1 is added [2025-04-02 19:21:24.287] [info] [scheduler.cpp:686] Preparing Query 1 terminate called after throwing an instance of 'std::out_of_range' what(): map::at [2025-04-02 19:38:58.798] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1 [2025-04-02 19:38:58.798] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB [2025-04-02 19:38:58.798] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128 [2025-04-02 19:38:58.798] [info] [scheduler.cpp:890] Using Strategy FCFS [2025-04-02 19:38:58.798] [info] [scheduler.cpp:442] Scheduler Settings: model_name: DeepSeek-R1 quant_type: BF16 model_path: deepseek-ai/DeepSeek-R1 params_count: 0 layer_count: 61 num_k_heads: 1 k_head_dim: 576 bytes_per_params: 2 bytes_per_kv_cache_element: 2 page_size: 256 gpu_device_id: 0 gpu_memory_size: 2.30G memory_utilization_percentage: 1 max_batch_size: 4 recommended_chunk_prefill_token_count: 127 sched_metrics_port: 45069 kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs kvc2_root_path: /mnt/data/persist-kvc memory_pool_size_GB: 500 evict_count: 40 kvc2_metrics_port: 58007 load_from_disk: false save_to_disk: true strategy_name: FCFS gpu_device_count: 1 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct [2025-04-02 19:43:11.314] [info] [scheduler.cpp:31] Number of available GPUs: 1, want 1 [2025-04-02 19:43:11.314] [info] [scheduler.cpp:60] Each GPU Total: 2196MiB, Model Params: 0MiB, KVCache: 2196MiB, Left: 0MiB [2025-04-02 19:43:11.314] [info] [scheduler.cpp:75] total_kvcache_pages is auto derived as 128 [2025-04-02 19:43:11.314] [info] [scheduler.cpp:890] Using Strategy FCFS [2025-04-02 19:43:11.314] [info] [scheduler.cpp:442] Scheduler Settings: model_name: DeepSeek-R1-INT4 quant_type: BF16 model_path: /home/zewen/fastllm/DeepSeek-R1-INT4 params_count: 0 layer_count: 61 num_k_heads: 1 k_head_dim: 576 bytes_per_params: 2 bytes_per_kv_cache_element: 2 page_size: 256 gpu_device_id: 0 gpu_memory_size: 2.30G memory_utilization_percentage: 1 max_batch_size: 4 recommended_chunk_prefill_token_count: 127 sched_metrics_port: 38679 kvc2_config_path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs kvc2_root_path: /mnt/data/persist-kvc memory_pool_size_GB: 500 evict_count: 40 kvc2_metrics_port: 60305 load_from_disk: false save_to_disk: true strategy_name: FCFS gpu_device_count: 1 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct [2025-04-02 19:43:11.314] [info] [prefix.cpp:1332] Creating KVC2 using these config [2025-04-02 19:43:11.314] [info] [prefix.cpp:1333] GPU Only: true [2025-04-02 19:43:11.314] [info] [prefix.cpp:1334] Load: false, Save: true [2025-04-02 19:43:11.314] [info] [prefix.cpp:1335] Path: /mnt/data/persist-kvc [2025-04-02 19:43:11.314] [info] [prefix.cpp:1336] Config Path: /home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs [2025-04-02 19:43:11.314] [info] [prefix.cpp:1337] Num Token/Page: 256, Memory Pool Size: 500.00G [2025-04-02 19:43:11.314] [info] [prefix.cpp:1339] Evict Count: 40, Metrics Port: 60305 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1340] Recompute Ratio: 0.20 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1344] GPU Devices: 0 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1345] Layer Count: 61, Total KVCache Pages: 128 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1347] Num Token/Page: 256, Num K Heads: 1 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1348] K Head Dim: 576, Tensor Type: 15 [2025-04-02 19:43:11.314] [info] [prefix.cpp:1350] MemcpyCudaStreams/Device: 4 load_model_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/model_configs.json" Loaded Model Configs - DeepSeek-Coder-V2-Instruct - DeepSeek-R1 - DeepSeek-V2-Lite-Chat - DeepSeek-V3 - DeepSeek-V3-bf16 - LLaMA-2-7B-32K - Moonlight-16B-A3B-Instruct - Qwen2.5-32B-Instruct - Qwen2.5-32B-Instruct-GPTQ-Int4 - Qwen2.5-7B-Instruct - Qwen2.5-7B-Instruct-GPTQ-Int4 - qwen2-72b-instruct load_quant_configs from "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/../../configs/quant_configs.json" Loaded Quant Configs - BF16 - FP16 - FP32 - Q4_0 - Q8_0 [2025-04-02 19:43:11.315] [info] [prefix.cpp:1361] Creating kvc2 metrics exporter on 0.0.0.0:60305 [2025-04-02 19:43:11.315] [critical] [prefix.cpp:1388] GPU ONLY MODE, NO PREFIX CACHE [2025-04-02 19:43:11.315] [info] [gpu_cache.cpp:15] Number of available GPUs: 1, want 1 [2025-04-02 19:43:11.315] [warning] [gpu_cache.cpp:28] Creating GPU Cache [2025-04-02 19:43:11.315] [info] [gpu_cache.cpp:45] Creating KV Page Cache, Shape (61,128,256,1,576), Size 2196 MiB [2025-04-02 19:43:11.771] [info] [gpu_cache.cpp:54] K Page Cache of GPU 0 is created [2025-04-02 19:43:11.771] [warning] [gpu_cache.cpp:72] Disalbe V Cache [2025-04-02 19:43:11.771] [info] [scheduler.cpp:488] Creating scheduler metrics exporter on 0.0.0.0:38679 [2025-04-02 19:43:11.773] [warning] [scheduler.cpp:635] Starting Scheduler Event Loop [2025-04-02 19:45:36.969] [info] [scheduler.cpp:628] Batch 0x7cf610001b00 is not consumed [2025-04-02 19:45:36.973] [info] [scheduler.cpp:628] Batch 0x7cf610001fb0 is not consumed [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002190 is not consumed [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002190 is not consumed [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002460 is not consumed [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.974] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.975] [info] [scheduler.cpp:628] Batch 0x7cf610002640 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002dc0 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.976] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610002fa0 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.977] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.978] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.979] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.982] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.982] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.983] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.984] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.985] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.986] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.987] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.988] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.989] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.990] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.991] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.992] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.993] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.996] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.997] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.998] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:36.999] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.000] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.001] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.001] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:37.002] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:45:37.003] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed [2025-04-02 19:45:37.004] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed [2025-04-02 19:45:37.005] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610006060 is not consumed [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:37.006] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:45:37.007] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:45:37.008] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.008] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:45:37.392] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed [2025-04-02 19:45:39.462] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:45:40.382] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed [2025-04-02 19:45:40.783] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:45:47.429] [info] [scheduler.cpp:628] Batch 0x7cf610003720 is not consumed [2025-04-02 19:45:48.638] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:48.750] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:45:51.362] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:45:52.472] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed [2025-04-02 19:46:05.779] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed [2025-04-02 19:46:08.503] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:10.199] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:46:11.105] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed [2025-04-02 19:46:11.119] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:11.542] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:13.079] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed [2025-04-02 19:46:13.097] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:15.686] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed [2025-04-02 19:46:18.002] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:18.034] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed [2025-04-02 19:46:19.142] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:19.243] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:20.148] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:22.255] [info] [scheduler.cpp:628] Batch 0x7cf610006240 is not consumed [2025-04-02 19:46:22.576] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:24.263] [info] [scheduler.cpp:628] Batch 0x7cf610006420 is not consumed [2025-04-02 19:46:25.548] [info] [scheduler.cpp:628] Batch 0x7cf610006150 is not consumed [2025-04-02 19:46:26.022] [info] [scheduler.cpp:628] Batch 0x7cf610006330 is not consumed [2025-04-02 19:46:31.696] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:32.465] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:35.546] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:46:37.063] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:38.462] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:43.583] [info] [scheduler.cpp:628] Batch 0x7cf610005e80 is not consumed [2025-04-02 19:46:45.567] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:46:51.692] [info] [scheduler.cpp:628] Batch 0x7cf610005d90 is not consumed [2025-04-02 19:46:52.896] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:56.726] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:57.757] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:46:58.404] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:47:01.768] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:01.852] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:02.957] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:03.145] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:04.262] [info] [scheduler.cpp:628] Batch 0x7cf610005bb0 is not consumed [2025-04-02 19:47:08.624] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:09.250] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:09.743] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:09.864] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:11.099] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:14.709] [info] [scheduler.cpp:628] Batch 0x7cf610005ca0 is not consumed [2025-04-02 19:47:19.321] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:19.838] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:20.538] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:21.848] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:25.968] [info] [scheduler.cpp:628] Batch 0x7cf610005f70 is not consumed [2025-04-02 19:47:26.127] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:27.513] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:28.237] [info] [scheduler.cpp:628] Batch 0x7cf610006510 is not consumed [2025-04-02 19:47:30.855] [info] [scheduler.cpp:569] New Query 1 is added [2025-04-02 19:47:30.855] [info] [scheduler.cpp:686] Preparing Query 1 terminate called after throwing an instance of 'std::out_of_range' what(): map::at
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 2, 2025):

i used these commands to upload deepseek-R1-Q4:

python ktransformers/server/main.py
--port 6006
--model_path /home/zewen/model/DeepSeek-R1-Q4_K_M
--gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M
--optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml
--max_new_tokens 32768
--cache_lens 131072
--chunk_size 256
--max_batch_size 4
--model_name "DeepSeek-R1"
--backend_type balance_serve

<!-- gh-comment-id:2772634858 --> @CYSTEV-chn commented on GitHub (Apr 2, 2025): i used these commands to upload deepseek-R1-Q4: python ktransformers/server/main.py \ --port 6006 \ --model_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \ --max_new_tokens 32768 \ --cache_lens 131072 \ --chunk_size 256 \ --max_batch_size 4 \ --model_name "DeepSeek-R1" \ --backend_type balance_serve
Author
Owner

@Colacalc commented on GitHub (Apr 3, 2025):

According to the above solution, I still encountered the error, as follows: FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda/bin /nvcc'
error: subprocess-exited-with-error
note: This error originates from a subprocess, and is likely not a problem wi th pip.
full command: /home/x/miniconda3/envs/kt/bin/python /home/x/miniconda3/envs/k t/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_proc ess.py prepare_metadata_for_build_wheel /tmp/tmp2fmqwk48
cwd: /home/x/Desktop/ktransformers
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

Environment
ubuntu 22.04
py 3.12
NVIDIA drivers 550
CUDA TOOLKIT 12.4
Torch2.6.0
ktransformers 0.2.4

<!-- gh-comment-id:2774206822 --> @Colacalc commented on GitHub (Apr 3, 2025): According to the above solution, I still encountered the error, as follows: FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda/bin /nvcc' error: subprocess-exited-with-error note: This error originates from a subprocess, and is likely not a problem wi th pip. full command: /home/x/miniconda3/envs/kt/bin/python /home/x/miniconda3/envs/k t/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_proc ess.py prepare_metadata_for_build_wheel /tmp/tmp2fmqwk48 cwd: /home/x/Desktop/ktransformers Preparing metadata (pyproject.toml) ... error error: metadata-generation-failed Environment ubuntu 22.04 py 3.12 NVIDIA drivers 550 CUDA TOOLKIT 12.4 Torch2.6.0 ktransformers 0.2.4
Author
Owner

@Colacalc commented on GitHub (Apr 3, 2025):

i solved the bug: 2. Install dependencies: sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf

i changed it : sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf

then i succed. Installation completed successfully

According to your approach, I encountered the following problems.:

FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda:/usr/local/cuda:/usr/local/cuda/bin/nvcc'
error: subprocess-exited-with-error

Environment

ubuntu 22.04
py 3.12
NVIDIA drivers 550
CUDA TOOLKIT 12.4
Torch2.6.0
ktransformers 0.2.4

<!-- gh-comment-id:2774266635 --> @Colacalc commented on GitHub (Apr 3, 2025): > i solved the bug: 2. Install dependencies: sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf > > i changed it : sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf > > then i succed. Installation completed successfully According to your approach, I encountered the following problems.: FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda:/usr/local/cuda:/usr/local/cuda/bin/nvcc' error: subprocess-exited-with-error # Environment ubuntu 22.04 py 3.12 NVIDIA drivers 550 CUDA TOOLKIT 12.4 Torch2.6.0 ktransformers 0.2.4
Author
Owner

@wkgcass commented on GitHub (Apr 3, 2025):

相同问题,rpc.log中有如下异常:

terminate called after throwing an instance of 'std::out_of_range'

gdb为如下stack trace

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x000076983b64527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x000076983b6288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x000076983aca5ff5 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x000076983acbb0da in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x000076983aca5a55 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8  0x000076983acbb391 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x000076983aca932d in std::__throw_out_of_range(char const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x0000769716861f1c in std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ModelConfig, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ModelConfig> > >::at (
    __k=<error reading variable: Cannot access memory at address 0x6b6565737065654c>, this=0x7697168ff0a0 <model_configs>)
    at /usr/include/c++/13/bits/stl_map.h:553
#11 kvc2::CacheInfo::hidden_layer_count (this=this@entry=0x7696ba9ff620)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:50
#12 0x000076971686aa90 in kvc2::DoubleCacheHandle::set_cache_info (this=this@entry=0x769540013770, quant_type="BF16",
    turn_on_k_cache=turn_on_k_cache@entry=true, turn_on_v_cache=turn_on_v_cache@entry=false, model_name=...)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:743
#13 0x00007697168c9b16 in kvc2::KVC2::lookup (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", quant_type="BF16",
    id=id@entry=0x76954000b480, length=<optimized out>, length@entry=5, estimated_length=8192)
    at /usr/include/c++/13/bits/allocator.h:184
#14 0x00007697168c9339 in kvc2::KVC2::lookup_to_gpu_async(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int*, unsigned long, unsigned long, std::function<void (std::shared_ptr<kvc2::DoubleCacheHandleInterface>)>) (this=this@entry=0x1ed10500, model_name="deepseek-r1-info",
    quant_type="BF16", id=id@entry=0x76954000b480, length=length@entry=5, estimated_length=estimated_length@entry=8192,
    call_back=...) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:1279
#15 0x00007697e66a6478 in scheduler::Query::to_status (this=0x769540006320, to=to@entry=scheduler::Query::Preparing)
    at /usr/include/c++/13/bits/allocator.h:184
#16 0x00007697e66f8a4b in scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:801
#17 scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:798
#18 scheduler::QueryMaintainer::tackle_event (event=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:607
#19 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}::operator()<scheduler::EventPrepare>(scheduler::EventPrepare) const (event=..., __closure=<optimized out>)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:650
#20 std::__invoke_impl<void, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(std::__invoke_other, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61
#21 std::__invoke<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (
    __fn=...) at /usr/include/c++/13/bits/invoke.h:96
#22 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&)>, std::integer_sequence<unsigned long, 3ul> >::__visit_invoke(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (
    __vars#0=std::variant [index 3] = {...}, __visitor=...) at /usr/include/c++/13/variant:1060
#23 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, sched--Type <RET> for more, q to quit, c to continue without paging--
uler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...)
    at /usr/include/c++/13/variant:1818
#24 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...)
    at /usr/include/c++/13/variant:1756
#25 std::visit<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1878
#26 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const (__closure=<optimized out>)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:639
#27 0x000076983a7549c0 in execute_native_thread_routine ()
   from /home/wkgcass/.virtualenvs/ktnew/lib/python3.12/site-packages/torch/lib/libc10.so
#28 0x000076983b69caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
#29 0x000076983b729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

看起来frame11是最后一个kt的代码

frame 11
print model_name
$1 = "deepseek-r1-info"

这是我的model_path目录名

print model_configs
$2 = std::map with 12 elements = {["DeepSeek-Coder-V2-Instruct"] = {hidden_size = 5120, intermediate_size = 12288,
    max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 128, num_hidden_layers = 60,
    num_key_value_heads = 128, vocab_size = 102400}, ["DeepSeek-R1"] = {hidden_size = 7168, intermediate_size = 18432,
    max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 61,
    num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V2-Lite-Chat"] = {hidden_size = 2048,
    intermediate_size = 10944, max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 16,
    num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 102400}, ["DeepSeek-V3"] = {hidden_size = 7168,
    intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128,
    num_hidden_layers = 3, num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V3-bf16"] = {hidden_size = 7168,
    intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128,
    num_hidden_layers = 61, num_key_value_heads = 128, vocab_size = 129280}, ["LLaMA-2-7B-32K"] = {hidden_size = 4096,
    intermediate_size = 11008, max_position_embeddings = 32768, model_type = "llama", num_attention_heads = 32,
    num_hidden_layers = 32, num_key_value_heads = 32, vocab_size = 32000}, ["Moonlight-16B-A3B-Instruct"] = {
    hidden_size = 2048, intermediate_size = 11264, max_position_embeddings = 8192, model_type = "deepseek_v3",
    num_attention_heads = 16, num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 163840},
  ["Qwen2.5-32B-Instruct"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064},
  ["Qwen2.5-32B-Instruct-GPTQ-Int4"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064},
  ["Qwen2.5-7B-Instruct"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064},
  ["Qwen2.5-7B-Instruct-GPTQ-Int4"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064},
  ["qwen2-72b-instruct"] = {hidden_size = 8192, intermediate_size = 29568, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 64, num_hidden_layers = 80, num_key_value_heads = 8, vocab_size = 152064}}

显然这里是预定义的一些模型名

将我的model_path目录名修改为DeepSeek-R1后再次尝试,成功

你好

Image

<!-- gh-comment-id:2774573750 --> @wkgcass commented on GitHub (Apr 3, 2025): 相同问题,rpc.log中有如下异常: ``` terminate called after throwing an instance of 'std::out_of_range' ``` gdb为如下stack trace ``` #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89 #3 0x000076983b64527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4 0x000076983b6288ff in __GI_abort () at ./stdlib/abort.c:79 #5 0x000076983aca5ff5 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x000076983acbb0da in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x000076983aca5a55 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x000076983acbb391 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 #9 0x000076983aca932d in std::__throw_out_of_range(char const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6 #10 0x0000769716861f1c in std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ModelConfig, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ModelConfig> > >::at ( __k=<error reading variable: Cannot access memory at address 0x6b6565737065654c>, this=0x7697168ff0a0 <model_configs>) at /usr/include/c++/13/bits/stl_map.h:553 #11 kvc2::CacheInfo::hidden_layer_count (this=this@entry=0x7696ba9ff620) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:50 #12 0x000076971686aa90 in kvc2::DoubleCacheHandle::set_cache_info (this=this@entry=0x769540013770, quant_type="BF16", turn_on_k_cache=turn_on_k_cache@entry=true, turn_on_v_cache=turn_on_v_cache@entry=false, model_name=...) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:743 #13 0x00007697168c9b16 in kvc2::KVC2::lookup (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", quant_type="BF16", id=id@entry=0x76954000b480, length=<optimized out>, length@entry=5, estimated_length=8192) at /usr/include/c++/13/bits/allocator.h:184 #14 0x00007697168c9339 in kvc2::KVC2::lookup_to_gpu_async(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int*, unsigned long, unsigned long, std::function<void (std::shared_ptr<kvc2::DoubleCacheHandleInterface>)>) (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", quant_type="BF16", id=id@entry=0x76954000b480, length=length@entry=5, estimated_length=estimated_length@entry=8192, call_back=...) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:1279 #15 0x00007697e66a6478 in scheduler::Query::to_status (this=0x769540006320, to=to@entry=scheduler::Query::Preparing) at /usr/include/c++/13/bits/allocator.h:184 #16 0x00007697e66f8a4b in scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990) at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:801 #17 scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990) at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:798 #18 scheduler::QueryMaintainer::tackle_event (event=..., this=0x1ef08990) at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:607 #19 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}::operator()<scheduler::EventPrepare>(scheduler::EventPrepare) const (event=..., __closure=<optimized out>) at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:650 #20 std::__invoke_impl<void, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(std::__invoke_other, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #21 std::__invoke<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) ( __fn=...) at /usr/include/c++/13/bits/invoke.h:96 #22 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&)>, std::integer_sequence<unsigned long, 3ul> >::__visit_invoke(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) ( __vars#0=std::variant [index 3] = {...}, __visitor=...) at /usr/include/c++/13/variant:1060 #23 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, sched--Type <RET> for more, q to quit, c to continue without paging-- uler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1818 #24 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1756 #25 std::visit<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1878 #26 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const (__closure=<optimized out>) at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:639 #27 0x000076983a7549c0 in execute_native_thread_routine () from /home/wkgcass/.virtualenvs/ktnew/lib/python3.12/site-packages/torch/lib/libc10.so #28 0x000076983b69caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447 #29 0x000076983b729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 ``` 看起来frame11是最后一个kt的代码 ``` frame 11 print model_name $1 = "deepseek-r1-info" ``` 这是我的`model_path`目录名 ``` print model_configs $2 = std::map with 12 elements = {["DeepSeek-Coder-V2-Instruct"] = {hidden_size = 5120, intermediate_size = 12288, max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 128, num_hidden_layers = 60, num_key_value_heads = 128, vocab_size = 102400}, ["DeepSeek-R1"] = {hidden_size = 7168, intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 61, num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V2-Lite-Chat"] = {hidden_size = 2048, intermediate_size = 10944, max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 16, num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 102400}, ["DeepSeek-V3"] = {hidden_size = 7168, intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 3, num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V3-bf16"] = {hidden_size = 7168, intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 61, num_key_value_heads = 128, vocab_size = 129280}, ["LLaMA-2-7B-32K"] = {hidden_size = 4096, intermediate_size = 11008, max_position_embeddings = 32768, model_type = "llama", num_attention_heads = 32, num_hidden_layers = 32, num_key_value_heads = 32, vocab_size = 32000}, ["Moonlight-16B-A3B-Instruct"] = { hidden_size = 2048, intermediate_size = 11264, max_position_embeddings = 8192, model_type = "deepseek_v3", num_attention_heads = 16, num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 163840}, ["Qwen2.5-32B-Instruct"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768, model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064}, ["Qwen2.5-32B-Instruct-GPTQ-Int4"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768, model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064}, ["Qwen2.5-7B-Instruct"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768, model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064}, ["Qwen2.5-7B-Instruct-GPTQ-Int4"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768, model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064}, ["qwen2-72b-instruct"] = {hidden_size = 8192, intermediate_size = 29568, max_position_embeddings = 32768, model_type = "qwen2", num_attention_heads = 64, num_hidden_layers = 80, num_key_value_heads = 8, vocab_size = 152064}} ``` 显然这里是预定义的一些模型名 将我的`model_path`目录名修改为`DeepSeek-R1`后再次尝试,成功 > 你好 ![Image](https://github.com/user-attachments/assets/625c30c8-6324-452a-91a8-92c7cb3dd9f2)
Author
Owner

@wkgcass commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

<!-- gh-comment-id:2774575641 --> @wkgcass commented on GitHub (Apr 3, 2025): @CYSTEV-chn 试试把model_path目录名改成 `DeepSeek-R1`
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M
改成 /home/zewen/model/DeepSeek-R1
然后加载启动命令里也改成:
python ktransformers/server/main.py
--port 6006
--model_path /home/zewen/model/DeepSeek-R1
--gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M
--optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml
--max_new_tokens 1024
--cache_lens 32768
--chunk_size 256
--max_batch_size 4
--cache_q4 true
--cpu_infer 84
--model_name "DeepSeek-R1"
--backend_type balance_serve

<!-- gh-comment-id:2774623741 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): > [@CYSTEV-chn](https://github.com/CYSTEV-chn) 试试把model_path目录名改成 `DeepSeek-R1` 请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py \ --port 6006 \ --model_path /home/zewen/model/DeepSeek-R1 \ --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \ --max_new_tokens 1024 \ --cache_lens 32768 \ --chunk_size 256 \ --max_batch_size 4 \ --cache_q4 true \ --cpu_infer 84 \ --model_name "DeepSeek-R1" \ --backend_type balance_serve
Author
Owner

@wkgcass commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve

是的

<!-- gh-comment-id:2774642570 --> @wkgcass commented on GitHub (Apr 3, 2025): > > [@CYSTEV-chn](https://github.com/CYSTEV-chn) 试试把model_path目录名改成 `DeepSeek-R1` > > 请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve 是的
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve

是的

改完后,报错:
Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory

执行命令改为:

  python ktransformers/server/main.py \
  --port 6006 \
  --model_path /home/zewen/model/DeepSeek-R1 \
  --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \
  --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \
  --max_new_tokens 1024 \
  --cache_lens 32768 \
  --chunk_size 256 \
  --max_batch_size 4 \
  --cache_q4 true \
  --cpu_infer 84 \
  --model_name "DeepSeek-R1" \
  --backend_type balance_serve
<!-- gh-comment-id:2774651688 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): > > > [@CYSTEV-chn](https://github.com/CYSTEV-chn) 试试把model_path目录名改成 `DeepSeek-R1` > > > > > > 请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve > > 是的 改完后,报错: `Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory ` 执行命令改为: ``` python ktransformers/server/main.py \ --port 6006 \ --model_path /home/zewen/model/DeepSeek-R1 \ --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \ --max_new_tokens 1024 \ --cache_lens 32768 \ --chunk_size 256 \ --max_batch_size 4 \ --cache_q4 true \ --cpu_infer 84 \ --model_name "DeepSeek-R1" \ --backend_type balance_serve ```
Author
Owner

@wkgcass commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve

是的

改完后,报错: Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory

执行命令改为:

  python ktransformers/server/main.py \
  --port 6006 \
  --model_path /home/zewen/model/DeepSeek-R1 \
  --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \
  --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \
  --max_new_tokens 1024 \
  --cache_lens 32768 \
  --chunk_size 256 \
  --max_batch_size 4 \
  --cache_q4 true \
  --cpu_infer 84 \
  --model_name "DeepSeek-R1" \
  --backend_type balance_serve

编译流程没走完吧应该?libkvc2.so缺失,我没遇到过

<!-- gh-comment-id:2774665403 --> @wkgcass commented on GitHub (Apr 3, 2025): > > > > [@CYSTEV-chn](https://github.com/CYSTEV-chn) 试试把model_path目录名改成 `DeepSeek-R1` > > > > > > > > > 请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve > > > > > > 是的 > > 改完后,报错: `Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory ` > > 执行命令改为: > > ``` > python ktransformers/server/main.py \ > --port 6006 \ > --model_path /home/zewen/model/DeepSeek-R1 \ > --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ > --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \ > --max_new_tokens 1024 \ > --cache_lens 32768 \ > --chunk_size 256 \ > --max_batch_size 4 \ > --cache_q4 true \ > --cpu_infer 84 \ > --model_name "DeepSeek-R1" \ > --backend_type balance_serve > ``` 编译流程没走完吧应该?`libkvc2.so`缺失,我没遇到过
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

@CYSTEV-chn 试试把model_path目录名改成 DeepSeek-R1

请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve

是的

改完后,报错: Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory
执行命令改为:

  python ktransformers/server/main.py \
  --port 6006 \
  --model_path /home/zewen/model/DeepSeek-R1 \
  --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \
  --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \
  --max_new_tokens 1024 \
  --cache_lens 32768 \
  --chunk_size 256 \
  --max_batch_size 4 \
  --cache_q4 true \
  --cpu_infer 84 \
  --model_name "DeepSeek-R1" \
  --backend_type balance_serve

编译流程没走完吧应该?libkvc2.so缺失,我没遇到过

编译流程没走完怎么会提示编译成功的哦。奇怪

<!-- gh-comment-id:2774673390 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): > > > > > [@CYSTEV-chn](https://github.com/CYSTEV-chn) 试试把model_path目录名改成 `DeepSeek-R1` > > > > > > > > > > > > 请问是要将我原先保存配置的目录/home/zewen/model/DeepSeek-R1-Q4_K_M 改成 /home/zewen/model/DeepSeek-R1 然后加载启动命令里也改成: python ktransformers/server/main.py --port 6006 --model_path /home/zewen/model/DeepSeek-R1 --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml --max_new_tokens 1024 --cache_lens 32768 --chunk_size 256 --max_batch_size 4 --cache_q4 true --cpu_infer 84 --model_name "DeepSeek-R1" --backend_type balance_serve > > > > > > > > > 是的 > > > > > > 改完后,报错: `Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libkvc2.so: cannot open shared object file: No such file or directory ` > > 执行命令改为: > > ``` > > python ktransformers/server/main.py \ > > --port 6006 \ > > --model_path /home/zewen/model/DeepSeek-R1 \ > > --gguf_path /home/zewen/model/DeepSeek-R1-Q4_K_M \ > > --optimize_config_path ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-serve.yaml \ > > --max_new_tokens 1024 \ > > --cache_lens 32768 \ > > --chunk_size 256 \ > > --max_batch_size 4 \ > > --cache_q4 true \ > > --cpu_infer 84 \ > > --model_name "DeepSeek-R1" \ > > --backend_type balance_serve > > ``` > > 编译流程没走完吧应该?`libkvc2.so`缺失,我没遇到过 编译流程没走完怎么会提示编译成功的哦。奇怪
Author
Owner

@wkgcass commented on GitHub (Apr 3, 2025):

相同问题,rpc.log中有如下异常:

terminate called after throwing an instance of 'std::out_of_range'

gdb为如下stack trace

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x000076983b64527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x000076983b6288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x000076983aca5ff5 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x000076983acbb0da in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x000076983aca5a55 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8  0x000076983acbb391 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x000076983aca932d in std::__throw_out_of_range(char const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x0000769716861f1c in std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ModelConfig, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ModelConfig> > >::at (
    __k=<error reading variable: Cannot access memory at address 0x6b6565737065654c>, this=0x7697168ff0a0 <model_configs>)
    at /usr/include/c++/13/bits/stl_map.h:553
#11 kvc2::CacheInfo::hidden_layer_count (this=this@entry=0x7696ba9ff620)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:50
#12 0x000076971686aa90 in kvc2::DoubleCacheHandle::set_cache_info (this=this@entry=0x769540013770, quant_type="BF16",
    turn_on_k_cache=turn_on_k_cache@entry=true, turn_on_v_cache=turn_on_v_cache@entry=false, model_name=...)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:743
#13 0x00007697168c9b16 in kvc2::KVC2::lookup (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", quant_type="BF16",
    id=id@entry=0x76954000b480, length=<optimized out>, length@entry=5, estimated_length=8192)
    at /usr/include/c++/13/bits/allocator.h:184
#14 0x00007697168c9339 in kvc2::KVC2::lookup_to_gpu_async(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int*, unsigned long, unsigned long, std::function<void (std::shared_ptr<kvc2::DoubleCacheHandleInterface>)>) (this=this@entry=0x1ed10500, model_name="deepseek-r1-info",
    quant_type="BF16", id=id@entry=0x76954000b480, length=length@entry=5, estimated_length=estimated_length@entry=8192,
    call_back=...) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:1279
#15 0x00007697e66a6478 in scheduler::Query::to_status (this=0x769540006320, to=to@entry=scheduler::Query::Preparing)
    at /usr/include/c++/13/bits/allocator.h:184
#16 0x00007697e66f8a4b in scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:801
#17 scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:798
#18 scheduler::QueryMaintainer::tackle_event (event=..., this=0x1ef08990)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:607
#19 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}::operator()<scheduler::EventPrepare>(scheduler::EventPrepare) const (event=..., __closure=<optimized out>)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:650
#20 std::__invoke_impl<void, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(std::__invoke_other, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61
#21 std::__invoke<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (
    __fn=...) at /usr/include/c++/13/bits/invoke.h:96
#22 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&)>, std::integer_sequence<unsigned long, 3ul> >::__visit_invoke(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (
    __vars#0=std::variant [index 3] = {...}, __visitor=...) at /usr/include/c++/13/variant:1060
#23 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, sched--Type <RET> for more, q to quit, c to continue without paging--
uler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...)
    at /usr/include/c++/13/variant:1818
#24 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...)
    at /usr/include/c++/13/variant:1756
#25 std::visit<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1878
#26 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const (__closure=<optimized out>)
    at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:639
#27 0x000076983a7549c0 in execute_native_thread_routine ()
   from /home/wkgcass/.virtualenvs/ktnew/lib/python3.12/site-packages/torch/lib/libc10.so
#28 0x000076983b69caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
#29 0x000076983b729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

看起来frame11是最后一个kt的代码

frame 11
print model_name
$1 = "deepseek-r1-info"

这是我的model_path目录名

print model_configs
$2 = std::map with 12 elements = {["DeepSeek-Coder-V2-Instruct"] = {hidden_size = 5120, intermediate_size = 12288,
    max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 128, num_hidden_layers = 60,
    num_key_value_heads = 128, vocab_size = 102400}, ["DeepSeek-R1"] = {hidden_size = 7168, intermediate_size = 18432,
    max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 61,
    num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V2-Lite-Chat"] = {hidden_size = 2048,
    intermediate_size = 10944, max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 16,
    num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 102400}, ["DeepSeek-V3"] = {hidden_size = 7168,
    intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128,
    num_hidden_layers = 3, num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V3-bf16"] = {hidden_size = 7168,
    intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128,
    num_hidden_layers = 61, num_key_value_heads = 128, vocab_size = 129280}, ["LLaMA-2-7B-32K"] = {hidden_size = 4096,
    intermediate_size = 11008, max_position_embeddings = 32768, model_type = "llama", num_attention_heads = 32,
    num_hidden_layers = 32, num_key_value_heads = 32, vocab_size = 32000}, ["Moonlight-16B-A3B-Instruct"] = {
    hidden_size = 2048, intermediate_size = 11264, max_position_embeddings = 8192, model_type = "deepseek_v3",
    num_attention_heads = 16, num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 163840},
  ["Qwen2.5-32B-Instruct"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064},
  ["Qwen2.5-32B-Instruct-GPTQ-Int4"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064},
  ["Qwen2.5-7B-Instruct"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064},
  ["Qwen2.5-7B-Instruct-GPTQ-Int4"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064},
  ["qwen2-72b-instruct"] = {hidden_size = 8192, intermediate_size = 29568, max_position_embeddings = 32768,
    model_type = "qwen2", num_attention_heads = 64, num_hidden_layers = 80, num_key_value_heads = 8, vocab_size = 152064}}

显然这里是预定义的一些模型名

将我的model_path目录名修改为DeepSeek-R1后再次尝试,成功

你好

Image

用另一个账号提了个文档PR: https://github.com/kvcache-ai/ktransformers/pull/1031

<!-- gh-comment-id:2774769131 --> @wkgcass commented on GitHub (Apr 3, 2025): > 相同问题,rpc.log中有如下异常: > > ``` > terminate called after throwing an instance of 'std::out_of_range' > ``` > > gdb为如下stack trace > > ``` > #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44 > #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78 > #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89 > #3 0x000076983b64527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 > #4 0x000076983b6288ff in __GI_abort () at ./stdlib/abort.c:79 > #5 0x000076983aca5ff5 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 > #6 0x000076983acbb0da in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 > #7 0x000076983aca5a55 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6 > #8 0x000076983acbb391 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 > #9 0x000076983aca932d in std::__throw_out_of_range(char const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6 > #10 0x0000769716861f1c in std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ModelConfig, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ModelConfig> > >::at ( > __k=<error reading variable: Cannot access memory at address 0x6b6565737065654c>, this=0x7697168ff0a0 <model_configs>) > at /usr/include/c++/13/bits/stl_map.h:553 > #11 kvc2::CacheInfo::hidden_layer_count (this=this@entry=0x7696ba9ff620) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:50 > #12 0x000076971686aa90 in kvc2::DoubleCacheHandle::set_cache_info (this=this@entry=0x769540013770, quant_type="BF16", > turn_on_k_cache=turn_on_k_cache@entry=true, turn_on_v_cache=turn_on_v_cache@entry=false, model_name=...) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:743 > #13 0x00007697168c9b16 in kvc2::KVC2::lookup (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", quant_type="BF16", > id=id@entry=0x76954000b480, length=<optimized out>, length@entry=5, estimated_length=8192) > at /usr/include/c++/13/bits/allocator.h:184 > #14 0x00007697168c9339 in kvc2::KVC2::lookup_to_gpu_async(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int*, unsigned long, unsigned long, std::function<void (std::shared_ptr<kvc2::DoubleCacheHandleInterface>)>) (this=this@entry=0x1ed10500, model_name="deepseek-r1-info", > quant_type="BF16", id=id@entry=0x76954000b480, length=length@entry=5, estimated_length=estimated_length@entry=8192, > call_back=...) at /home/wkgcass/ktransformers-new/csrc/balance_serve/kvc2/src/prefix.cpp:1279 > #15 0x00007697e66a6478 in scheduler::Query::to_status (this=0x769540006320, to=to@entry=scheduler::Query::Preparing) > at /usr/include/c++/13/bits/allocator.h:184 > #16 0x00007697e66f8a4b in scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:801 > #17 scheduler::FCFS_single_prefill::strategy_prepare (prepare=..., this=0x1ef08990) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:798 > #18 scheduler::QueryMaintainer::tackle_event (event=..., this=0x1ef08990) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:607 > #19 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}::operator()<scheduler::EventPrepare>(scheduler::EventPrepare) const (event=..., __closure=<optimized out>) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:650 > #20 std::__invoke_impl<void, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(std::__invoke_other, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 > #21 std::__invoke<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, scheduler::EventPrepare&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, scheduler::EventPrepare&) ( > __fn=...) at /usr/include/c++/13/bits/invoke.h:96 > #22 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&)>, std::integer_sequence<unsigned long, 3ul> >::__visit_invoke(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) ( > __vars#0=std::variant [index 3] = {...}, __visitor=...) at /usr/include/c++/13/variant:1060 > #23 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, sched--Type <RET> for more, q to quit, c to continue without paging-- > uler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) > at /usr/include/c++/13/variant:1818 > #24 std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) > at /usr/include/c++/13/variant:1756 > #25 std::visit<scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&>(scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const::{lambda(auto:1)#1}&&, std::variant<std::pair<scheduler::QueryAdd, std::promise<unsigned long>*>, std::vector<scheduler::QueryUpdate, std::allocator<scheduler::QueryUpdate> >, std::shared_ptr<scheduler::BatchQueryTodo>, scheduler::EventPrepare, scheduler::EventPrepared, scheduler::EventQueryStatus, scheduler::EventSchedule>&) (__visitor=...) at /usr/include/c++/13/variant:1878 > #26 scheduler::QueryMaintainer::run()::{lambda()#1}::operator()() const (__closure=<optimized out>) > at /home/wkgcass/ktransformers-new/csrc/balance_serve/sched/scheduler.cpp:639 > #27 0x000076983a7549c0 in execute_native_thread_routine () > from /home/wkgcass/.virtualenvs/ktnew/lib/python3.12/site-packages/torch/lib/libc10.so > #28 0x000076983b69caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447 > #29 0x000076983b729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 > ``` > > 看起来frame11是最后一个kt的代码 > > ``` > frame 11 > print model_name > $1 = "deepseek-r1-info" > ``` > > 这是我的`model_path`目录名 > > ``` > print model_configs > $2 = std::map with 12 elements = {["DeepSeek-Coder-V2-Instruct"] = {hidden_size = 5120, intermediate_size = 12288, > max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 128, num_hidden_layers = 60, > num_key_value_heads = 128, vocab_size = 102400}, ["DeepSeek-R1"] = {hidden_size = 7168, intermediate_size = 18432, > max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, num_hidden_layers = 61, > num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V2-Lite-Chat"] = {hidden_size = 2048, > intermediate_size = 10944, max_position_embeddings = 163840, model_type = "deepseek_v2", num_attention_heads = 16, > num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 102400}, ["DeepSeek-V3"] = {hidden_size = 7168, > intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, > num_hidden_layers = 3, num_key_value_heads = 128, vocab_size = 129280}, ["DeepSeek-V3-bf16"] = {hidden_size = 7168, > intermediate_size = 18432, max_position_embeddings = 163840, model_type = "deepseek_v3", num_attention_heads = 128, > num_hidden_layers = 61, num_key_value_heads = 128, vocab_size = 129280}, ["LLaMA-2-7B-32K"] = {hidden_size = 4096, > intermediate_size = 11008, max_position_embeddings = 32768, model_type = "llama", num_attention_heads = 32, > num_hidden_layers = 32, num_key_value_heads = 32, vocab_size = 32000}, ["Moonlight-16B-A3B-Instruct"] = { > hidden_size = 2048, intermediate_size = 11264, max_position_embeddings = 8192, model_type = "deepseek_v3", > num_attention_heads = 16, num_hidden_layers = 27, num_key_value_heads = 16, vocab_size = 163840}, > ["Qwen2.5-32B-Instruct"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768, > model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064}, > ["Qwen2.5-32B-Instruct-GPTQ-Int4"] = {hidden_size = 5120, intermediate_size = 27648, max_position_embeddings = 32768, > model_type = "qwen2", num_attention_heads = 40, num_hidden_layers = 64, num_key_value_heads = 8, vocab_size = 152064}, > ["Qwen2.5-7B-Instruct"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768, > model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064}, > ["Qwen2.5-7B-Instruct-GPTQ-Int4"] = {hidden_size = 3584, intermediate_size = 18944, max_position_embeddings = 32768, > model_type = "qwen2", num_attention_heads = 28, num_hidden_layers = 28, num_key_value_heads = 4, vocab_size = 152064}, > ["qwen2-72b-instruct"] = {hidden_size = 8192, intermediate_size = 29568, max_position_embeddings = 32768, > model_type = "qwen2", num_attention_heads = 64, num_hidden_layers = 80, num_key_value_heads = 8, vocab_size = 152064}} > ``` > > 显然这里是预定义的一些模型名 > > 将我的`model_path`目录名修改为`DeepSeek-R1`后再次尝试,成功 > > > 你好 > > ![Image](https://github.com/user-attachments/assets/625c30c8-6324-452a-91a8-92c7cb3dd9f2) 用另一个账号提了个文档PR: https://github.com/kvcache-ai/ktransformers/pull/1031
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

我铲掉所有ktransformers和.ktransformers文件夹,铲掉miniconda3文件夹,一切重新来过,也编译显示成功了,再次装载模型的时候提示错误如下,这下更莫名其妙了。
官方说明里有一串依赖是:
sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf
pip3 install packaging ninja cpufeature numpy openai
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
我的cu版本是12.4,会不会和上面安装pytorch12.6有冲突?但是确实提示编译成功了,没一点报错。

Traceback (most recent call last):
File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in
from ktransformers.server.args import ArgumentParser
File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in
from ktransformers.util.utils import get_free_ports
File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in
from ktransformers.models.custom_cache import StaticCache
File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in
from ktransformers.server.balance_serve.settings import sched_ext
File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in
import sched_ext
ImportError: /home/zewen/ktransformers/build/lib.linux-x86_64-cpython-311/libcache_entry.so: undefined symbol: _ZN21PageAlignedMemoryPool5debugB5cxx11Ev

<!-- gh-comment-id:2774804096 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): 我铲掉所有ktransformers和.ktransformers文件夹,铲掉miniconda3文件夹,一切重新来过,也编译显示成功了,再次装载模型的时候提示错误如下,这下更莫名其妙了。 官方说明里有一串依赖是: sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio1 libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf pip3 install packaging ninja cpufeature numpy openai pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 我的cu版本是12.4,会不会和上面安装pytorch12.6有冲突?但是确实提示编译成功了,没一点报错。 Traceback (most recent call last): File "/home/zewen/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/args.py", line 3, in <module> from ktransformers.util.utils import get_free_ports File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/models/custom_cache.py", line 15, in <module> from ktransformers.server.balance_serve.settings import sched_ext File "/home/zewen/miniconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: /home/zewen/ktransformers/build/lib.linux-x86_64-cpython-311/libcache_entry.so: undefined symbol: _ZN21PageAlignedMemoryPool5debugB5cxx11Ev
Author
Owner

@NUSTHR commented on GitHub (Apr 3, 2025):

why can not I find the module named 'sched_ext'
who could give me some advice? Appreciate it !!!!!

Image

<!-- gh-comment-id:2775042176 --> @NUSTHR commented on GitHub (Apr 3, 2025): why can not I find the module named 'sched_ext' who could give me some advice? Appreciate it !!!!! ![Image](https://github.com/user-attachments/assets/980e742f-9033-4ec8-b629-28fe30f92dc2)
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

why can not I find the module named 'sched_ext' who could give me some advice? Appreciate it !!!!!

Image

when i delete all ktranformers/ folds , then rebuild , the same error as you , I dont know what fuxxxk codes . now I rebuild 0.2.3post1 .

<!-- gh-comment-id:2775177848 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): > why can not I find the module named 'sched_ext' who could give me some advice? Appreciate it !!!!! > > ![Image](https://github.com/user-attachments/assets/980e742f-9033-4ec8-b629-28fe30f92dc2) when i delete all ktranformers/ folds , then rebuild , the same error as you , I dont know what fuxxxk codes . now I rebuild 0.2.3post1 .
Author
Owner

@Azure-Tang commented on GitHub (Apr 3, 2025):

why can not I find the module named 'sched_ext' who could give me some advice? Appreciate it !!!!!

Image

Don't forget env variable "USE_BALANCE_SERVE=1" to

you should compile by this:
USE_BALANCE_SERVE=1 bash ./install.sh

<!-- gh-comment-id:2775474763 --> @Azure-Tang commented on GitHub (Apr 3, 2025): > why can not I find the module named 'sched_ext' who could give me some advice? Appreciate it !!!!! > > ![Image](https://github.com/user-attachments/assets/980e742f-9033-4ec8-b629-28fe30f92dc2) Don't forget env variable "USE_BALANCE_SERVE=1" to you should compile by this: `USE_BALANCE_SERVE=1 bash ./install.sh`
Author
Owner

@wkgcass commented on GitHub (Apr 4, 2025):

@CYSTEV-chn cuda124的话就要用124的,版本号要改。你也可以试试直接忽略2. Install dependencies那一步里pip的安装,直接执行编译脚本,反正依赖库都在requirement里。

sched_ext是这里编出来的csrc/balance_serve/sched,你的报错是因为有个符号找不到,@Azure-Tang 的报错纯粹是因为找不到这个模块,报错不同。

另外建议把你的所有步骤都记录下来放到文本文件里,不然别人也没法查

<!-- gh-comment-id:2778302060 --> @wkgcass commented on GitHub (Apr 4, 2025): @CYSTEV-chn cuda124的话就要用124的,版本号要改。你也可以试试直接忽略`2. Install dependencies`那一步里pip的安装,直接执行编译脚本,反正依赖库都在requirement里。 sched_ext是这里编出来的`csrc/balance_serve/sched`,你的报错是因为有个符号找不到,@Azure-Tang 的报错纯粹是因为找不到这个模块,报错不同。 另外建议把你的所有步骤都记录下来放到文本文件里,不然别人也没法查
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 4, 2025):

@CYSTEV-chn cuda124的话就要用124的,版本号要改。你也可以试试直接忽略2. Install dependencies那一步里pip的安装,直接执行编译脚本,反正依赖库都在requirement里。

sched_ext是这里编出来的csrc/balance_serve/sched,你的报错是因为有个符号找不到,@Azure-Tang 的报错纯粹是因为找不到这个模块,报错不同。

另外建议把你的所有步骤都记录下来放到文本文件里,不然别人也没法查

谢谢指点,我已经全部铲掉,重新git编译了一遍,可以炮筒跑通了。

<!-- gh-comment-id:2778348843 --> @CYSTEV-chn commented on GitHub (Apr 4, 2025): > [@CYSTEV-chn](https://github.com/CYSTEV-chn) cuda124的话就要用124的,版本号要改。你也可以试试直接忽略`2. Install dependencies`那一步里pip的安装,直接执行编译脚本,反正依赖库都在requirement里。 > > sched_ext是这里编出来的`csrc/balance_serve/sched`,你的报错是因为有个符号找不到,[@Azure-Tang](https://github.com/Azure-Tang) 的报错纯粹是因为找不到这个模块,报错不同。 > > 另外建议把你的所有步骤都记录下来放到文本文件里,不然别人也没法查 谢谢指点,我已经全部铲掉,重新git编译了一遍,可以炮筒跑通了。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#720
No description provided.