Nechba commited on
Commit
c523868
·
verified ·
1 Parent(s): e0c600f

Update modeling_chatglm.py

Browse files
Files changed (1) hide show
  1. modeling_chatglm.py +1 -0
modeling_chatglm.py CHANGED
@@ -559,6 +559,7 @@ class SelfAttention(torch.nn.Module):
559
  key_layer = apply_rotary_pos_emb(key_layer, rotary_pos_emb)
560
 
561
  # adjust key and value for inference
 
562
  if kv_cache is not None:
563
  cache_k, cache_v = kv_cache
564
  key_layer = torch.cat((cache_k, key_layer), dim=2)
 
559
  key_layer = apply_rotary_pos_emb(key_layer, rotary_pos_emb)
560
 
561
  # adjust key and value for inference
562
+ print("kv_cache",kv_cache)
563
  if kv_cache is not None:
564
  cache_k, cache_v = kv_cache
565
  key_layer = torch.cat((cache_k, key_layer), dim=2)