Skip to content

Commit 4000264

Browse files
sxufacebook-github-bot
authored andcommitted
Read max context length from the correct ModelArgs field
Summary: We should read from `max_context_len` for RoPE, `max_seq_len` represents input sequence length. Differential Revision: D84182698
1 parent c62cbfe commit 4000264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/llama/static_attention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def __init__(
259259
}
260260

261261
rope = Rope(config)
262-
freqs = rope.get_freqs(None, config.max_seq_len)
262+
freqs = rope.get_freqs(None, config.max_context_len)
263263
self.freqs_cos = freqs[0].to(dtype)
264264
self.freqs_sin = freqs[1].to(dtype)
265265

0 commit comments

Comments
 (0)