Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress committed Jan 25, 2025
1 parent 6e2a3b8 commit 792c720
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llmfoundry/callbacks/hf_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
)
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
from transformers import (
AutoModel,
PretrainedConfig,
PreTrainedModel,
PreTrainedTokenizerBase,
Expand Down Expand Up @@ -205,7 +206,7 @@ def save_model_patch(*args: Any, **kwargs: Any):

if is_peft:
transformers_in_memory_model = {
'model': transformers_model,
'model': AutoModel.from_pretrained(transformers_model),
'tokenizer': tokenizer,
}
else:
Expand Down

0 comments on commit 792c720

Please # to comment.