Skip to content

Commit

Permalink
wte scaling was missed for AdapterV2 during merging PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei-Aksionov committed Mar 26, 2024
1 parent 126a7e2 commit 8c72690
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions litgpt/adapter_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def forward(
mask = None

x = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)
if self.config.scale_embeddings:
x = x * (self.config.n_embd**0.5)
for block in self.transformer.h:
x = block(x, cos, sin, mask, input_pos)
x = self.transformer.ln_f(x)
Expand Down

0 comments on commit 8c72690

Please sign in to comment.