Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/zai-org/CodeGeeX
/ functions
Functions
1,098 in github.com/zai-org/CodeGeeX
⨍
Functions
1,098
◇
Types & classes
154
↳
Endpoints
1
↓ 1 callers
Function
_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 callers
Function
_init_autoresume
Set autoresume start time.
codegeex/megatron/initialize.py:282
↓ 1 callers
Function
_initialize_distributed
Initialize torch.distributed and mpu.
codegeex/megatron/initialize.py:209
↓ 1 callers
Function
_initialize_mem_buffs
Initialize manually allocated static memory.
codegeex/megatron/initialize.py:331
↓ 1 callers
Method
_load_dict
(self, dict_file: str)
codegeex/mindspore/src/code_tokenizer.py:94
↓ 1 callers
Method
_make_param_hook
Create the all-reduce hook for backprop.
codegeex/megatron/model/distributed.py:162
↓ 1 callers
Function
_num_epochs
Calculate the epoch needed for so many sample.
codegeex/megatron/data/prompt_dataset.py:314
↓ 1 callers
Method
_pad_to_vocab_size
(self, vocab_size: int)
codegeex/mindspore/src/code_tokenizer.py:87
↓ 1 callers
Function
_parse_args
Parse entire arguments.
codegeex/megatron/global_vars.py:95
↓ 1 callers
Function
_print_args
Print arguments.
codegeex/megatron/arguments.py:302
↓ 1 callers
Function
_quantize
(num_bits, symmetric, x, group_dim, group_size, quant_type)
codegeex/quantization/quantize_oneflow.py:16
↓ 1 callers
Function
_set_adlr_autoresume
Initialize ADLR autoresume.
codegeex/megatron/global_vars.py:157
↓ 1 callers
Function
_set_random_seed
Set random seed for reproducability.
codegeex/megatron/initialize.py:291
↓ 1 callers
Function
_set_tensorboard_writer
Set tensorboard writer.
codegeex/megatron/global_vars.py:131
↓ 1 callers
Function
_set_timers
Initialize timers.
codegeex/megatron/global_vars.py:175
↓ 1 callers
Method
_unscale_main_grads_and_check_for_nan
(self)
codegeex/megatron/optimizer/optimizer.py:303
↓ 1 callers
Function
_warmup_mmap_file
(path)
codegeex/megatron/data/indexed_dataset.py:350
↓ 1 callers
Function
add_checkpoint_callback_policy
r""" Add checkpoint policy to callback.
codegeex/mindspore/train.py:74
↓ 1 callers
Function
add_checkpoint_callback_policy
r""" Add checkpoint policy to callback.
codegeex/mindspore/finetune.py:72
↓ 1 callers
Function
add_code_generation_args
(parser)
tests/test_inference_paddle.py:41
↓ 1 callers
Function
add_code_generation_args
(parser)
tests/test_inference.py:26
↓ 1 callers
Function
add_code_generation_args
(parser)
tests/test_inference_oneflow.py:31
↓ 1 callers
Function
add_code_generation_args
(parser)
deployment/server_gradio.py:27
↓ 1 callers
Function
add_inference_params
Add inference params
codegeex/mindspore/src/utils.py:278
↓ 1 callers
Method
add_item
(self, tensor)
codegeex/megatron/data/indexed_dataset.py:305
↓ 1 callers
Function
add_retrain_params
Add parameters about retrain.
codegeex/mindspore/src/utils.py:419
↓ 1 callers
Function
add_training_params
Add training params
codegeex/mindspore/src/utils.py:315
↓ 1 callers
Method
allreduce_gradients
Reduce gradients across data parallel ranks.
codegeex/megatron/model/distributed.py:182
↓ 1 callers
Function
beam_search
Beam search. Note that this function does not support model parallel!
codegeex/megatron/code_generation_utils.py:661
↓ 1 callers
Method
bpe
(self, token)
codegeex/megatron/tokenizer/gpt2_tokenization.py:230
↓ 1 callers
Function
build_hgf_tokenizer
Initialize tokenizer.
codegeex/megatron/tokenizer/tokenizer.py:52
↓ 1 callers
Function
build_num_microbatches_calculator
(args)
codegeex/megatron/microbatches.py:22
↓ 1 callers
Function
build_tokenizer
Initialize tokenizer.
codegeex/megatron/tokenizer/tokenizer.py:71
↓ 1 callers
Function
bytes_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 callers
Function
calc_params_l2_norm
Calculate l2 norm of parameters
codegeex/megatron/utils.py:49
↓ 1 callers
Function
chdir
(root)
codegeex/benchmark/execution.py:463
↓ 1 callers
Function
check_adlr_autoresume_termination
Check for autoresume signal and exit if it is received.
codegeex/megatron/utils.py:127
↓ 1 callers
Function
check_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 callers
Function
check_exception_checkpoints
Checkpoint exception checkpoints size. Args: ckpt_file_list: exception checkpoints Returns: result of exception checkpoints size
codegeex/mindspore/train.py:408
↓ 1 callers
Function
clean_wikitext
cleaning wikitext dataset
codegeex/mindspore/src/preprocess.py:53
↓ 1 callers
Method
clear
Clear the internal evaluation result.
codegeex/mindspore/src/metrics.py:77
↓ 1 callers
Function
clip_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 callers
Method
convert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
codegeex/megatron/tokenizer/gpt2_tokenization.py:282
↓ 1 callers
Function
count_zeros_fp32
(parameters)
codegeex/megatron/optimizer/clip_grads.py:126
↓ 1 callers
Function
create_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 callers
Function
create_tempdir
()
codegeex/benchmark/execution.py:431
↓ 1 callers
Method
decode_tokens
(self, tokens)
codegeex/mindspore/src/code_tokenizer.py:126
↓ 1 callers
Function
decode_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 callers
Function
decode_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 callers
Method
derived
(self, new_token: int, log_prob: float)
codegeex/megatron/code_generation_utils.py:737
↓ 1 callers
Function
download_ckpt
(args_opt, file_num, rank_num, rank_id)
codegeex/mindspore/save_8p_ckpt.py:78
↓ 1 callers
Function
download_ckpt
(args_opt, file_num, rank_num, rank_id)
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:128
↓ 1 callers
Function
encode_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 callers
Function
encode_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 callers
Function
estimator
Calculates 1 - comb(n - c, k) / comb(n, k).
codegeex/benchmark/metric.py:36
↓ 1 callers
Function
evaluate_and_print_results_gold
Helper function to evaluate and dump results on screen.
codegeex/megatron/training.py:1157
↓ 1 callers
Function
evaluate_functional_correctness
( input_file: str = None, tmp_dir: str = "./", n_workers: int = 32, timeout: f
codegeex/benchmark/evaluate_humaneval_x.py:99
↓ 1 callers
Function
expand_handles
(handles: List[Handle], temperature: float, top_p: float, top_k: int, model)
codegeex/megatron/code_generation_utils.py:742
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation_batch.py:175
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation_humaneval.py:177
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/convertion_1p.py:188
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation.py:177
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation_values_1p.py:183
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation_finetune.py:178
↓ 1 callers
Function
export_mindir
Export mindir model
codegeex/mindspore/generation_1p.py:183
↓ 1 callers
Method
finalize
(self, index_file)
codegeex/megatron/data/indexed_dataset.py:335
↓ 1 callers
Function
finish_mpu_init
()
codegeex/megatron/initialize.py:71
↓ 1 callers
Function
fix_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 callers
Function
float16_to_fp32
Convert fp16/bf16 `val` to fp32
codegeex/megatron/model/module.py:145
↓ 1 callers
Function
flops_calculator
(model, args, iteration_time)
codegeex/megatron/utils.py:222
↓ 1 callers
Function
fp32_to_float16
Convert fp32 `val` to fp16/bf16
codegeex/megatron/model/module.py:131
↓ 1 callers
Function
gather_split_1d_tensor
Opposite of above function, gather values from model parallel ranks.
codegeex/megatron/mpu/random.py:121
↓ 1 callers
Function
gelu_impl
OpenAI's gelu implementation.
codegeex/megatron/model/utils.py:62
↓ 1 callers
Method
generateCode
生成代码。 @param prompt 待补全的代码
api/codegeex-api-example-java/src/main/java/cn/aminer/codegeex/example/CodeGenerationExample.java:35
↓ 1 callers
Function
generate_prompt_samples
( dataset: Iterable[Dict], language: str = None, mode: str = "pretrain", )
codegeex/data/process_pretrain_dataset.py:72
↓ 1 callers
Function
generate_samples_unconditional
(model)
codegeex/megatron/code_generation_utils.py:487
↓ 1 callers
Method
get
(self)
codegeex/megatron/microbatches.py:75
↓ 1 callers
Function
get_batch
Generate batch from context tokens.
codegeex/torch/inference.py:67
↓ 1 callers
Function
get_batch
Generate a batch
codegeex/megatron/tools/pretrain_codegeex.py:89
↓ 1 callers
Function
get_batch
Generate batch from context tokens.
codegeex/oneflow/inference.py:67
↓ 1 callers
Function
get_batch
Generate batch from context tokens.
codegeex/paddle/inference.py:67
↓ 1 callers
Function
get_change_ckpt_args
Provide extra arguments required for merging.
codegeex/megatron/convert_ckpt_parallel.py:8
↓ 1 callers
Function
get_code_data_eval
(code_data_path, args_opt, process_fn=None, scale=1)
codegeex/mindspore/src/dataset.py:201
↓ 1 callers
Function
get_code_data_train
(code_data_path, args_opt, process_fn=None, scale=1, skip_num=0)
codegeex/mindspore/src/dataset.py:173
↓ 1 callers
Function
get_current_global_batch_size
()
codegeex/megatron/global_vars.py:46
↓ 1 callers
Method
get_current_global_batch_size
(self)
codegeex/megatron/microbatches.py:78
↓ 1 callers
Function
get_data_parallel_rank
Return my rank for the data parallel group.
codegeex/megatron/mpu/initialize.py:391
↓ 1 callers
Function
get_datasets_weights_and_num_samples
(data_prefix, train_valid_test_num_samples)
codegeex/megatron/data/dataset_utils.py:33
↓ 1 callers
Function
get_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 callers
Function
get_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 callers
Function
get_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 callers
Function
get_language_model
Build language model and return along with the key to save.
codegeex/megatron/model/language_model.py:73
↓ 1 callers
Function
get_learning_rate_scheduler
Build the learning rate scheduler.
codegeex/megatron/training.py:353
↓ 1 callers
Method
get_loss_scale
The output should be a cuda tensor of size 1.
codegeex/megatron/optimizer/optimizer.py:94
↓ 1 callers
Function
get_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/torch/inference.py:12
↓ 1 callers
Function
get_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/oneflow/inference.py:12
↓ 1 callers
Function
get_ltor_masks_and_position_ids
Build masks and position id for left to right model.
codegeex/paddle/inference.py:12
↓ 1 callers
Function
get_megatron_optimizer
(model)
codegeex/megatron/optimizer/__init__.py:58
↓ 1 callers
Function
get_needed_model_parallel_list
(train_strategy_file, self_rank)
codegeex/mindspore/save_1p_ckpt_from_8p_ckpt.py:147
↓ 1 callers
Function
get_needed_opt_shard_list
(train_strategy_file, self_rank)
codegeex/mindspore/save_8p_ckpt.py:95
← previous
next →
301–400 of 1,098, ranked by callers