mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-03-14 18:37:23 +00:00
feat: add fallback expert prefix lookup in loader.py from kimi_k2.5 (#1822)
This commit is contained in:
@@ -615,7 +615,12 @@ class CompressedSafeTensorLoader(SafeTensorLoader):
|
||||
expert_idx += 1
|
||||
|
||||
if expert_idx == 0:
|
||||
raise ValueError(f"No experts found for key {experts_prefix}")
|
||||
experts_prefix = f"language_model.{base_key}.mlp.experts"
|
||||
expert_idx = 0
|
||||
while self.has_tensor(f"{experts_prefix}.{expert_idx}.up_proj.weight_packed"):
|
||||
expert_idx += 1
|
||||
if expert_idx == 0:
|
||||
raise ValueError(f"No experts found for key {experts_prefix}")
|
||||
|
||||
def load_projection(proj_name: str):
|
||||
weight_entries = []
|
||||
|
||||
Reference in New Issue
Block a user