1
0
Fork 0
mirror of https://github.com/karpathy/minGPT synced 2024-06-01 20:36:05 +02:00

ummm eyeroll

This commit is contained in:
Andrej 2022-06-27 20:53:51 +00:00 committed by GitHub
parent 2f3400f42a
commit 2e979dde5f
4 changed files with 8 additions and 8 deletions

View File

@ -100,8 +100,8 @@ class Block(nn.Module):
class GPT(nn.Module): class GPT(nn.Module):
""" GPT Language Model """ """ GPT Language Model """
@classmethod @staticmethod
def get_default_config(cls): def get_default_config():
C = CN() C = CN()
# either model_type or (n_layer, n_head, n_embd) must be given in the config # either model_type or (n_layer, n_head, n_embd) must be given in the config
C.model_type = 'gpt' C.model_type = 'gpt'

View File

@ -12,8 +12,8 @@ from mingpt.utils import CfgNode as CN
class Trainer: class Trainer:
@classmethod @staticmethod
def get_default_config(cls): def get_default_config():
C = CN() C = CN()
# device to train on # device to train on
C.device = 'auto' C.device = 'auto'

View File

@ -65,8 +65,8 @@ class AdditionDataset(Dataset):
correctly. correctly.
""" """
@classmethod @staticmethod
def get_default_config(cls): def get_default_config():
C = CN() C = CN()
C.ndigit = 2 C.ndigit = 2
return C return C

View File

@ -44,8 +44,8 @@ class CharDataset(Dataset):
Emits batches of characters Emits batches of characters
""" """
@classmethod @staticmethod
def get_default_config(cls): def get_default_config():
C = CN() C = CN()
C.block_size = 128 C.block_size = 128
return C return C