Skip to content

Commit

Permalink
make defaults for kvcache run
Browse files Browse the repository at this point in the history
  • Loading branch information
alexm-neuralmagic committed Jul 21, 2023
1 parent fd58f45 commit bb6ba69
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/deepsparse/debug_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,18 @@ def main():

kv_cache_params = None
if args.use_kvcache:
if args.kv_cache_prev_num_tokens is None:
raise ValueError("kv-cache-prev-num-tokens was not provided")
kv_cache_prev_num_tokens = 0
if args.kv_cache_prev_num_tokens is not None:
kv_cache_prev_num_tokens = args.kv_cache_prev_num_tokens

if args.kv_cache_num_frozen_tokens is None:
raise ValueError("kv-cache-num-frozen-tokens was not provided")
kv_cache_num_frozen_tokens = 0
if args.kv_cache_num_frozen_tokens is not None:
kv_cache_num_frozen_tokens = args.kv_cache_num_frozen_tokens

kv_cache_params = KVCacheParams(
default_cached_outputs(model_path),
args.kv_cache_prev_num_tokens,
args.kv_cache_num_frozen_tokens,
kv_cache_prev_num_tokens,
kv_cache_num_frozen_tokens,
)

print(
Expand Down

0 comments on commit bb6ba69

Please sign in to comment.