MCPcopy Create free account

hub / github.com/zai-org/CodeGeeX / functions

Functions1,098 in github.com/zai-org/CodeGeeX

↓ 4 callersFunctionwrite_longs
(f, a)
codegeex/megatron/data/indexed_dataset.py:96
↓ 3 callersMethod__init__
(self, params, config)
codegeex/mindspore/src/utils.py:141
↓ 3 callersFunction_broadcast_nz
(tensor, shape)
codegeex/mindspore/scripts/layer_norm_x_backprop_v2.py:351
↓ 3 callersFunction_ensure_var_is_initialized
Make sure the input variable is not None.
codegeex/megatron/global_vars.py:182
↓ 3 callersFunction_gather
Gather tensors and concatinate along the last dimension.
codegeex/megatron/mpu/mappings.py:58
↓ 3 callersFunction_initialize_affine_weight_cpu
Initialize affine weight for model parallel. Build the master weight on all processes and scatter the relevant chunk.
codegeex/megatron/mpu/layers.py:98
↓ 3 callersFunction_initialize_affine_weight_gpu
Initialize affine weight for model parallel on GPU.
codegeex/megatron/mpu/layers.py:83
↓ 3 callersFunction_reduce
All-reduce the the input tensor across model parallel group.
codegeex/megatron/mpu/mappings.py:26
↓ 3 callersFunction_split
Split the tensor along its last dimension and keep the corresponding slice.
codegeex/megatron/mpu/mappings.py:39
↓ 3 callersFunction_zero_grad_group_helper
Zero out the gradient for a group of parameters. Note: copied from torch.optim.optimizer.
codegeex/megatron/optimizer/optimizer.py:33
↓ 3 callersFunctionaverage_losses_across_data_parallel_group
Reduce a tensor of losses across all GPUs.
codegeex/megatron/utils.py:81
↓ 3 callersFunctionbias_dropout_add
(x, bias, residual, prob, training)
codegeex/megatron/model/transformer.py:547
↓ 3 callersFunctionbuild_dataset
(index, name)
codegeex/megatron/data/prompt_dataset.py:135
↓ 3 callersFunctionchunks
yield n sized chunks from list
codegeex/mindspore/src/preprocess.py:32
↓ 3 callersMethodconvert_tokens_to_ids
(self, tokens)
codegeex/mindspore/src/tokenization_jieba.py:65
↓ 3 callersFunctioncreate_dataset
Create dataset Inputs: batch_size: batch size data_path: path of your MindRecord files device_num: total device numbe
codegeex/mindspore/src/dataset.py:80
↓ 3 callersMethoddecode_code
(self, input_ids)
codegeex/tokenizer/tokenizer.py:58
↓ 3 callersMethodencode_code
(self, code: str)
codegeex/tokenizer/tokenizer.py:51
↓ 3 callersFunctionensure_directory_exists
Build filename's path if it does not already exists.
codegeex/megatron/checkpointing.py:75
↓ 3 callersFunctionestimate_pass_at_k
Estimates pass@k of each problem and returns them in an array.
codegeex/benchmark/metric.py:27
↓ 3 callersFunctionextract_weight_to_half
(weight: torch.Tensor, scale_list: torch.Tensor, source_bit_width: int)
codegeex/kernels/__init__.py:58
↓ 3 callersMethodfork
Fork the cuda rng state, perform operations, and exit with the original state.
codegeex/megatron/mpu/random.py:190
↓ 3 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
codegeex/megatron/checkpointing.py:104
↓ 3 callersFunctionget_checkpoint_version
()
codegeex/megatron/checkpointing.py:38
↓ 3 callersFunctionget_indexed_dataset_
Build indexed dataset.
codegeex/megatron/data/prompt_dataset.py:164
↓ 3 callersMethodget_loss_scale
FP32 optimizer does not do any scaling.
codegeex/megatron/optimizer/optimizer.py:469
↓ 3 callersMethodget_states
Get rng states. Copy the dictionary so we have direct pointers to the states, not just a pointer to the dictionary.
codegeex/megatron/mpu/random.py:159
↓ 3 callersFunctionget_token_stream
( model, tokenizer, seq_length, out_seq_length, context_tokens,
codegeex/torch/inference.py:158
↓ 3 callersMethodload_state_dict
(self, state_dict)
codegeex/megatron/optimizer/optimizer.py:504
↓ 3 callersFunctionparam_is_not_shared
(param)
codegeex/megatron/model/module.py:31
↓ 3 callersFunctionparam_is_not_tensor_parallel_duplicate
(param)
codegeex/megatron/mpu/layers.py:49
↓ 3 callersFunctionprint_split_stats
(name, index)
codegeex/megatron/data/prompt_dataset.py:122
↓ 3 callersFunctionpush_acc_space
(acc_len: int, text: str)
codegeex/mindspore/src/code_tokenizer.py:15
↓ 3 callersFunctionread_dataset
( data_file: str = None, dataset_type: str = "humaneval", num_shot=None, )
codegeex/benchmark/utils.py:51
↓ 3 callersFunctionreduce_from_tensor_model_parallel_region
(input_)
codegeex/megatron/mpu/mappings.py:155
↓ 3 callersFunctionsave_checkpoint_and_time
(iteration, model, optimizer, lr_scheduler)
codegeex/megatron/training.py:870
↓ 3 callersFunctionscaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
codegeex/megatron/model/utils.py:31
↓ 3 callersMethodset_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
codegeex/megatron/mpu/random.py:167
↓ 3 callersFunctionset_tensor_model_parallel_attributes
(tensor, is_parallel, dim, stride)
codegeex/megatron/mpu/layers.py:55
↓ 3 callersMethodstate_dict
(self)
codegeex/megatron/optimizer/optimizer.py:501
↓ 3 callersFunctionto_frac_z_axis
judge the format is fractal NZ Parameters ---------- ori_shape: list or tuple original shape of input ori_axis: list or
codegeex/mindspore/scripts/layer_norm.py:273
↓ 3 callersFunctionunwrap_model
(model, module_instances=(torchDDP))
codegeex/megatron/utils.py:34
↓ 2 callersFunction__best_fitting_dtype
(vocab_size=None)
codegeex/megatron/data/indexed_dataset.py:26
↓ 2 callersFunction__dynamic_template_api
(input_x, input_gamma, input_beta, output_y, output_mean, output_variance, begin_no
codegeex/mindspore/scripts/layer_norm.py:917
↓ 2 callersMethod__init__
(self, numel, dtype)
codegeex/megatron/model/distributed.py:27
↓ 2 callersMethod__init__
( self, hidden_size, vocab_size, max_sequence_length, embedding_dropou
codegeex/megatron/model/language_model.py:114
↓ 2 callersMethod__init__
(self, path)
codegeex/megatron/data/indexed_dataset.py:153
↓ 2 callersMethod__init__
(self, name)
codegeex/megatron/tokenizer/tokenizer.py:121
↓ 2 callersMethod__init__
( self, input_size, output_size, bias=True, input_is_parallel=False,
codegeex/megatron/mpu/layers.py:397
↓ 2 callersMethod__init__
( self, in_features: int, out_features: int, weight_bit_width: int,
codegeex/quantization/quantize.py:33
↓ 2 callersFunction_build_tokenizer
Initialize tokenizer.
codegeex/megatron/global_vars.py:117
↓ 2 callersFunction_build_train_valid_test_datasets
Build train, valid, and test datasets.
codegeex/megatron/data/prompt_dataset.py:96
↓ 2 callersFunction_division_sixteen
division_sixteen
codegeex/mindspore/scripts/layer_norm.py:97
↓ 2 callersMethod_do_init
(self, path, skip_warmup)
codegeex/megatron/data/indexed_dataset.py:480
↓ 2 callersMethod_get_layer
(self, layer_number)
codegeex/megatron/model/transformer.py:950
↓ 2 callersMethod_get_model_and_main_params_data_float16
(self)
codegeex/megatron/optimizer/optimizer.py:332
↓ 2 callersFunction_multi_tensor_copy_this_to_that
Use multi-tensor-applier to copy values from one list to another. We don't have a blfoat16 implementation so for now if the overflow_buf is no
codegeex/megatron/optimizer/optimizer.py:48
↓ 2 callersFunction_pack_int8_to_int4
(x)
codegeex/quantization/quantize_oneflow.py:5
↓ 2 callersFunction_update_gamma_shape
update shape_gamma for subsequent calculation Parameters ---------- shape_x: list or tuple shape of x shape_gamma: list
codegeex/mindspore/scripts/layer_norm_x_backprop_v2.py:366
↓ 2 callersFunction_vocab_size_with_padding
Pad vocab size so it is divisible by model parallel size and still having GPU friendly size.
codegeex/megatron/tokenizer/tokenizer.py:98
↓ 2 callersFunctionallocate_mem_buff
Allocate a memory buffer.
codegeex/megatron/memory.py:24
↓ 2 callersMethodbackward
(ctx, *args)
codegeex/megatron/mpu/random.py:298
↓ 2 callersFunctionbackward_step_helper
Helper method to run backward step with model split into chunks (run set_virtual_pipeline_model_parallel_rank() before calling backwar
codegeex/megatron/schedules.py:247
↓ 2 callersFunctionbuild_train_valid_test_data_iterators
(build_train_valid_test_datasets_provider)
codegeex/megatron/training.py:1220
↓ 2 callersMethodcheck_index
(self, i)
codegeex/megatron/data/indexed_dataset.py:180
↓ 2 callersFunctioncleanup_code
Cleans up the generated code.
codegeex/benchmark/utils.py:151
↓ 2 callersMethodclip_grad_norm
(self, clip_grad)
codegeex/megatron/optimizer/optimizer.py:81
↓ 2 callersMethodclone_param32
Clone the parameters in ParameterTuple element-wisely to generate a new ParameterTuple with float32 data type. Inputs: pr
codegeex/mindspore/src/adam.py:182
↓ 2 callersMethodclone_state
r""" parameter_tuple: ParameterTuple. The parameters of the network prefix: str. The prefix name of the parameters
codegeex/mindspore/src/utils.py:59
↓ 2 callersFunctioncode
(dtype)
codegeex/megatron/data/indexed_dataset.py:125
↓ 2 callersFunctioncompute_lm_loss
(losses: torch.Tensor, loss_mask: torch.Tensor)
codegeex/megatron/tools/finetune_codegeex.py:160
↓ 2 callersFunctionconversion_helper
Apply conversion to val. Recursively apply conversion if `val` #is a nested tuple/list structure.
codegeex/megatron/model/module.py:120
↓ 2 callersFunctioncopy_to_tensor_model_parallel_region
(input_)
codegeex/megatron/mpu/mappings.py:151
↓ 2 callersMethodcount_zeros
(self)
codegeex/megatron/optimizer/optimizer.py:85
↓ 2 callersFunctiondataset_partition_path_parsing
(data_path)
codegeex/megatron/tools/finetune_codegeex.py:236
↓ 2 callersMethoddecode
(self, tokens)
codegeex/megatron/tokenizer/gpt2_tokenization.py:321
↓ 2 callersFunctiondecode_whitespaces
Decode the whitespace-encoded strings produced by encode_whitespace. >>> text = 'a\\n b\\n c' >>> s, l = 10, 10 >>> text == decode_wh
codegeex/mindspore/src/code_tokenizer.py:43
↓ 2 callersMethodencode
(self, text)
codegeex/megatron/tokenizer/gpt2_tokenization.py:318
↓ 2 callersFunctionencode_whitespaces
Encode whitespaces to extra tokens in GPT-J. >>> encode_whitespaces('a\\n b\\n c', 10, 10) 'a\\n<|extratoken_10|>b\\n<|extratoken_11|>c'
codegeex/mindspore/src/code_tokenizer.py:8
↓ 2 callersFunctionensure_divisibility
Ensure that numerator is divisible by the denominator.
codegeex/megatron/mpu/utils.py:20
↓ 2 callersFunctionevaluate
Evaluation.
codegeex/megatron/training.py:1022
↓ 2 callersFunctionexpand_beams
(beams: List[Beam], num_beams: int, model)
codegeex/megatron/code_generation_utils.py:632
↓ 2 callersMethodforward
(self, input_ids, position_ids, tokentype_ids=None)
codegeex/megatron/model/language_model.py:180
↓ 2 callersFunctionforward_step
( model, tokens, position_ids, attention_mask, tokentype_ids,
codegeex/megatron/code_generation_utils.py:801
↓ 2 callersFunctionforward_step_helper
Helper method to run forward step with model split into chunks (run set_virtual_pipeline_model_parallel_rank() before calling forward_
codegeex/megatron/schedules.py:223
↓ 2 callersFunctiongather_from_tensor_model_parallel_region
(input_)
codegeex/megatron/mpu/mappings.py:163
↓ 2 callersFunctionget_adlr_autoresume
ADLR autoresume object. It can be None so no need to check if it is initialized.
codegeex/megatron/global_vars.py:66
↓ 2 callersFunctionget_batch
Generate batch from context tokens.
codegeex/megatron/code_generation_utils.py:35
↓ 2 callersFunctionget_batch
Generate a batch
codegeex/megatron/tools/finetune_codegeex.py:88
↓ 2 callersFunctionget_batch_
Generate batch from context tokens.
codegeex/megatron/code_generation_utils.py:56
↓ 2 callersFunctionget_bias_dropout_add
(training)
codegeex/megatron/model/transformer.py:554
↓ 2 callersFunctionget_code_data
(code_data_path, split, args_opt, process_fn=None, skip_num=0)
codegeex/mindspore/src/dataset_finetune.py:165
↓ 2 callersFunctionget_data_parallel_group
Get the data parallel group the caller rank belongs to.
codegeex/megatron/mpu/initialize.py:217
↓ 2 callersMethodget_lr
Learning rate decay functions from: https://openreview.net/pdf?id=BJYwwY9ll pg. 4
codegeex/megatron/learning_rates.py:70
↓ 2 callersFunctionget_model
Build the model.
codegeex/megatron/training.py:250
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
codegeex/megatron/tokenizer/gpt2_tokenization.py:81
↓ 2 callersMethodget_parameters
(self)
codegeex/megatron/optimizer/optimizer.py:74
↓ 2 callersFunctionget_pipeline_model_parallel_group
Get the pipeline model parallel group the caller rank belongs to.
codegeex/megatron/mpu/initialize.py:209
↓ 2 callersMethodget_start_end_idx
(self)
codegeex/megatron/data/data_samplers.py:102
↓ 2 callersFunctionget_tensor_model_parallel_src_rank
Calculate the global rank corresponding to the first local rank in the tensor model parallel group.
codegeex/megatron/mpu/initialize.py:345
← previousnext →101–200 of 1,098, ranked by callers