We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8f0be6 commit 7d45270Copy full SHA for 7d45270
quantize.py
@@ -552,6 +552,8 @@ def quantize(
552
model = Transformer.from_name(checkpoint_path.parent.name)
553
554
checkpoint = torch.load(str(checkpoint_path), mmap=True, weights_only=True)
555
+ if "model" in checkpoint and "stories" in str(checkpoint_path):
556
+ checkpoint = checkpoint["model"]
557
model.load_state_dict(checkpoint, assign=True)
558
model = model.to(dtype=precision, device=device)
559
0 commit comments