Skip to content

Commit 42d3bfe

Browse files
committed
Back to meta
1 parent 32a74ce commit 42d3bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/llama/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def __init__(self, **kwargs):
171171

172172
# Within the device="meta" context, tensors that are created do not carry data.
173173
# They possess all other metadata a tensor carries such as size, stride, requires_grad.
174-
with torch.device("cpu"):
174+
with torch.device("meta"):
175175
self.model_ = Transformer(model_args)
176176

177177
if "int8" in str(checkpoint_path):

0 commit comments

Comments
 (0)