Skip to content

Commit

Permalink
this?
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Nov 17, 2024
1 parent 122365e commit 5aba5ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/levanter/compat/hf_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import haliax
from haliax import Axis
from haliax._src.state_dict import ModuleWithStateDictSerialization
from haliax.partitioning import ResourceMapping
from haliax.state_dict import from_torch_compatible_state_dict, save_state_dict, to_torch_compatible_state_dict

Expand Down Expand Up @@ -128,7 +129,7 @@ def hf_checkpoint_converter(cls) -> "HFCheckpointConverter":
MConfig = TypeVar("MConfig", bound=HFCompatConfig)


class ModelWithHfSerializationMixin(Generic[MConfig]):
class ModelWithHfSerializationMixin(Generic[MConfig], ModuleWithStateDictSerialization):
def get_hf_config(self):
return self.config.to_hf_config(self.Vocab.size)

Expand Down

0 comments on commit 5aba5ac

Please sign in to comment.