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

Method encode_special

tests/test_engine.py:67–68  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

65 self._bos = 261
66
67 def encode_special(self, s):
68 return self._special_tokens[s]
69
70 def get_bos_token_id(self):
71 return self._bos

Callers 4

get_batchFunction · 0.45
generate_streamFunction · 0.45
chat_completionsFunction · 0.45
chat_cli.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected