MCPcopy
hub / github.com/karpathy/nanochat / get_vocab_size

Method get_vocab_size

nanochat/tokenizer.py:209–210  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

207 return cls(enc, "<|endoftext|>")
208
209 def get_vocab_size(self):
210 return self.enc.n_vocab
211
212 def get_special_tokens(self):
213 return self.enc.special_tokens_set

Callers 7

get_vocab_sizeMethod · 0.45
build_modelFunction · 0.45
tok_train.pyFile · 0.45
chat_sft.pyFile · 0.45
base_train.pyFile · 0.45
get_hf_token_bytesFunction · 0.45
tok_eval.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected