Remove unnecessary changes

This commit is contained in:
Shunta Saito
2025-02-13 19:53:34 +09:00
parent 72269c306c
commit ebea6928a3
2 changed files with 3 additions and 5 deletions

View File

@@ -26,10 +26,7 @@ def make_prompt_cache(
if hasattr(model, "make_cache"):
return model.make_cache()
if hasattr(model, "layers"):
num_layers = len(model.layers)
else:
num_layers = len(model.model.layers)
num_layers = len(model.layers)
if max_kv_size is not None:
return [
RotatingKVCache(max_size=max_kv_size, keep=4) for _ in range(num_layers)