Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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_batch
Function · 0.45
generate_stream
Function · 0.45
chat_completions
Function · 0.45
chat_cli.py
File · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected