MCPcopy Create free account

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

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

↓ 1 callersFunctionsample_sequence_batch
( model, context_tokens, context_lengths, attention_mask, position_ids
codegeex/megatron/code_generation_utils.py:905
↓ 1 callersFunctionsample_sequence_batch
( model, tokenizer, context_tokens, context_lengths, attention_mask,
codegeex/oneflow/inference.py:217
↓ 1 callersFunctionsample_sequence_batch
( model, tokenizer, context_tokens, context_lengths, attention_mask,
codegeex/paddle/inference.py:217
↓ 1 callersFunctionsample_topk_tokens
(model, input_tokens, attention_mask, position_ids, context_leng
codegeex/megatron/code_generation_utils.py:579
↓ 1 callersFunctionsampler
(log_probs_revised, top_p, top_k_num, use_pynative=False, bad_words_index=[])
codegeex/mindspore/src/generate_humaneval.py:77
↓ 1 callersFunctionsampler
(log_probs_revised, top_p, top_k_num, use_pynative=False, bad_words_index=[])
codegeex/mindspore/src/generate_greedy.py:34
↓ 1 callersFunctionsampler
(log_probs_revised, top_p, top_k_num, use_pynative=False, bad_words_index=[])
codegeex/mindspore/src/generate_finetune.py:35
↓ 1 callersMethodscale_loss
Simple scaling.
codegeex/megatron/optimizer/optimizer.py:98
↓ 1 callersFunctionset_checkpoint_version
(value)
codegeex/megatron/checkpointing.py:31
↓ 1 callersFunctionset_global_variables
Set args, tokenizer, tensorboard-writer, adlr-autoresume, and timers.
codegeex/megatron/global_vars.py:78
↓ 1 callersFunctionset_parallel_context
r"""Set parallel context
codegeex/mindspore/train.py:104
↓ 1 callersFunctionset_parallel_context
r"""Set parallel context
codegeex/mindspore/save_8p_ckpt.py:61
↓ 1 callersFunctionset_parallel_context
r"""Set parallel context
codegeex/mindspore/finetune.py:102
↓ 1 callersFunctionset_parallel_context
r"""Set parallel context
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:111
↓ 1 callersFunctionset_pipeline_parallel_context
Set prarllel context in pipeline training process
codegeex/mindspore/train.py:487
↓ 1 callersFunctionset_random_seed
Set random seed for reproducability.
codegeex/megatron/inference.py:27
↓ 1 callersFunctionset_random_seed
(seed)
tests/test_inference_megatron.py:17
↓ 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 vocabula
codegeex/megatron/tokenizer/gpt2_tokenization.py:215
↓ 1 callersFunctionset_tensor_model_parallel_rank
Set tensor model parallel rank.
codegeex/megatron/mpu/initialize.py:264
↓ 1 callersFunctionset_tensor_model_parallel_world_size
Set the tensor model parallel size
codegeex/megatron/mpu/initialize.py:229
↓ 1 callersFunctionset_weight_decay
Set weight decay coefficient, zero for bias and layernorm, 1e-1 for rest
codegeex/mindspore/finetune.py:57
↓ 1 callersFunctionsetup_deepspeed_random_and_activation_checkpointing
Optional DeepSpeed Activation Checkpointing features. Gives access to partition activations, contiguous memory optimizations and cpu checkpoin
codegeex/megatron/initialize.py:171
↓ 1 callersFunctionsetup_model_and_optimizer
Setup model and optimizer.
codegeex/megatron/training.py:396
↓ 1 callersFunctionsliding_window
Generate a series of (prompt, code) pairs by sliding the window over the code.
codegeex/data/data_utils.py:104
↓ 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
codegeex/megatron/mpu/utils.py:34
↓ 1 callersFunctionsplit_tensor_into_1d_equal_chunks
Break a tensor into equal 1D chunks.
codegeex/megatron/mpu/random.py:112
↓ 1 callersMethodstep
Clip gradients (if needed) and step the base optimizer. Always return successful since there is no overflow.
codegeex/megatron/optimizer/optimizer.py:474
↓ 1 callersFunctionstream_jsonl_all
(filename: str)
codegeex/benchmark/evaluate_humaneval_x.py:85
↓ 1 callersFunctionstream_jsonl_all
(filename: str)
codegeex/benchmark/humaneval-x/evaluate_humaneval_x.py:85
↓ 1 callersFunctionswallow_io
()
codegeex/benchmark/execution.py:422
↓ 1 callersFunctionswitch
(val1, val2, boolean)
codegeex/torch/inference.py:212
↓ 1 callersFunctionswitch
(val1, val2, boolean)
codegeex/megatron/code_generation_utils.py:900
↓ 1 callersFunctionswitch
(val1, val2, boolean)
codegeex/oneflow/inference.py:212
↓ 1 callersFunctionswitch
(val1, val2, boolean)
codegeex/paddle/inference.py:212
↓ 1 callersMethodsyn_files
(self)
codegeex/mindspore/src/callbacks.py:183
↓ 1 callersMethodtokenize
Tokenize a string.
codegeex/megatron/tokenizer/gpt2_tokenization.py:271
↓ 1 callersFunctiontokenize_lambada
tokenize lambada dataset
codegeex/mindspore/src/preprocess.py:124
↓ 1 callersFunctiontokenize_openwebtext
tokenize openwebtext dataset
codegeex/mindspore/src/preprocess.py:87
↓ 1 callersFunctiontokenize_wiki
tokenize wikitext-2/wikitext-103 dataset
codegeex/mindspore/src/preprocess.py:107
↓ 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-the-
codegeex/torch/inference.py:87
↓ 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-the-
codegeex/oneflow/inference.py:87
↓ 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-the-
codegeex/paddle/inference.py:87
↓ 1 callersFunctiontopk_sampling
Samples from a multinomial distribution using the top-k sampling strategy. Args: logits: A tensor of shape (batch_size, vocab_size)
codegeex/megatron/code_generation_utils.py:550
↓ 1 callersFunctiontrain
Train the model function.
codegeex/megatron/training.py:882
↓ 1 callersFunctiontrain_step
Single training step.
codegeex/megatron/training.py:477
↓ 1 callersFunctiontraining_log
Log training information such as losses, timing, ....
codegeex/megatron/training.py:600
↓ 1 callersFunctiontransform_model_parallel
(restore_local_ckpt_file_list, train_strategy_file, save_path, using_fp16=False)
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:160
↓ 1 callersFunctiontransform_opt_shard
(restore_local_ckpt_file_list, train_strategy_file, save_path)
codegeex/mindspore/save_8p_ckpt.py:111
↓ 1 callersFunctiontruncate_text
Cleans up the generated code text.
codegeex/mindspore/src/generate_humaneval.py:49
↓ 1 callersMethodupdate
(self, consumed_samples, consistency_check)
codegeex/megatron/microbatches.py:99
↓ 1 callersMethodupdate
(self, consumed_samples, consistency_check)
codegeex/megatron/microbatches.py:159
↓ 1 callersMethodupdate
(self, found_inf)
codegeex/megatron/optimizer/grad_scaler.py:99
↓ 1 callersMethodupdate
Update list of ppl
codegeex/mindspore/src/metrics.py:45
↓ 1 callersFunctionupdate_shape_nz
function of updating Nz shape
codegeex/mindspore/scripts/layer_norm_x_backprop_v2.py:787
↓ 1 callersFunctionupdate_train_iters
(args)
codegeex/megatron/training.py:221
↓ 1 callersMethodvocab_range_from_global_vocab_size
(global_vocab_size, rank, world_size)
codegeex/megatron/mpu/utils.py:68
↓ 1 callersMethodvocab_range_from_per_partition_vocab_size
( per_partition_vocab_size, rank, world_size )
codegeex/megatron/mpu/utils.py:60
↓ 1 callersFunctionwrite_args_to_tensorboard
Write arguments to tensorboard.
codegeex/megatron/initialize.py:305
↓ 1 callersMethodwriter
(cls, path, dtype)
codegeex/megatron/data/indexed_dataset.py:361
↓ 1 callersMethodzero
Reset the buffer to zero.
codegeex/megatron/model/distributed.py:37
↓ 1 callersMethodzero_grad
Copied from torch.optim.optimizer
codegeex/megatron/optimizer/optimizer.py:464
↓ 1 callersMethodzero_grad_buffer
Set the grad buffer data to zero. Needs to be called at the beginning of each iteration.
codegeex/megatron/model/distributed.py:175
FunctionCrossEntropy
(output, labels)
codegeex/megatron/model/codegeex_model.py:116
Method__call__
(self, name)
codegeex/megatron/global_vars.py:243
Method__del__
(self)
codegeex/megatron/data/indexed_dataset.py:184
Method__del__
(self)
codegeex/megatron/data/indexed_dataset.py:442
Method__del__
(self)
codegeex/megatron/data/indexed_dataset.py:494
Method__enter__
(self)
codegeex/megatron/data/indexed_dataset.py:363
Method__exit__
(self, exc_type, exc_val, exc_tb)
codegeex/megatron/data/indexed_dataset.py:401
Method__getitem__
(self, idx)
codegeex/megatron/data/blendable_dataset.py:66
Method__getitem__
(self, idx)
codegeex/megatron/data/prompt_dataset.py:234
Method__getitem__
(self, idx)
codegeex/megatron/data/indexed_dataset.py:189
Method__getitem__
(self, idx)
codegeex/megatron/data/indexed_dataset.py:268
Method__getitem__
(self, i)
codegeex/megatron/data/indexed_dataset.py:459
Method__getitem__
(self, idx)
codegeex/megatron/data/indexed_dataset.py:503
Method__getitem__
(self, idx)
codegeex/mindspore/src/sat_dataset.py:14
Method__getitem__
(self, idx)
codegeex/mindspore/src/sat_dataset.py:41
Method__getitem__
(self, idx)
codegeex/mindspore/src/sat_dataset.py:65
Method__getitem__
(self, index)
codegeex/mindspore/src/sat_dataset.py:103
Method__getitem__
(self, index)
codegeex/mindspore/src/sat_dataset.py:121
Method__getitem__
(self, idx)
codegeex/mindspore/src/sat_dataset.py:161
Method__getitem__
(self, index)
codegeex/mindspore/src/sat_dataset.py:188
Method__getitem__
(self, index)
codegeex/mindspore/src/sat_dataset.py:217
Method__getitem__
(self, idx)
codegeex/mindspore/src/sat_dataset.py:233
Method__getstate__
(self)
codegeex/megatron/data/indexed_dataset.py:474
Method__init__
( self, hidden_size, num_attention_heads, layer_number, fp16=True,
codegeex/torch/codegeex_model.py:58
Method__init__
( self, hidden_size, num_attention_heads, layer_number, fp16=True,
codegeex/torch/codegeex_model.py:234
Method__init__
( self, hidden_size, num_attention_heads, layer_number, layernorm_ep
codegeex/torch/codegeex_model.py:408
Method__init__
( self, hidden_size, num_attention_heads, layer_number, layernorm_eps
codegeex/torch/codegeex_model.py:486
Method__init__
( self, hidden_size, num_attention_heads, num_layers, layernorm_epsilo
codegeex/torch/codegeex_model.py:567
Method__init__
( self, hidden_size, vocab_size, max_sequence_length, )
codegeex/torch/codegeex_model.py:689
Method__init__
( self, hidden_size, vocab_size, max_sequence_length, )
codegeex/torch/codegeex_model.py:769
Method__init__
( self, hidden_size, num_layers, num_attention_heads, padded_vocab_siz
codegeex/torch/codegeex_model.py:835
Method__init__
( self, hidden_size, num_layers, num_attention_heads, padded_vocab_siz
codegeex/torch/codegeex_model.py:951
Method__init__
(self, name, numel, dtype, track_usage)
codegeex/megatron/memory.py:49
Method__init__
(self, name, num_buffers, numel, dtype, track_usage)
codegeex/megatron/memory.py:137
Method__init__
(self, name)
codegeex/megatron/global_vars.py:195
Method__init__
(self)
codegeex/megatron/global_vars.py:240
Method__init__
(self)
codegeex/megatron/microbatches.py:71
Method__init__
(self, global_batch_size, micro_batch_size, data_parallel_size)
codegeex/megatron/microbatches.py:87
← previousnext →501–600 of 1,098, ranked by callers