Skip to content

Commit

Permalink
overwrite pos for models loaded from hf (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 authored Dec 10, 2024
1 parent 8b15485 commit 1d63849
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/levanter/main/sft.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import dataclasses
import logging
import os
from dataclasses import dataclass, field
Expand Down Expand Up @@ -99,6 +100,7 @@ def train(config: SFTConfig):
converter = converter.replaced(tokenizer=tokenizer)

model_config = converter.default_config
model_config = dataclasses.replace(converter.default_config, seq_len=config.max_seq_len)
elif config.trainer.initialize_from is None:
raise ValueError("Must specify either --initialize_from_hf or --initialize_from")
else:
Expand Down

0 comments on commit 1d63849

Please sign in to comment.