tadkt htrnguyen commited on
Commit
586546a
·
verified ·
1 Parent(s): 53de88a

Update modeling_GOT.py (#1)

Browse files

- Update modeling_GOT.py (f48bec6080d8f618988e14373d5e16523bf77af0)


Co-authored-by: Hà Trọng Nguyễn <htrnguyen@users.noreply.huggingface.co>

Files changed (1) hide show
  1. modeling_GOT.py +1 -1
modeling_GOT.py CHANGED
@@ -398,7 +398,7 @@ class GOTQwenForCausalLM(Qwen2ForCausalLM):
398
  if isinstance(past_key_values, Cache):
399
  cache_length = past_key_values.get_seq_length()
400
  past_length = past_key_values.seen_tokens
401
- max_cache_length = past_key_values.get_max_length()
402
  else:
403
  cache_length = past_length = past_key_values[0][0].shape[2]
404
  max_cache_length = None
 
398
  if isinstance(past_key_values, Cache):
399
  cache_length = past_key_values.get_seq_length()
400
  past_length = past_key_values.seen_tokens
401
+ max_cache_length = None
402
  else:
403
  cache_length = past_length = past_key_values[0][0].shape[2]
404
  max_cache_length = None