MCPcopy Create free account

hub / github.com/alasdairforsythe/tokenmonster / functions

Functions381 in github.com/alasdairforsythe/tokenmonster

↓ 3 callersMethod_modified
(self)
python/tokenmonster.py:990
↓ 3 callersMethod_set_local_directory
(cls, dir=None)
python/tokenmonster.py:1005
↓ 3 callersMethodcount
tokenmonster-cpp/src/tokenmonster.cpp:3158
↓ 3 callersFunctiondecodeHex
(str string)
go/tokenmonster.go:4015
↓ 3 callersFunctiondecodeLastRune
(b []byte, charsetFlag uint8)
go/tokenmonster.go:401
↓ 3 callersFunctiondecodeLastRune
(b []byte)
training/trainvocab.go:295
↓ 3 callersFunctionflagRequired
(name string, value interface{})
training/getalltokens.go:101
↓ 3 callersFunctionfnv1a
tokenmonster-cpp/tests/bench.cpp:30
↓ 3 callersFunctionformatInt
(v int)
training/getalltokens.go:118
↓ 3 callersFunctiongenASCIIbytes
(list []bool, usingCapcode uint8)
go/tokenmonster.go:313
↓ 3 callersFunctiongenASCIIbytes
(list []bool)
training/trainvocab.go:189
↓ 3 callersMethodget
(key)
javascript/tokenmonster.js:57
↓ 3 callersFunctionisCapcode
(r rune, usingCapcode uint8)
go/tokenmonster.go:367
↓ 3 callersFunctionisCapcode
(r rune)
training/trainvocab.go:261
↓ 3 callersFunctionisUpper
(r)
javascript/tokenmonster.js:880
↓ 3 callersMethodnew_decoder
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:95
↓ 3 callersFunctionnormalize
(data []byte)
training/getalltokens.go:168
↓ 3 callersFunctionprocess_jsonl_file
(input_file, output_file, max_size=None)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:16
↓ 3 callersFunctionprocess_parquet_file
(input_file, output_file, max_size=None)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:33
↓ 3 callersMethodserialize_tokens
Serializes tokens from a numpy array into a binary string. The encoding_length needs to be recorded separetely.
python/tokenmonster.py:930
↓ 2 callersMethodCount
Tokenizes but returns the number of tokens instead of the tokens.
go/tokenmonster.go:971
↓ 2 callersMethodDecodeSerialized
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 callersMethodDenormalize
Decodes capcode from the bytes.
go/tokenmonster.go:2490
↓ 2 callersMethodDisableUnkToken
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 callersMethodEnableUnkToken
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 callersMethodExportYAML
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 callersMethodHasUnk
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 callersMethodNumSingleByteTokens
The number of single byte tokens in the vocabulary.
go/tokenmonster.go:2540
↓ 2 callersMethodSave
--------- LOADING AND SAVING --------- Save the vocabulary to local file.
go/tokenmonster.go:2602
↓ 2 callersMethodTokenToId
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 callersMethodTokenizeToSerialized
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 callersMethodTokensDetailed
Returns a slice of Info struct where the index is the Token ID
go/tokenmonster.go:2377
↓ 2 callersMethodUnk
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 callersMethod_equals
(a, b)
javascript/tokenmonster.js:18
↓ 2 callersMethod_install_tokenmonsterserver
(cls)
python/tokenmonster.py:1107
↓ 2 callersFunction_pack_32bit_ints
(integer_list)
python/tokenmonster.py:1263
↓ 2 callersMethod_start_process
(cls)
python/tokenmonster.py:1092
↓ 2 callersMethod_tms_get_version
(cls)
python/tokenmonster.py:1129
↓ 2 callersMethodadd
tokenmonster-cpp/src/tokenmonster.cpp:499
↓ 2 callersFunctionadd_leading_space
tokenmonster-cpp/src/tokenmonster.cpp:245
↓ 2 callersFunctionapplyCapcode
(data []byte, usingCapcode uint8)
go/tokenmonster.go:233
↓ 2 callersFunctionapplyCapcode
(data []byte)
training/mergetokens.go:28
↓ 2 callersFunctionapplyCapcode
* 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 callersFunctionapplyCapcode
(data []byte)
training/trainvocab.go:326
↓ 2 callersFunctioncanHaveUnkToken
(i int, usingCapcode uint8)
go/tokenmonster.go:438
↓ 2 callersMethoddecode
(tokens []uint32)
go/tokenmonster.go:813
↓ 2 callersMethoddeserialize_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 callersFunctiondetectSavedFinal
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 callersFunctionfilterBalanced
(tok []byte)
training/getalltokens.go:539
↓ 2 callersFunctionfilterClean
(tok []byte)
training/getalltokens.go:462
↓ 2 callersFunctionfilterConsistent
(tok []byte)
training/getalltokens.go:632
↓ 2 callersFunctionfilterStrict
(tok []byte)
training/getalltokens.go:906
↓ 2 callersFunctionflagIsSet
(flagName string)
training/trainvocab.go:143
↓ 2 callersFunctionloadTokensFromFile
(filename string)
training/mergetokens.go:78
↓ 2 callersFunctionloadTokensFromFile
(filename string)
training/comparetokens.go:17
↓ 2 callersFunctionlower_case
tokenmonster-cpp/src/tokenmonster.cpp:213
↓ 2 callersMethodmax_token_length
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:107
↓ 2 callersFunctionnormalize
(data []byte)
training/mergetokens.go:37
↓ 2 callersFunctionprocessChunkBalanced
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1415
↓ 2 callersFunctionprocessChunkClean
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1352
↓ 2 callersFunctionprocessChunkConsistent
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1478
↓ 2 callersFunctionprocessChunkStrict
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1541
↓ 2 callersFunctionprocessChunkUnfiltered
(asset workStruct, numChunks int, trim bool)
training/getalltokens.go:1107
↓ 2 callersFunctionreadBlock
(buf []byte)
training/tokenmonsterserver.go:158
↓ 2 callersFunctionreadString8
(data []byte)
training/tokenmonsterserver.go:99
↓ 2 callersMethodread_bytes8
tokenmonster-cpp/src/tokenmonster.cpp:170
↓ 2 callersMethodread_float32
tokenmonster-cpp/src/tokenmonster.cpp:163
↓ 2 callersFunctionshuffle
(original [][]byte)
training/trainvocab.go:1324
↓ 2 callersFunctionwrite_text_to_output_file
(text_field, out_file, file_size, max_size)
training/dataset_helpers/extract_text_from_jsonl_parquet.py:9
↓ 1 callersMethodDecodeSerialized
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 callersMethodDeserialize
(data []byte, encodingLength uint8)
go/tokenmonster.go:749
↓ 1 callersMethodMaxTokenLength
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 callersMethodNewDecoder
--------- 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 callersMethodNormalization
The type of normalization applied automatically when tokenizing. Returns a string.
go/tokenmonster.go:2573
↓ 1 callersMethodNumDeletedTokens
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 callersMethodSingleBytesTrainingCode
Returns the uint8 code corresponding to the training parameters for single byte tokens.
go/tokenmonster.go:2590
↓ 1 callersMethodSpecialTokens
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 callersMethodTokenize
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 callersFunction_get_binary_filename
()
python/tokenmonster.py:1204
↓ 1 callersFunction_is_prebuilt
(name)
python/tokenmonster.py:1178
↓ 1 callersFunction_pack_16bit_ints
(integer_list)
python/tokenmonster.py:1251
↓ 1 callersFunction_read_float32
(input)
python/tokenmonster.py:1287
↓ 1 callersMethod_unload
(self)
python/tokenmonster.py:177
↓ 1 callersMethod_unload
(self)
python/tokenmonster.py:255
↓ 1 callersFunction_unpack_16bit_ints
(binary_string)
python/tokenmonster.py:1239
↓ 1 callersFunction_unpack_32bit_ints
(binary_string)
python/tokenmonster.py:1247
↓ 1 callersFunctionappend_bytes
tokenmonster-cpp/src/tokenmonster.cpp:34
↓ 1 callersMethodapplyNormalize
(text)
javascript/tokenmonster.js:205
↓ 1 callersFunctionapply_capcode
tokenmonster-cpp/src/tokenmonster.cpp:477
↓ 1 callersFunctionbenchmark
()
benchmark/tiktoken_test.py:20
↓ 1 callersFunctionbenchmark
()
benchmark/llama_test.py:17
↓ 1 callersMethodbuild
tokenmonster-cpp/src/tokenmonster.cpp:607
↓ 1 callersFunctionbytes
tokenmonster-cpp/tests/dump.cpp:11
↓ 1 callersMethodcapcode
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:109
↓ 1 callersFunctioncapcode_encode
(data)
javascript/tokenmonster.js:900
↓ 1 callersMethodcharset
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:108
↓ 1 callersFunctioncollapse
tokenmonster-cpp/src/tokenmonster.cpp:285
↓ 1 callersFunctioncollapse_and_quotemarks
tokenmonster-cpp/src/tokenmonster.cpp:361
↓ 1 callersFunctioncollapse_and_unix_lines
tokenmonster-cpp/src/tokenmonster.cpp:316
↓ 1 callersFunctioncollapse_quotemarks_unix_lines
tokenmonster-cpp/src/tokenmonster.cpp:392
← previousnext →101–200 of 381, ranked by callers