Commit cc7ec93
committed
fix: snapshot past sequence length to prevent CUDA index out of bounds error
- Added a snapshot of the past sequence length before the layer loop to ensure consistent indexing during decoder layer calls.
- This change addresses a potential "device-side assert: index out of bounds" error by preventing incorrect indexing of key_layer with attention_mask indices.1 parent 137911f commit cc7ec93
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
993 | 1005 | | |
994 | 1006 | | |
995 | 1007 | | |
| |||
1169 | 1181 | | |
1170 | 1182 | | |
1171 | 1183 | | |
1172 | | - | |
| 1184 | + | |
1173 | 1185 | | |
1174 | 1186 | | |
1175 | 1187 | | |
| |||
0 commit comments