Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alasdairforsythe/tokenmonster
/ functions
Functions
381 in github.com/alasdairforsythe/tokenmonster
⨍
Functions
381
◇
Types & classes
47
↓ 3 callers
Method
_modified
(self)
python/tokenmonster.py:990
↓ 3 callers
Method
_set_local_directory
(cls, dir=None)
python/tokenmonster.py:1005
↓ 3 callers
Method
count
tokenmonster-cpp/src/tokenmonster.cpp:3158
↓ 3 callers
Function
decodeHex
(str string)
go/tokenmonster.go:4015
↓ 3 callers
Function
decodeLastRune
(b []byte, charsetFlag uint8)
go/tokenmonster.go:401
↓ 3 callers
Function
decodeLastRune
(b []byte)
training/trainvocab.go:295
↓ 3 callers
Function
flagRequired
(name string, value interface{})
training/getalltokens.go:101
↓ 3 callers
Function
fnv1a
tokenmonster-cpp/tests/bench.cpp:30
↓ 3 callers
Function
formatInt
(v int)
training/getalltokens.go:118
↓ 3 callers
Function
genASCIIbytes
(list []bool, usingCapcode uint8)
go/tokenmonster.go:313
↓ 3 callers
Function
genASCIIbytes
(list []bool)
training/trainvocab.go:189
↓ 3 callers
Method
get
(key)
javascript/tokenmonster.js:57
↓ 3 callers
Function
isCapcode
(r rune, usingCapcode uint8)
go/tokenmonster.go:367
↓ 3 callers
Function
isCapcode
(r rune)
training/trainvocab.go:261
↓ 3 callers
Function
isUpper
(r)
javascript/tokenmonster.js:880
↓ 3 callers
Method
new_decoder
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:95
↓ 3 callers
Function
normalize
(data []byte)
training/getalltokens.go:168
↓ 3 callers
Function
process_jsonl_file
(input_file, output_file, max_size=None)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:16
↓ 3 callers
Function
process_parquet_file
(input_file, output_file, max_size=None)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:33
↓ 3 callers
Method
serialize_tokens
Serializes tokens from a numpy array into a binary string. The encoding_length needs to be recorded separetely.
python/tokenmonster.py:930
↓ 2 callers
Method
Count
Tokenizes but returns the number of tokens instead of the tokens.
go/tokenmonster.go:971
↓ 2 callers
Method
DecodeSerialized
Decodes tokens from a serialized bytes slice. `encodingLength` must be one of: 0, 2, 3, 4. If you enter `encodingLength` 0 then it will determine the
go/tokenmonster.go:803
↓ 2 callers
Method
Denormalize
Decodes capcode from the bytes.
go/tokenmonster.go:2490
↓ 2 callers
Method
DisableUnkToken
Disables the UNK token. Without an UNK token, a character that has no token to represent it will be ignored.
go/tokenmonster.go:2884
↓ 2 callers
Method
EnableUnkToken
Enables the UNK token. Returns true if successful, returns false if an UNK token is not applicable to this vocabulary (all bytes have tokens). If enab
go/tokenmonster.go:2857
↓ 2 callers
Method
ExportYAML
Exports the vocabulary to a human-readable YAML file. It writes to an io.Writer. You can import from YAML with NewVocabFromYAML().
go/tokenmonster.go:3843
↓ 2 callers
Method
HasUnk
Returns true if the vocabulary is using the UNK token. If used, the UNK token ID is used whenever a character being tokenized doesn't exist in the voc
go/tokenmonster.go:2485
↓ 2 callers
Method
NumSingleByteTokens
The number of single byte tokens in the vocabulary.
go/tokenmonster.go:2540
↓ 2 callers
Method
Save
--------- LOADING AND SAVING --------- Save the vocabulary to local file.
go/tokenmonster.go:2602
↓ 2 callers
Method
TokenToId
Returns the ID of the token from bytes. This only works for capcode encoded tokens. Apply `Normalize` to the bytes first to use this with decoded toke
go/tokenmonster.go:2504
↓ 2 callers
Method
TokenizeToSerialized
Tokenizes directly into serialized bytes with either 16-bit, 24-bit or 32-bit encoded unsigned integers depending on the vocabulary size. Set encoding
go/tokenmonster.go:986
↓ 2 callers
Method
TokensDetailed
Returns a slice of Info struct where the index is the Token ID
go/tokenmonster.go:2377
↓ 2 callers
Method
Unk
Returns the ID of the Unk token. It will return 16777215 if there is no Unk token. You can use HasUnk() to first check if there is an UNK token.
go/tokenmonster.go:2479
↓ 2 callers
Method
_equals
(a, b)
javascript/tokenmonster.js:18
↓ 2 callers
Method
_install_tokenmonsterserver
(cls)
python/tokenmonster.py:1107
↓ 2 callers
Function
_pack_32bit_ints
(integer_list)
python/tokenmonster.py:1263
↓ 2 callers
Method
_start_process
(cls)
python/tokenmonster.py:1092
↓ 2 callers
Method
_tms_get_version
(cls)
python/tokenmonster.py:1129
↓ 2 callers
Method
add
tokenmonster-cpp/src/tokenmonster.cpp:499
↓ 2 callers
Function
add_leading_space
tokenmonster-cpp/src/tokenmonster.cpp:245
↓ 2 callers
Function
applyCapcode
(data []byte, usingCapcode uint8)
go/tokenmonster.go:233
↓ 2 callers
Function
applyCapcode
(data []byte)
training/mergetokens.go:28
↓ 2 callers
Function
applyCapcode
* func norm_UTF16_NFD(input []byte) ([]byte, error) { // Assume LittleEndian by default endian := uni.LittleEndian bomPolicy := uni.IgnoreBOM if l
training/getalltokens.go:159
↓ 2 callers
Function
applyCapcode
(data []byte)
training/trainvocab.go:326
↓ 2 callers
Function
canHaveUnkToken
(i int, usingCapcode uint8)
go/tokenmonster.go:438
↓ 2 callers
Method
decode
(tokens []uint32)
go/tokenmonster.go:813
↓ 2 callers
Method
deserialize_tokens
Deserializes a binary string into a numpy array of tokens IDs. The encoding_length needs to be recorded separetely.
python/tokenmonster.py:916
↓ 2 callers
Function
detectSavedFinal
This is a helper function to allow for resuming the progress from a final dictionary It returns the score and true if the filename is score_numbers.wh
training/trainvocab.go:1334
↓ 2 callers
Function
filterBalanced
(tok []byte)
training/getalltokens.go:539
↓ 2 callers
Function
filterClean
(tok []byte)
training/getalltokens.go:462
↓ 2 callers
Function
filterConsistent
(tok []byte)
training/getalltokens.go:632
↓ 2 callers
Function
filterStrict
(tok []byte)
training/getalltokens.go:906
↓ 2 callers
Function
flagIsSet
(flagName string)
training/trainvocab.go:143
↓ 2 callers
Function
loadTokensFromFile
(filename string)
training/mergetokens.go:78
↓ 2 callers
Function
loadTokensFromFile
(filename string)
training/comparetokens.go:17
↓ 2 callers
Function
lower_case
tokenmonster-cpp/src/tokenmonster.cpp:213
↓ 2 callers
Method
max_token_length
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:107
↓ 2 callers
Function
normalize
(data []byte)
training/mergetokens.go:37
↓ 2 callers
Function
processChunkBalanced
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1415
↓ 2 callers
Function
processChunkClean
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1352
↓ 2 callers
Function
processChunkConsistent
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1478
↓ 2 callers
Function
processChunkStrict
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1541
↓ 2 callers
Function
processChunkUnfiltered
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1107
↓ 2 callers
Function
readBlock
(buf []byte)
training/tokenmonsterserver.go:158
↓ 2 callers
Function
readString8
(data []byte)
training/tokenmonsterserver.go:99
↓ 2 callers
Method
read_bytes8
tokenmonster-cpp/src/tokenmonster.cpp:170
↓ 2 callers
Method
read_float32
tokenmonster-cpp/src/tokenmonster.cpp:163
↓ 2 callers
Function
shuffle
(original [][]byte)
training/trainvocab.go:1324
↓ 2 callers
Function
write_text_to_output_file
(text_field, out_file, file_size, max_size)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:9
↓ 1 callers
Method
DecodeSerialized
Decodes tokens from a serialized bytes slice. `encodingLength` must be one of: 0, 2, 3, 4. If you enter `encodingLength` 0 then it will determine the
go/tokenmonster.go:466
↓ 1 callers
Method
Deserialize
(data []byte, encodingLength uint8)
go/tokenmonster.go:749
↓ 1 callers
Method
MaxTokenLength
The length of the longest (encoded) token in the vocabulary. This can be lower than that chosen during training if none of the longer tokens were chos
go/tokenmonster.go:2519
↓ 1 callers
Method
NewDecoder
--------- DECODER --------- Creates a new Decoder instance. This is for decoding tokens in a sequence when they are to be decoded individually or in b
go/tokenmonster.go:450
↓ 1 callers
Method
Normalization
The type of normalization applied automatically when tokenizing. Returns a string.
go/tokenmonster.go:2573
↓ 1 callers
Method
NumDeletedTokens
The number of tokens deleted from the vocabulary. These can be restored by resizing the vocabulary to be be larger.
go/tokenmonster.go:2585
↓ 1 callers
Method
SingleBytesTrainingCode
Returns the uint8 code corresponding to the training parameters for single byte tokens.
go/tokenmonster.go:2590
↓ 1 callers
Method
SpecialTokens
Returns the token IDs and the corresponding tokens of only the. Set `decode` to false to receive the decoded form of the tokens.
go/tokenmonster.go:2417
↓ 1 callers
Method
Tokenize
Tokenizes text from bytes slice to token IDs. The 2nd returned value (int) is the number of characters for which there were no tokens and were replace
go/tokenmonster.go:959
↓ 1 callers
Function
_get_binary_filename
()
python/tokenmonster.py:1204
↓ 1 callers
Function
_is_prebuilt
(name)
python/tokenmonster.py:1178
↓ 1 callers
Function
_pack_16bit_ints
(integer_list)
python/tokenmonster.py:1251
↓ 1 callers
Function
_read_float32
(input)
python/tokenmonster.py:1287
↓ 1 callers
Method
_unload
(self)
python/tokenmonster.py:177
↓ 1 callers
Method
_unload
(self)
python/tokenmonster.py:255
↓ 1 callers
Function
_unpack_16bit_ints
(binary_string)
python/tokenmonster.py:1239
↓ 1 callers
Function
_unpack_32bit_ints
(binary_string)
python/tokenmonster.py:1247
↓ 1 callers
Function
append_bytes
tokenmonster-cpp/src/tokenmonster.cpp:34
↓ 1 callers
Method
applyNormalize
(text)
javascript/tokenmonster.js:205
↓ 1 callers
Function
apply_capcode
tokenmonster-cpp/src/tokenmonster.cpp:477
↓ 1 callers
Function
benchmark
()
benchmark/tiktoken_test.py:20
↓ 1 callers
Function
benchmark
()
benchmark/llama_test.py:17
↓ 1 callers
Method
build
tokenmonster-cpp/src/tokenmonster.cpp:607
↓ 1 callers
Function
bytes
tokenmonster-cpp/tests/dump.cpp:11
↓ 1 callers
Method
capcode
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:109
↓ 1 callers
Function
capcode_encode
(data)
javascript/tokenmonster.js:900
↓ 1 callers
Method
charset
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:108
↓ 1 callers
Function
collapse
tokenmonster-cpp/src/tokenmonster.cpp:285
↓ 1 callers
Function
collapse_and_quotemarks
tokenmonster-cpp/src/tokenmonster.cpp:361
↓ 1 callers
Function
collapse_and_unix_lines
tokenmonster-cpp/src/tokenmonster.cpp:316
↓ 1 callers
Function
collapse_quotemarks_unix_lines
tokenmonster-cpp/src/tokenmonster.cpp:392
← previous
next →
101–200 of 381, ranked by callers