MCPcopy Create free account

hub / github.com/Jittor/JittorLLMs / functions

Functions1,370 in github.com/Jittor/JittorLLMs

↓ 256 callersMethodappend
(self, other)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:109
↓ 132 callersFunctionprint_rank_0
If distributed is initialized print only on rank 0.
models/pangualpha/megatron/__init__.py:36
↓ 130 callersMethodsize
(self, index)
models/pangualpha/megatron/data/indexed_dataset.py:197
↓ 84 callersFunctionget_args
Return arguments.
models/pangualpha/megatron/global_vars.py:34
↓ 52 callersMethodextend
(self, other)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:122
↓ 34 callersMethodget
Retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [idx] but get
models/pangualpha/megatron/data/indexed_dataset.py:500
↓ 24 callersMethodencode
(self, x)
models/chatrwkv/src/utils.py:35
↓ 23 callersMethodforward
(self, tokens, state, preprocess_only = False)
models/chatrwkv/src/model_run.py:206
↓ 23 callersFunctionget_tokenizer
Return tokenizer.
models/pangualpha/megatron/global_vars.py:40
↓ 22 callersMethodwrite
Write timers to a tensorboard writer
models/pangualpha/megatron/global_vars.py:211
↓ 21 callersFunctionsplitTensorlIntoPartition
(tensor, tensorNewList, mpPartitions, tensorName, dim)
models/pangualpha/tools/splitMergedCkpt_v0.py:74
↓ 21 callersMethodstart
Start the timer.
models/pangualpha/megatron/global_vars.py:164
↓ 20 callersMethodtokenize
(self, *text)
models/pangualpha/tools/preprocess_data_pangu.py:54
↓ 18 callersMethodstop
Stop the timer.
models/pangualpha/megatron/global_vars.py:171
↓ 17 callersMethodexists
check if the filepath for a text tokenizer exists
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:437
↓ 16 callersMethodexists
(path)
models/pangualpha/megatron/data/indexed_dataset.py:201
↓ 14 callersMethodcumsum
(sequence)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:49
↓ 14 callersMethoddecode
(self, x)
models/chatrwkv/src/utils.py:38
↓ 14 callersMethodlayer_norm
(self, x, w)
models/chatrwkv/RWKV_in_150_lines.py:54
↓ 14 callersFunctionset_random_seed
Set random seed for reproducability.
models/pangualpha/megatron/mpu/tests/commons.py:34
↓ 14 callersMethodupdate
Updates the cache with the new `key_states` and `value_states` for the layer `layer_idx`. Parameters: key_states (`jt.Va
models/qwen2/qwen2_jt/utils.py:43
↓ 14 callersMethodwrite
given a generator of metrics for each of the data points X_i, write the metrics, text, and labels to a csv file
models/pangualpha/megatron/deprecated_data_utils/datasets.py:299
↓ 13 callersMethodapply
(self, args)
models/pangualpha/megatron/deprecated_data_utils/configure_data.py:31
↓ 13 callersFunctionprint_separator
(message)
models/pangualpha/megatron/mpu/tests/commons.py:76
↓ 13 callersMethodwrite
(self, sizes, doc_idx)
models/pangualpha/megatron/data/indexed_dataset.py:363
↓ 12 callersFunctionget_model_parallel_group
Get the model parallel group the caller rank belongs to.
models/pangualpha/megatron/mpu/initialize.py:97
↓ 12 callersFunctionget_model_parallel_rank
Return my rank for the model parallel group.
models/pangualpha/megatron/mpu/initialize.py:131
↓ 11 callersFunctionget_checkpoint_name
A unified checkpoint name.
models/pangualpha/megatron/checkpointing.py:61
↓ 11 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
models/pangualpha/megatron/checkpointing.py:75
↓ 11 callersFunctionget_model_parallel_world_size
Return world size for the model parallel group.
models/pangualpha/megatron/mpu/initialize.py:117
↓ 11 callersFunctionget_timers
Return timers.
models/pangualpha/megatron/global_vars.py:58
↓ 11 callersMethodload_state_dict
(self, state_dict, strict=True)
models/pangualpha/megatron/fp16/fp16.py:84
↓ 10 callersMethodadd
Track the rng state.
models/pangualpha/megatron/mpu/random.py:160
↓ 10 callersFunctionsave_all_stat
(srv, name, last_out)
models/chatrwkv/chat.py:238
↓ 10 callersFunctionsave_all_stat
(srv, name, last_out)
models/chatrwkv/v2/chat.py:149
↓ 10 callersMethodsave_all_stat
(self, srv, name, last_out)
models/chatrwkv/__init__.py:165
↓ 9 callersMethod__init__
(self, config)
models/atom7b/modeling_llama.py:201
↓ 9 callersMethodbackward
(ctx, *args)
models/pangualpha/megatron/mpu/random.py:292
↓ 9 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
models/pangualpha/megatron/model/distributed.py:78
↓ 8 callersMethodEncodeAsIds
encode text using text tokenizer and shift Id values for command tokens
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:319
↓ 8 callersMethod__init__
(self, hidden_size, inner_hidden_size=None, layer_id=None, bias=True, activation_func=gelu, p
models/chatglm/modeling_chatglm.py:502
↓ 8 callersFunction_compare
(arg_name)
models/pangualpha/megatron/checkpointing.py:36
↓ 8 callersFunctionadd_to_logging
(name)
models/pangualpha/megatron/training.py:317
↓ 8 callersFunctionclean_text
Remove new lines and multiple spaces and adjust end of sentence dot.
models/pangualpha/tasks/data_utils.py:22
↓ 8 callersMethodencode
(self, iterator)
models/pangualpha/tools/preprocess_data_pangu.py:62
↓ 8 callersFunctionrun_rnn
(tokens, newline_adj = 0)
models/chatrwkv/chat.py:220
↓ 8 callersFunctionrun_rnn
(tokens, newline_adj = 0)
models/chatrwkv/v2/chat.py:131
↓ 8 callersMethodrun_rnn
(self, tokens, newline_adj = 0)
models/chatrwkv/__init__.py:150
↓ 7 callersMethod__init__
(self, config)
models/qwen2/qwen2_jt/modeling_qwen2.py:123
↓ 7 callersMethodadd
Allocate a chunk of memory from the buffer to tensor and copy the values.
models/pangualpha/megatron/memory.py:89
↓ 7 callersFunctiondata_file_path
(prefix_path)
models/pangualpha/megatron/data/indexed_dataset.py:115
↓ 7 callersMethoddecode
(self, t: List[int])
models/llama/llama/tokenizer.py:39
↓ 7 callersMethodget_command
get command token corresponding to `name`
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:271
↓ 7 callersFunctionrebuild_tokenizer
(args)
models/pangualpha/megatron/global_vars.py:95
↓ 6 callersMethodSetTokenizer
(self, tokenizer)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:263
↓ 6 callersMethodencode
(self, text)
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:278
↓ 6 callersFunctionensure_directory_exists
Build filename's path if it does not already exists.
models/pangualpha/megatron/checkpointing.py:54
↓ 6 callersMethodfork
Fork the cuda rng state, perform operations, and exit with the original state.
models/pangualpha/megatron/mpu/random.py:178
↓ 6 callersFunctionget_linear_layer
Simple linear layer with weight initialization.
models/pangualpha/megatron/model/utils.py:45
↓ 6 callersFunctionindex_file_path
(prefix_path)
models/pangualpha/megatron/data/indexed_dataset.py:111
↓ 6 callersFunctioninit_method_normal
Init method based on N(0, sigma).
models/pangualpha/megatron/model/utils.py:27
↓ 6 callersFunctioninitialize_megatron
Set global variables, initialize distributed, and set autoresume and random seeds. `allow_no_cuda` should not be set unless using megatron for
models/pangualpha/megatron/initialize.py:31
↓ 6 callersFunctionload_all_stat
(srv, name)
models/chatrwkv/chat.py:245
↓ 6 callersFunctionload_all_stat
(srv, name)
models/chatrwkv/v2/chat.py:156
↓ 6 callersMethodload_all_stat
(self, srv, name)
models/chatrwkv/__init__.py:172
↓ 6 callersFunctionload_checkpoint
Load a model checkpoint and return the iteration.
models/pangualpha/megatron/checkpointing.py:131
↓ 6 callersMethodload_state_dict
Customized load.
models/pangualpha/megatron/model/language_model.py:199
↓ 6 callersMethodlog
Log a group of timers.
models/pangualpha/megatron/global_vars.py:221
↓ 6 callersMethodsample_logits
(self, logits, x, ctx_len, temperature=1.0, top_p=1.0)
models/chatrwkv/src/utils.py:41
↓ 6 callersFunctionscaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
models/pangualpha/megatron/model/utils.py:35
↓ 6 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
models/pangualpha/megatron/fp16/fp16.py:76
↓ 5 callersMethodLN
(self, x, w)
models/chatrwkv/src/model_run.py:108
↓ 5 callersMethod__init__
(self, init_method, output_layer_init_method)
models/pangualpha/megatron/model/transformer.py:66
↓ 5 callersMethod_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
models/pangualpha/megatron/learning_rates.py:93
↓ 5 callersFunction_ensure_var_is_not_initialized
Make sure the input variable is not None.
models/pangualpha/megatron/global_vars.py:150
↓ 5 callersFunction_parse_args
Parse entire arguments.
models/pangualpha/megatron/global_vars.py:76
↓ 5 callersFunction_set_cuda_rng_state
Sets the random number generator state of the current GPU. Argumentss: new_state (torch.ByteTensor): The desired state This function
models/pangualpha/megatron/mpu/random.py:71
↓ 5 callersFunctioncached_path
Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and retur
models/pangualpha/megatron/deprecated_data_utils/file_utils.py:87
↓ 5 callersMethoddecode
(self, tokens)
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:283
↓ 5 callersMethoddetokenize
(self, token_ids)
models/pangualpha/megatron/tokenizer/tokenizer.py:98
↓ 5 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
models/pangualpha/megatron/mpu/utils.py:26
↓ 5 callersFunctiondownload_fromhub
(path, tdir="")
models/util.py:4
↓ 5 callersMethodfrom_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:98
↓ 5 callersFunctionget_cuda_rng_tracker
Get cuda rng tracker.
models/pangualpha/megatron/mpu/random.py:215
↓ 5 callersFunctionget_language_model
Build language model and return along with the key to save.
models/pangualpha/megatron/model/language_model.py:45
↓ 5 callersFunctionget_model
Build the model.
models/pangualpha/megatron/training.py:116
↓ 5 callersFunctioninitialize_distributed
Initialize torch.distributed.
models/pangualpha/megatron/mpu/tests/commons.py:42
↓ 5 callersMethodload_state_dict
Load the state dicts of each of the models
models/pangualpha/megatron/model/realm_model.py:105
↓ 5 callersMethodmaybe_print
(self, msg)
models/pangualpha/megatron/fp16/fp16.py:258
↓ 5 callersFunctionsave_checkpoint
Save a model checkpoint.
models/pangualpha/megatron/checkpointing.py:81
↓ 5 callersMethodstate_dict_for_save_checkpoint
Use this function to override the state dict for saving checkpoints.
models/pangualpha/megatron/module.py:27
↓ 5 callersMethodtokenize
(self, text)
models/pangualpha/megatron/tokenizer/tokenizer.py:95
↓ 4 callersMethodGetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:272
↓ 4 callersMethod__init__
(self, dim: int, eps: float = 1e-6)
models/llama/llama/model.py:29
↓ 4 callersFunctionbert_extended_attention_mask
(attention_mask, dtype)
models/pangualpha/megatron/model/bert_model.py:37
↓ 4 callersFunctionbert_position_ids
(token_ids)
models/pangualpha/megatron/model/bert_model.py:59
↓ 4 callersFunctionbuild_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
models/pangualpha/tasks/finetune_utils.py:74
↓ 4 callersMethodconcat_and_pad_tokens
Concat with special tokens and pad sequence to self.max_seq_length
models/pangualpha/megatron/data/ict_dataset.py:126
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:136
↓ 4 callersMethodconvert_ids_to_tokens
Converts a sequence of ids in BPE tokens using the vocab.
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:269
next →1–100 of 1,370, ranked by callers