mirror of
https://github.com/karpathy/nanochat.git
synced 2026-03-21 20:33:23 +00:00
Fix MockModel's device definition (#535)
* fix MockModel's device definition * cleanup
This commit is contained in:
parent
f5fe7925ed
commit
cac43e8511
|
|
@ -31,7 +31,7 @@ class MockModel:
|
|||
def __init__(self, vocab_size=262): # 256 bytes + 6 special tokens
|
||||
self.vocab_size = vocab_size
|
||||
self.config = MockConfig()
|
||||
self._device = "cpu"
|
||||
self._device = torch.device("cpu")
|
||||
|
||||
def get_device(self):
|
||||
return self._device
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user