mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-07-10 01:28:39 +00:00
|
Some checks failed
Book-CI / test (push) Has been cancelled
Book-CI / test-1 (push) Has been cancelled
Book-CI / test-2 (push) Has been cancelled
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
* [fix(loader)]: correct off-by-one expert-count guard in SafeTensorLoader.load_experts After the discovery loop, max_experts_count is the highest expert index found (expert count - 1), and is -1 only when the key has no experts. The guard checked == 0, which falsely rejected single-expert layers and silently returned empty weight lists for the zero-expert case. Check == -1 instead. Adds a CPU regression test covering the single-, zero-, and multi-expert cases. * [test(loader)]: import loader as a top-level module in expert-count guard test Per review feedback: add python/utils to sys.path and import loader directly instead of the importlib.util boilerplate. Still bypasses utils/__init__.py (and the compiled kt_kernel_ext) while keeping the import idiomatic. |
||
|---|---|---|
| .. | ||
| cli | ||
| sft | ||
| utils | ||
| __init__.py | ||
| _cpu_detect.py | ||
| experts.py | ||
| experts_base.py | ||