Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 committed Feb 16, 2024
1 parent 7b7e4a4 commit 16d9756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/levanter/main/train_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def compute_loss(model: LmHeadModel, example: LmExample, key=None):
train_dataset = CausalLmDataset(
config.data.train_set(Pos.size), Pos, KeyPos, ignore_index=config.data.ignore_token_id
)
alpha = 0.9
alpha = 1.0

def add_floats(x, y):
if is_inexact_arrayish(x) and is_inexact_arrayish(y):
# linearly interpolate between the two models
#alpha = 0.0
minus_alpha = 1.0 - alpha
return x * minus_alpha + y * alpha
return x * alpha + y * minus_alpha
else:
return x

Expand Down

0 comments on commit 16d9756

Please sign in to comment.