Skip to content

Commit

Permalink
Merge pull request #5 from Zyphra/lctx_modification
Browse files Browse the repository at this point in the history
NTK scaling a value modified
  • Loading branch information
pglorio authored Oct 15, 2024
2 parents ae62846 + 867395f commit 4d38bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/zamba2/modeling_zamba2.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(self, config, dim, max_position_embeddings=4096, base=10000, device
self.dim = dim
self.max_position_embeddings = max_position_embeddings
if config.use_long_context:
a = 16 #Alpha value
a = 8 #Alpha value
base = base * a ** (dim / (dim-2)) #Base change formula
self.base = base
inv_freq = 1.0 / (self.base ** (torch.arange(0, self.dim, 2, dtype=torch.int64).float().to(device) / self.dim))
Expand Down

0 comments on commit 4d38bb0

Please sign in to comment.