MCPcopy Create free account

hub / github.com/Jittor/JittorLLMs / functions

Functions1,370 in github.com/Jittor/JittorLLMs

↓ 1 callersMethodset_special_tokens
Add a list of additional tokens to the encoder. The additional tokens are indexed starting from the last index of the current
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:181
↓ 1 callersFunctionshould_split
given split proportions checks if should split Examples: >>> should_split([10,0,0]) False >>> should_split([1,.1,.2]) True
models/pangualpha/megatron/deprecated_data_utils/__init__.py:32
↓ 1 callersFunctionsingle_dataset_provider
(datapath)
models/pangualpha/tasks/race/finetune.py:53
↓ 1 callersFunctionsplit
()
models/pangualpha/tools/split_full_model_into_mp_model.py:112
↓ 1 callersFunctionsplit_ds
Split a dataset into subsets given proportions of how much to allocate per split. If a split is 0% returns None for that split. Purpose:
models/pangualpha/megatron/deprecated_data_utils/datasets.py:172
↓ 1 callersFunctionsplit_full_model
(full_parameter, partition_parameter, partition_dim, stride, rank, num_partitions)
models/pangualpha/tools/split_full_model_into_mp_model.py:107
↓ 1 callersFunctionsplit_into_partitions
(tensor, num_partitions, partition_dim, stride)
models/pangualpha/mergeMpCkpt.py:43
↓ 1 callersFunctionsplit_into_partitions
(tensor, num_partitions, partition_dim, stride)
models/pangualpha/tools/merge_mp_partitions.py:33
↓ 1 callersFunctionsplit_into_partitions
(tensor, num_partitions, partition_dim)
models/pangualpha/tools/splitMergedCkpt_v0.py:49
↓ 1 callersFunctionsplit_strings
Split strings based on string lengths and given start.
models/pangualpha/megatron/deprecated_data_utils/lazy_loader.py:74
↓ 1 callersFunctionsplit_tensor_along_last_dim
Split a tensor along its last dimension. Arguments: tensor: input tensor. num_partitions: number of partitions to split the tensor
models/pangualpha/megatron/mpu/utils.py:33
↓ 1 callersMethodsplit_tensor_along_last_dim
Split a tensor along its last dimension. Arguments: tensor: input tensor. num_partitions: number of partitions to spli
models/chatglm/modeling_chatglm.py:403
↓ 1 callersFunctionsplit_tensor_into_1d_equal_chunks
Break a tensor into equal 1D chunks.
models/pangualpha/megatron/mpu/random.py:104
↓ 1 callersMethodstream_chat
(self, tokenizer, query: str, history: List[Tuple[str, str]] = None, max_length: int = 2048,
models/chatglm/modeling_chatglm.py:1241
↓ 1 callersMethodstream_chat
(self, tokenizer, query: str, history: List[Tuple[str, str]] = None, max_length: int = 2048,
models/atom7b/modeling_llama.py:777
↓ 1 callersMethodstream_generate
( self, input_ids, generation_config: Optional[GenerationConfig] = None,
models/chatglm/modeling_chatglm.py:1267
↓ 1 callersMethodstream_generate
( self, input_ids, generation_config: Optional[GenerationConfig] = None,
models/atom7b/modeling_llama.py:808
↓ 1 callersFunctionswitch
(val1, val2, boolean)
models/pangualpha/megatron/text_generation_utils.py:317
↓ 1 callersFunctiontest_boradcast_data
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_data.py:27
↓ 1 callersFunctiontest_column_parallel_linear
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:186
↓ 1 callersFunctiontest_cross_entropy
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_cross_entropy.py:58
↓ 1 callersFunctiontest_cuda_rng_tracker
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_random.py:86
↓ 1 callersFunctiontest_get_model_parallel_src_rank
(model_parallel_size_)
models/pangualpha/megatron/mpu/tests/test_initialize.py:62
↓ 1 callersFunctiontest_indexed_dataset_get
(args)
models/pangualpha/megatron/data/test/test_indexed_dataset.py:43
↓ 1 callersFunctiontest_initialize_affine_weight
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:107
↓ 1 callersFunctiontest_initialize_model_parallel
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_initialize.py:24
↓ 1 callersFunctiontest_model_parallel_cuda_manual_seed
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_random.py:157
↓ 1 callersFunctiontest_parallel_embedding
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:29
↓ 1 callersFunctiontest_parallel_self_attention
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:361
↓ 1 callersFunctiontest_parallel_transformer_layer
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:449
↓ 1 callersFunctiontest_row_parallel_linear
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_layers.py:253
↓ 1 callersFunctiontest_set_cuda_rng_state
(model_parallel_size)
models/pangualpha/megatron/mpu/tests/test_random.py:24
↓ 1 callersFunctionthreshold_predictions
(all_predictions, threshold)
models/pangualpha/tasks/ensemble_classifier.py:69
↓ 1 callersMethodtime_mixing
(self, x, state, i:int, time_mix_k, time_mix_v, time_mix_r, time_first, time_decay, kw, vw, rw, ow)
models/chatrwkv/RWKV_in_150_lines.py:67
↓ 1 callersMethodtokenize
Tokenize a string.
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:234
↓ 1 callersMethodtokenize
Tokenize a string.
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:236
↓ 1 callersMethodtokenize
Tokenize a string.
models/pangualpha/megatron/tokenizer/tokenization_jieba.py:72
↓ 1 callersMethodtokenize
@param text: Text to encode. @param linebreak: Whether to encode newline (\n) in text. @param whitespaces: Whether to encode
models/chatglm/tokenization_chatglm.py:141
↓ 1 callersMethodtokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:276
↓ 1 callersFunctiontop_k_logits
This function has been mostly taken from huggingface conversational ai code at https://medium.com/huggingface/how-to-build-a-state-of-t
models/pangualpha/megatron/text_generation_utils.py:50
↓ 1 callersFunctiontopk_accuracy
(k)
models/pangualpha/pretrain_ict.py:100
↓ 1 callersFunctiontorch_cross_entropy
(batch_size, seq_length, vocab_size, logits_scale, seed)
models/pangualpha/megatron/mpu/tests/test_cross_entropy.py:29
↓ 1 callersMethodtrack_and_report_progress
Utility function for tracking progress
models/pangualpha/megatron/indexer.py:44
↓ 1 callersFunctiontrain
Train the model function.
models/pangualpha/megatron/training.py:367
↓ 1 callersFunctiontrain_valid_datasets_provider
Provide train and validation datasets.
models/pangualpha/tasks/race/finetune.py:27
↓ 1 callersFunctiontruncate_segments
Truncates a pair of sequences to a maximum sequence length.
models/pangualpha/megatron/data/dataset_utils.py:79
↓ 1 callersMethodtruncate_seq_pair
Truncate sequence pair according to original BERT implementation: https://github.com/google-research/bert/blob/master/create_pretrain
models/pangualpha/megatron/deprecated_data_utils/datasets.py:787
↓ 1 callersMethodupdate_scale
(self, overflow)
models/pangualpha/megatron/fp16/loss_scaler.py:56
↓ 1 callersFunctionurl_is_malformed
(url)
models/pangualpha/tools/openwebtext/blacklist_urls.py:229
↓ 1 callersFunctionurl_to_filename
Convert `url` into a hashed filename in a repeatable way. If `etag` is specified, append its hash to the url's, delimited by a period.
models/pangualpha/megatron/deprecated_data_utils/file_utils.py:43
↓ 1 callersFunctionvocab_parallel_cross_entropy
Helper function for the cross entropy.
models/pangualpha/megatron/mpu/cross_entropy.py:108
↓ 1 callersMethodvocab_range_from_global_vocab_size
(global_vocab_size, rank, world_size)
models/pangualpha/megatron/mpu/utils.py:67
↓ 1 callersMethodvocab_range_from_per_partition_vocab_size
(per_partition_vocab_size, rank, world_size)
models/pangualpha/megatron/mpu/utils.py:60
↓ 1 callersMethodvocab_size
(self)
models/pangualpha/megatron/tokenizer/tokenizer.py:79
↓ 1 callersFunctionwrite_files
(lines, mappings, filepaths)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:77
↓ 1 callersFunctionwrite_files
(lines, mappings, filepaths)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:92
↓ 1 callersFunctionwrite_mapping_file
(m, path)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:90
↓ 1 callersFunctionwrite_mapping_file
(m, path)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:105
↓ 1 callersFunctionwrite_predictions
(all_predictions, all_labels, all_uid, args)
models/pangualpha/tasks/ensemble_classifier.py:93
MethodDecodeIds
Convert a list or tokenization object of Ids to a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:467
MethodDecodeIds
converts ascii ids to tokens before joining them into text
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:531
MethodDecodeIds
converts ids to a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:700
MethodDecodeIds
converts ids to wordpiece tokens and joins them as a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:810
MethodDecodeIds
(self, Ids, type_token=False)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:909
MethodDecodeTokens
Convert a list or tokenization object of tokens to a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:471
MethodDecodeTokens
just concatenates ascii tokens into text
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:537
MethodDecodeTokens
converts sentencepiece tokens to a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:706
MethodDecodeTokens
converts wordpiece tokens to a text string
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:823
MethodDecodeTokens
(self, Tokens, type_token=False)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:917
MethodEncodeAsIds
convert text to ascii 256 Ids
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:505
MethodEncodeAsIds
convert text to sentencepiece Ids
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:676
MethodEncodeAsIds
convert text to wordpiece Ids
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:777
MethodEncodeAsIds
(self, text, process_fn=None)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:872
MethodEncodeAsTokens
Preprocess text and encode as tokens. Return a tokenization object with original text, processed text, and token tokenization.
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:452
MethodEncodeAsTokens
convert text to ascii 256 characters
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:514
MethodEncodeAsTokens
convert text to sentencepiece tokens
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:684
MethodEncodeAsTokens
convert wordpiece token to Id
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:786
MethodEncodeAsTokens
(self, text, process_fn=None)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:882
MethodFF_one
(self, x, state, i:int, time_mix_k, time_mix_r, kw, vw, rw)
models/chatrwkv/src/model_run.py:114
MethodFF_seq
(self, x, state, i:int, time_mix_k, time_mix_r, kw, vw, rw)
models/chatrwkv/src/model_run.py:126
MethodGetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:72
MethodGetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:152
MethodGetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:369
MethodGetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/lazy_loader.py:149
MethodIdToToken
Convert an Id to Token. Reverse lookup of self.vocab
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:459
MethodIdToToken
convert Id to sentencpiece token
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:794
MethodIdToToken
(self, Id, type_token=False)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:895
FunctionPYBIND11_MODULE
models/pangualpha/megatron/data/helpers.cpp:639
FunctionPYBIND11_MODULE
models/pangualpha/megatron/fused_kernels/scaled_upper_triang_masked_softmax.cpp:62
FunctionPYBIND11_MODULE
models/chatrwkv/rwkv_pip_package/src/rwkv/cuda/wkv_op.cpp:9
MethodSA_one
(self, x, state, i:int, time_mix_k, time_mix_v, time_mix_r, time_first, time_decay, kw, vw, rw, ow)
models/chatrwkv/src/model_run.py:138
MethodSA_seq
(self, x, state, i:int, time_mix_k, time_mix_v, time_mix_r, time_first, time_decay, kw, vw, rw, ow)
models/chatrwkv/src/model_run.py:169
MethodSetTokenizer
(self, tokenizer)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:68
MethodSetTokenizer
(self, tokenizer)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:149
MethodSetTokenizer
logic to set and remove (set to None) tokenizer. combines preprocessing/tokenization into one callable.
models/pangualpha/megatron/deprecated_data_utils/lazy_loader.py:137
FunctionTORCH_LIBRARY
models/chatrwkv/rwkv_pip_package/src/rwkv/cuda/wkv_op.cpp:13
MethodTokenToId
convert token to Id accounting for command and type tokens
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:346
MethodTokenToId
Convert a Token to Id. Lookup of self.vocab
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:463
MethodTokenToId
convert sentencpiece token to Id
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:696
MethodTokenToId
convert sentencpiece token to Id
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:802
← previousnext →601–700 of 1,370, ranked by callers