[GH-ISSUE #1089] [Bug] ImportError: libsched.so: cannot open shared object file: No such file or directory #768

Closed
opened 2026-10-29 14:44:12 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @alkalimc on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1089

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

Traceback (most recent call last):
  File "/ktransformers/ktransformers/server/main.py", line 11, in <module>
    from ktransformers.server.args import ArgumentParser
  File "/home/test/anaconda3/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/test/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module>
    from ktransformers.models.custom_cache import StaticCache
  File "/home/test/anaconda3/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/test/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module>
    import sched_ext
ImportError: libsched.so: cannot open shared object file: No such file or directory

Reproduction

python /ktransformers/ktransformers/server/main.py \
  --port 11451 \
  --model_path /Models/Moonlight-16B-A3B-Instruct \
  --gguf_path /Models/Moonlight-16B-A3B-Instruct-gguf/Moonlight-16B-A3B-Instruct-Q8_0.gguf \
  --optimize_config_path /ktransformers/ktransformers/optimize/optimize_rules/Moonlight-16B-A3B-serve.yaml \   
  --max_new_tokens 1024 \
  --cache_lens 32768 \
  --chunk_size 256 \
  --max_batch_size 4 \
  --backend_type balance_serve \
  --cpu_infer 48 \
  --model_name Moonlight-16B-A3B-Instruct-Q8_0

Added: Exhibits the same issue on DeepSeek-R1

Environment

  • CUDA 12.8
  • CMake 3.28.3
  • GCC 13.3.0
  • Python 3.11
Originally created by @alkalimc on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1089 ### Checklist - [x] 1. I have searched related issues but cannot get the expected help. - [x] 2. The bug has not been fixed in the latest version. - [x] 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. - [x] 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. - [x] 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 ``` Traceback (most recent call last): File "/ktransformers/ktransformers/server/main.py", line 11, in <module> from ktransformers.server.args import ArgumentParser File "/home/test/anaconda3/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/test/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 17, in <module> from ktransformers.models.custom_cache import StaticCache File "/home/test/anaconda3/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/test/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/server/balance_serve/settings.py", line 13, in <module> import sched_ext ImportError: libsched.so: cannot open shared object file: No such file or directory ``` ### Reproduction ``` python /ktransformers/ktransformers/server/main.py \ --port 11451 \ --model_path /Models/Moonlight-16B-A3B-Instruct \ --gguf_path /Models/Moonlight-16B-A3B-Instruct-gguf/Moonlight-16B-A3B-Instruct-Q8_0.gguf \ --optimize_config_path /ktransformers/ktransformers/optimize/optimize_rules/Moonlight-16B-A3B-serve.yaml \ --max_new_tokens 1024 \ --cache_lens 32768 \ --chunk_size 256 \ --max_batch_size 4 \ --backend_type balance_serve \ --cpu_infer 48 \ --model_name Moonlight-16B-A3B-Instruct-Q8_0 ``` Added: Exhibits the same issue on DeepSeek-R1 ### Environment - CUDA 12.8 - CMake 3.28.3 - GCC 13.3.0 - Python 3.11
Author
Owner

@yeungtuzi commented on GitHub (Apr 9, 2025):

编译参数不对,看https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md

<!-- gh-comment-id:2788736015 --> @yeungtuzi commented on GitHub (Apr 9, 2025): 编译参数不对,看https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md
Author
Owner

@alkalimc commented on GitHub (Apr 9, 2025):

编译参数不对,看https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md

Same as the parameters in the documentation, so may not be caused by this, and there is no such issue on earlier commit branche of 0.2.4

<!-- gh-comment-id:2789108906 --> @alkalimc commented on GitHub (Apr 9, 2025): > 编译参数不对,看https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md Same as the parameters in the documentation, so may not be caused by this, and there is no such issue on [earlier commit branche](https://github.com/kvcache-ai/ktransformers/tree/v0.2.4-fix) of 0.2.4
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#768
No description provided.