MCPcopy Create free account

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

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

↓ 1 callersFunction_get_res_nz
compute pd_x, pd_gamma, pd_beta according to data, params and shape_x
codegeex/mindspore/scripts/layer_norm_x_backprop_v2.py:951
↓ 1 callersFunction_init_autoresume
Set autoresume start time.
codegeex/megatron/initialize.py:282
↓ 1 callersFunction_initialize_distributed
Initialize torch.distributed and mpu.
codegeex/megatron/initialize.py:209
↓ 1 callersFunction_initialize_mem_buffs
Initialize manually allocated static memory.
codegeex/megatron/initialize.py:331
↓ 1 callersMethod_load_dict
(self, dict_file: str)
codegeex/mindspore/src/code_tokenizer.py:94
↓ 1 callersMethod_make_param_hook
Create the all-reduce hook for backprop.
codegeex/megatron/model/distributed.py:162
↓ 1 callersFunction_num_epochs
Calculate the epoch needed for so many sample.
codegeex/megatron/data/prompt_dataset.py:314
↓ 1 callersMethod_pad_to_vocab_size
(self, vocab_size: int)
codegeex/mindspore/src/code_tokenizer.py:87
↓ 1 callersFunction_parse_args
Parse entire arguments.
codegeex/megatron/global_vars.py:95
↓ 1 callersFunction_print_args
Print arguments.
codegeex/megatron/arguments.py:302
↓ 1 callersFunction_quantize
(num_bits, symmetric, x, group_dim, group_size, quant_type)
codegeex/quantization/quantize_oneflow.py:16
↓ 1 callersFunction_set_adlr_autoresume
Initialize ADLR autoresume.
codegeex/megatron/global_vars.py:157
↓ 1 callersFunction_set_random_seed
Set random seed for reproducability.
codegeex/megatron/initialize.py:291
↓ 1 callersFunction_set_tensorboard_writer
Set tensorboard writer.
codegeex/megatron/global_vars.py:131
↓ 1 callersFunction_set_timers
Initialize timers.
codegeex/megatron/global_vars.py:175
↓ 1 callersMethod_unscale_main_grads_and_check_for_nan
(self)
codegeex/megatron/optimizer/optimizer.py:303
↓ 1 callersFunction_warmup_mmap_file
(path)
codegeex/megatron/data/indexed_dataset.py:350
↓ 1 callersFunctionadd_checkpoint_callback_policy
r""" Add checkpoint policy to callback.
codegeex/mindspore/train.py:74
↓ 1 callersFunctionadd_checkpoint_callback_policy
r""" Add checkpoint policy to callback.
codegeex/mindspore/finetune.py:72
↓ 1 callersFunctionadd_code_generation_args
(parser)
tests/test_inference_paddle.py:41
↓ 1 callersFunctionadd_code_generation_args
(parser)
tests/test_inference.py:26
↓ 1 callersFunctionadd_code_generation_args
(parser)
tests/test_inference_oneflow.py:31
↓ 1 callersFunctionadd_code_generation_args
(parser)
deployment/server_gradio.py:27
↓ 1 callersFunctionadd_inference_params
Add inference params
codegeex/mindspore/src/utils.py:278
↓ 1 callersMethodadd_item
(self, tensor)
codegeex/megatron/data/indexed_dataset.py:305
↓ 1 callersFunctionadd_retrain_params
Add parameters about retrain.
codegeex/mindspore/src/utils.py:419
↓ 1 callersFunctionadd_training_params
Add training params
codegeex/mindspore/src/utils.py:315
↓ 1 callersMethodallreduce_gradients
Reduce gradients across data parallel ranks.
codegeex/megatron/model/distributed.py:182
↓ 1 callersFunctionbeam_search
Beam search. Note that this function does not support model parallel!
codegeex/megatron/code_generation_utils.py:661
↓ 1 callersMethodbpe
(self, token)
codegeex/megatron/tokenizer/gpt2_tokenization.py:230
↓ 1 callersFunctionbuild_hgf_tokenizer
Initialize tokenizer.
codegeex/megatron/tokenizer/tokenizer.py:52
↓ 1 callersFunctionbuild_num_microbatches_calculator
(args)
codegeex/megatron/microbatches.py:22
↓ 1 callersFunctionbuild_tokenizer
Initialize tokenizer.
codegeex/megatron/tokenizer/tokenizer.py:71
↓ 1 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
codegeex/megatron/tokenizer/gpt2_tokenization.py:54
↓ 1 callersFunctioncalc_params_l2_norm
Calculate l2 norm of parameters
codegeex/megatron/utils.py:49
↓ 1 callersFunctionchdir
(root)
codegeex/benchmark/execution.py:463
↓ 1 callersFunctioncheck_adlr_autoresume_termination
Check for autoresume signal and exit if it is received.
codegeex/megatron/utils.py:127
↓ 1 callersFunctioncheck_checkpoint_args
Ensure fixed arguments for a model are the same for the input arguments and the one retrieved from checkpoint.
codegeex/megatron/checkpointing.py:43
↓ 1 callersFunctioncheck_exception_checkpoints
Checkpoint exception checkpoints size. Args: ckpt_file_list: exception checkpoints Returns: result of exception checkpoints size
codegeex/mindspore/train.py:408
↓ 1 callersFunctionclean_wikitext
cleaning wikitext dataset
codegeex/mindspore/src/preprocess.py:53
↓ 1 callersMethodclear
Clear the internal evaluation result.
codegeex/mindspore/src/metrics.py:77
↓ 1 callersFunctionclip_grad_norm_fp32
Clips gradient norm of an iterable of parameters whose gradients are in fp32. This is adapted from torch.nn.utils.clip_grad.clip_grad_norm
codegeex/megatron/optimizer/clip_grads.py:29
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
codegeex/megatron/tokenizer/gpt2_tokenization.py:282
↓ 1 callersFunctioncount_zeros_fp32
(parameters)
codegeex/megatron/optimizer/clip_grads.py:126
↓ 1 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_finetune.py:82
↓ 1 callersFunctioncreate_tempdir
()
codegeex/benchmark/execution.py:431
↓ 1 callersMethoddecode_tokens
(self, tokens)
codegeex/mindspore/src/code_tokenizer.py:126
↓ 1 callersFunctiondecode_whitespaces
Decode the whitespace-encoded strings produced by encode_whitespace. >>> text = 'a\\n b\\n c' >>> s, l = 10, 10 >>> text == decode_whi
codegeex/megatron/tokenizer/tokenizer.py:37
↓ 1 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/tokenizer/tokenizer.py:18
↓ 1 callersMethodderived
(self, new_token: int, log_prob: float)
codegeex/megatron/code_generation_utils.py:737
↓ 1 callersFunctiondownload_ckpt
(args_opt, file_num, rank_num, rank_id)
codegeex/mindspore/save_8p_ckpt.py:78
↓ 1 callersFunctiondownload_ckpt
(args_opt, file_num, rank_num, rank_id)
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:128
↓ 1 callersFunctionencode_whitespaces
Encode whitespaces to extra tokens. >>> encode_whitespaces('a\\n b\\n c', 10, 10) 'a\\n<|extratoken_10|>b\\n<|extratoken_11|>c'
codegeex/megatron/tokenizer/tokenizer.py:26
↓ 1 callersFunctionencode_whitespaces
Encode whitespaces to extra tokens. >>> encode_whitespaces('a\\n b\\n c', 10, 10) 'a\\n<|extratoken_10|>b\\n<|extratoken_11|>c'
codegeex/tokenizer/tokenizer.py:7
↓ 1 callersFunctionestimator
Calculates 1 - comb(n - c, k) / comb(n, k).
codegeex/benchmark/metric.py:36
↓ 1 callersFunctionevaluate_and_print_results_gold
Helper function to evaluate and dump results on screen.
codegeex/megatron/training.py:1157
↓ 1 callersFunctionevaluate_functional_correctness
( input_file: str = None, tmp_dir: str = "./", n_workers: int = 32, timeout: f
codegeex/benchmark/evaluate_humaneval_x.py:99
↓ 1 callersFunctionexpand_handles
(handles: List[Handle], temperature: float, top_p: float, top_k: int, model)
codegeex/megatron/code_generation_utils.py:742
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation_batch.py:175
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation_humaneval.py:177
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/convertion_1p.py:188
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation.py:177
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation_values_1p.py:183
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation_finetune.py:178
↓ 1 callersFunctionexport_mindir
Export mindir model
codegeex/mindspore/generation_1p.py:183
↓ 1 callersMethodfinalize
(self, index_file)
codegeex/megatron/data/indexed_dataset.py:335
↓ 1 callersFunctionfinish_mpu_init
()
codegeex/megatron/initialize.py:71
↓ 1 callersFunctionfix_query_key_value_ordering
Fix up query/key/value matrix ordering if checkpoint version is smaller than 2.0
codegeex/megatron/checkpointing.py:249
↓ 1 callersFunctionfloat16_to_fp32
Convert fp16/bf16 `val` to fp32
codegeex/megatron/model/module.py:145
↓ 1 callersFunctionflops_calculator
(model, args, iteration_time)
codegeex/megatron/utils.py:222
↓ 1 callersFunctionfp32_to_float16
Convert fp32 `val` to fp16/bf16
codegeex/megatron/model/module.py:131
↓ 1 callersFunctiongather_split_1d_tensor
Opposite of above function, gather values from model parallel ranks.
codegeex/megatron/mpu/random.py:121
↓ 1 callersFunctiongelu_impl
OpenAI's gelu implementation.
codegeex/megatron/model/utils.py:62
↓ 1 callersMethodgenerateCode
生成代码。 @param prompt 待补全的代码
api/codegeex-api-example-java/src/main/java/cn/aminer/codegeex/example/CodeGenerationExample.java:35
↓ 1 callersFunctiongenerate_prompt_samples
( dataset: Iterable[Dict], language: str = None, mode: str = "pretrain", )
codegeex/data/process_pretrain_dataset.py:72
↓ 1 callersFunctiongenerate_samples_unconditional
(model)
codegeex/megatron/code_generation_utils.py:487
↓ 1 callersMethodget
(self)
codegeex/megatron/microbatches.py:75
↓ 1 callersFunctionget_batch
Generate batch from context tokens.
codegeex/torch/inference.py:67
↓ 1 callersFunctionget_batch
Generate a batch
codegeex/megatron/tools/pretrain_codegeex.py:89
↓ 1 callersFunctionget_batch
Generate batch from context tokens.
codegeex/oneflow/inference.py:67
↓ 1 callersFunctionget_batch
Generate batch from context tokens.
codegeex/paddle/inference.py:67
↓ 1 callersFunctionget_change_ckpt_args
Provide extra arguments required for merging.
codegeex/megatron/convert_ckpt_parallel.py:8
↓ 1 callersFunctionget_code_data_eval
(code_data_path, args_opt, process_fn=None, scale=1)
codegeex/mindspore/src/dataset.py:201
↓ 1 callersFunctionget_code_data_train
(code_data_path, args_opt, process_fn=None, scale=1, skip_num=0)
codegeex/mindspore/src/dataset.py:173
↓ 1 callersFunctionget_current_global_batch_size
()
codegeex/megatron/global_vars.py:46
↓ 1 callersMethodget_current_global_batch_size
(self)
codegeex/megatron/microbatches.py:78
↓ 1 callersFunctionget_data_parallel_rank
Return my rank for the data parallel group.
codegeex/megatron/mpu/initialize.py:391
↓ 1 callersFunctionget_datasets_weights_and_num_samples
(data_prefix, train_valid_test_num_samples)
codegeex/megatron/data/dataset_utils.py:33
↓ 1 callersFunctionget_exception_checkpoints
Get exception checkpoint based on restore ranks Args: args_param: training model parameters Returns: exception checkpoint list
codegeex/mindspore/train.py:376
↓ 1 callersFunctionget_input_data_batch_slice_map
Generate position_id and attention_mask according to input_ids considering eod reset Inputs: input_ids: the input token ids e
codegeex/mindspore/src/dataset.py:35
↓ 1 callersFunctionget_input_data_batch_slice_map
Generate position_id and attention_mask according to input_ids considering eod reset Inputs: input_ids: the input token ids l
codegeex/mindspore/src/dataset_finetune.py:33
↓ 1 callersFunctionget_language_model
Build language model and return along with the key to save.
codegeex/megatron/model/language_model.py:73
↓ 1 callersFunctionget_learning_rate_scheduler
Build the learning rate scheduler.
codegeex/megatron/training.py:353
↓ 1 callersMethodget_loss_scale
The output should be a cuda tensor of size 1.
codegeex/megatron/optimizer/optimizer.py:94
↓ 1 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/torch/inference.py:12
↓ 1 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/oneflow/inference.py:12
↓ 1 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/paddle/inference.py:12
↓ 1 callersFunctionget_megatron_optimizer
(model)
codegeex/megatron/optimizer/__init__.py:58
↓ 1 callersFunctionget_needed_model_parallel_list
(train_strategy_file, self_rank)
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:147
↓ 1 callersFunctionget_needed_opt_shard_list
(train_strategy_file, self_rank)
codegeex/mindspore/save_8p_ckpt.py:95
← previousnext →301–400 of 1,098, ranked by callers