facebookresearch / facebookresearch/LayerSkip
A variable past_key_value is defined but not used correctly.
Open
- Dominant language
- Python
- Stars
- 380
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
In the provided code snippet, a variable past_key_value is defined but not used correctly. The code intends to process the key - value pairs for each layer during the forward pass of the decoder layers. However, when calling the decoder_layer for forward propagation, the entire past_key_values is passed instead of the current layer's past_key_value.
```
past_key_value = (
past_key_values[idx]
if (past_key_values is not None and idx < len(past_key_values))
else None
)
```
Contributor guide
Assessment
This issue has not been assessed yet.