Update modeling_chatglm.py
Browse files- 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)
|