facebookresearch / facebookresearch/LayerSkip

A variable past_key_value is defined but not used correctly.

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.