parent
a208ec46e0
commit
704e36a64e
1 changed files with 2 additions and 2 deletions
|
|
@ -234,7 +234,7 @@ def LlamaAttention_fast_forward(
|
||||||
bsz, q_len, _ = hidden_states.size()
|
bsz, q_len, _ = hidden_states.size()
|
||||||
|
|
||||||
# Check for inference
|
# Check for inference
|
||||||
if False:#past_key_value is not None and q_len == 1 and bsz == 1:
|
if past_key_value is not None and q_len == 1 and bsz == 1:
|
||||||
A, past_key_value = LlamaAttention_fast_forward_inference(
|
A, past_key_value = LlamaAttention_fast_forward_inference(
|
||||||
self,
|
self,
|
||||||
hidden_states,
|
hidden_states,
|
||||||
|
|
@ -350,7 +350,7 @@ def LlamaDecoderLayer_fast_forward(
|
||||||
past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
|
past_key_value (`Tuple(torch.FloatTensor)`, *optional*): cached past key and value projection states
|
||||||
"""
|
"""
|
||||||
bsz, q_len, hd = hidden_states.size()
|
bsz, q_len, hd = hidden_states.size()
|
||||||
if False:#(past_key_value is not None and q_len == 1 and bsz == 1):
|
if (past_key_value is not None and q_len == 1 and bsz == 1):
|
||||||
# Self Attention
|
# Self Attention
|
||||||
residual = hidden_states
|
residual = hidden_states
|
||||||
hidden_states = fast_rms_layernorm_inference(self.input_layernorm, hidden_states)
|
hidden_states = fast_rms_layernorm_inference(self.input_layernorm, hidden_states)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue