MCPcopy Create free account
hub / github.com/kyegomez/BitNet / load_model

Method load_model

bitnet/inference.py:41–44  ·  view source on GitHub ↗

Loads a trained model from a .pth file.

(self, model_path)

Source from the content-addressed store, hash-verified

39 self.model.to(self.device)
40
41 def load_model(self, model_path):
42 """Loads a trained model from a .pth file."""
43 self.model.load_state_dict(torch.load(model_path, weights_only=True))
44 self.model.eval()
45
46 @staticmethod
47 def decode_token(token):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected