mirror of
https://github.com/meta-llama/llama.git
synced 2026-01-15 16:32:54 -03:00
Update model.py
This commit is contained in:
committed by
GitHub
parent
346627f6e8
commit
8432e482de
@@ -448,7 +448,8 @@ class Transformer(nn.Module):
|
||||
)
|
||||
|
||||
self.freqs_cis = precompute_freqs_cis(
|
||||
# self.params.max_seq_len is multiplied by 2 because the token limit is 4096, so you can't make it bigger than that, and this is why it's set the the maximun (4096).
|
||||
# Note that self.params.max_seq_len is multiplied by 2 because the token limit for the Llama 2 generation of models is 4096.
|
||||
#Adding this multiplier instead of using 4096 directly allows for dynamism of token lengths while training or fine-tuning.
|
||||
self.params.dim // self.params.n_heads, self.params.max_seq_len * 2
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user