MCPcopy Create free account
hub / github.com/tinygrad/tinygrad / encode

Function encode

examples/tinychat/tinychat-browser/index.js:906–910  ·  view source on GitHub ↗
(text, allow_special = false)

Source from the content-addressed store, hash-verified

904 },
905
906 encode(text, allow_special = false) {
907 const allowedSpecial = allow_special ? "all" : new Set();
908 const disallowedSpecial = new Set();
909 return tokenizer.encode(text, allowedSpecial, disallowedSpecial);
910 },
911
912 encodeRole(role) {
913 const tokens = [];

Callers 1

train_gpt2.pyFile · 0.50

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…