MCPcopy Create free account

hub / github.com/Om-Alve/smolGPT / functions

Functions32 in github.com/Om-Alve/smolGPT

↓ 4 callersMethod__init__
(self, config)
model.py:138
↓ 3 callersMethodencode
(self, s: str, bos: bool, eos: bool)
tokenizer.py:18
↓ 2 callersMethodapply_rotary_emb
(self, x, cos, sin)
model.py:37
↓ 2 callersMethoddecode
(self, tokens: List[int])
tokenizer.py:26
↓ 2 callersFunctiondownload
()
preprocess.py:35
↓ 2 callersMethodgenerate
( self, idx, max_new_tokens, temperature=1.0, top_k=None, top_p=None, min_p=None )
model.py:232
↓ 2 callersFunctionpretokenize
(vocab_size: int)
preprocess.py:101
↓ 2 callersFunctiontrain_vocab
(vocab_size: int)
preprocess.py:50
↓ 1 callersMethodconfigure_optimizers
(self, weight_decay, learning_rate, betas, device_type)
model.py:202
↓ 1 callersFunctiondownload_file
(url: str, filename: str, chunk_size: int = 1024)
preprocess.py:19
↓ 1 callersFunctionestimate_loss
()
train.py:108
↓ 1 callersFunctionget_lr
(it)
train.py:124
↓ 1 callersFunctionload_model
(args)
sample.py:86
↓ 1 callersFunctionmain
()
sample.py:105
↓ 1 callersFunctionparse_args
()
sample.py:9
↓ 1 callersFunctionprepare_dataset
(vocab_size: int)
preprocess.py:110
↓ 1 callersFunctionsetup_device
(args)
sample.py:69
Method__init__
(self, tokenizer_model)
tokenizer.py:8
Method__init__
(self, split: str, max_seq_len: int)
dataset.py:10
Method__init__
(self, dim, base=10_000)
model.py:12
Method__init__
(self, config: GPTConfig)
model.py:48
Method__init__
(self, config)
model.py:110
Method__init__
(self, config)
model.py:124
Method__iter__
(self)
dataset.py:15
Method_init_weights
(self, module)
model.py:168
Methodforward
(self, q, k)
model.py:21
Methodforward
(self, x)
model.py:72
Methodforward
(self, x)
model.py:119
Methodforward
(self, x)
model.py:131
Methodforward
(self, idx, targets=None)
model.py:176
Methoditer_batches
( batch_size: int, device: str, num_workers: int = 0, **dataset_kwargs )
dataset.py:45
Functionprocess_shard
(args: tuple, vocab_size: int)
preprocess.py:80