MCPcopy Create free account

hub / github.com/IDEA-CCNL/Fengshenbang-LM / functions

Functions2,547 in github.com/IDEA-CCNL/Fengshenbang-LM

↓ 3 callersFunctionsave_data
(data,file_path)
fengshen/examples/clue1.1/data_preprocessing/c3_preprocessing.py:31
↓ 3 callersMethodset_tokenizers
(self,encoder_tokenizer,decoder_tokenizer)
fengshen/models/DAVAE/DAVAEModel.py:52
↓ 3 callersFunctionshift_tokens_right
Shift input ids one token to the right.
fengshen/models/deltalm/modeling_deltalm.py:42
↓ 3 callersMethodspan_gather
从表为 【seq_len,seq_len】 的 span_labels 提取 只需要计算 loss 的 token 的labels,提取之后,size ->【token_len, token_len】
fengshen/models/uniex/modeling_uniex.py:902
↓ 3 callersMethodtext_from_latent_code_batch
(self,latent_z, prompt=None)
fengshen/models/DAVAE/DAVAEModel.py:84
↓ 3 callersFunctiontext_segmentate
(text)
fengshen/examples/pegasus/data_utils.py:99
↓ 3 callersMethodtranspose_for_scores
(self, x)
fengshen/models/albert/modeling_albert.py:295
↓ 3 callersMethodtranspose_for_scores
(self, x)
fengshen/models/zen2/modeling.py:435
↓ 3 callersFunctiontruncate_sequence
(document: str, max_num_tokens: int, reverse=False)
fengshen/examples/finetune_bart_qg/utils.py:46
↓ 3 callersFunctionwhite_space_fix
(text)
fengshen/examples/finetune_bart_qg/utils.py:63
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
fengshen/examples/pegasus/tokenizers_pegasus.py:39
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
fengshen/models/zen1/tokenization.py:83
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
fengshen/models/zen2/tokenization.py:105
↓ 2 callersMethod__init__
(self, path)
fengshen/data/megatron_dataloader/indexed_dataset.py:134
↓ 2 callersMethod__init__
( self, clip_model_path="IDEA-CCNL/Taiyi-CLIP-RoBERTa-102M-ViT-L-Chin
fengshen/examples/finetune_taiyi_stable_diffusion/evaluate_model.py:88
↓ 2 callersMethod__init__
(self, args, id2label)
fengshen/examples/zen2_finetune/fengshen_token_level_ft_task.py:504
↓ 2 callersMethod__init__
(self, args)
fengshen/examples/zen2_finetune/fengshen_sequence_level_ft_task.py:525
↓ 2 callersMethod__init__
(self, cutom_path='IDEA-CCNL/Taiyi-Diffusion-532M-Nature')
fengshen/examples/disco_project/disco.py:499
↓ 2 callersMethod__init__
(self, args, id2label)
fengshen/examples/zen1_finetune/fengshen_token_level_ft_task.py:474
↓ 2 callersMethod__init__
(self, args)
fengshen/examples/zen1_finetune/fengshen_sequence_level_ft_task.py:486
↓ 2 callersMethod__init__
(self, num_heads, mp_size=1, mp_rank=1)
fengshen/models/megatron/layers/positional_embeddings.py:91
↓ 2 callersMethod__init__
( self, config, init_method, output_layer_init_method, layer_number,
fengshen/models/megatron/layers/gmlp.py:92
↓ 2 callersMethod__init__
(self, config, latent_dim=32)
fengshen/models/deepVAE/latent_connector.py:43
↓ 2 callersMethod_add_eos_if_not_present
Do not add eos again if user already added it.
fengshen/models/deltalm/tokenizer_deltalm.py:192
↓ 2 callersFunction_build_train_valid_test_datasets
(data_prefix, data_impl, splits_string, train_valid_test_num_samples,
fengshen/data/megatron_dataloader/dataset_utils.py:567
↓ 2 callersMethod_chunk
convert into overlapping chunks. Chunk size = 2w, overlap size = w
fengshen/models/longformer/modeling_longformer.py:879
↓ 2 callersFunction_compute_global_attention_mask
Computes global attention mask by putting attention on all tokens before `sep_token_id` if `before_sep_token is True` else after `sep_token_i
fengshen/models/longformer/modeling_longformer.py:408
↓ 2 callersMethod_compute_norms
(self, grad_scale=1.0)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/fp16_util.py:216
↓ 2 callersMethod_create_examples
Creates examples for the training and dev sets.
fengshen/examples/zen2_finetune/fengshen_sequence_level_ft_task.py:127
↓ 2 callersMethod_create_examples
Creates examples for the training and dev sets.
fengshen/examples/zen1_finetune/fengshen_sequence_level_ft_task.py:124
↓ 2 callersMethod_do_init
(self, path, skip_warmup)
fengshen/data/megatron_dataloader/indexed_dataset.py:472
↓ 2 callersMethod_force_token_ids_generation
force one of token_ids to be generated by setting prob of all other tokens to 0
fengshen/models/bart/modeling_bart.py:303
↓ 2 callersFunction_get
(name)
fengshen/models/megatron/layers/init_functions.py:122
↓ 2 callersFunction_get_class_name
(model_class: Union[str, List[str]])
fengshen/models/auto/configuration_auto.py:182
↓ 2 callersFunction_get_model_class
(config, model_mapping)
fengshen/models/auto/auto_factory.py:359
↓ 2 callersMethod_init_weights
Initialize the weights
fengshen/models/zen1/modeling.py:545
↓ 2 callersFunction_is_punctuation
Checks whether `char` is a punctuation character.
fengshen/examples/pegasus/data_utils.py:70
↓ 2 callersMethod_run_strip_accents
Strips accents from a piece of text.
fengshen/examples/pegasus/tokenizers_pegasus.py:466
↓ 2 callersFunction_set_use_cache
Recursively sets an use_cache to `value` on a list of pytorch modules, if they have a use_cache attribute. use_cache is used to decide whethe
fengshen/models/megatron/layers/utils.py:179
↓ 2 callersMethod_shift_right
(self, input_ids)
fengshen/models/megatron_t5/modeling_megatron_t5.py:886
↓ 2 callersMethod_sliding_chunks_matmul_attn_probs_value
Same as _sliding_chunks_query_key_matmul but for attn_probs and value tensors. Returned tensor will be of the same shape as `attn_pro
fengshen/models/longformer/modeling_longformer.py:985
↓ 2 callersMethod_sliding_chunks_query_key_matmul
Matrix multiplication of query and key tensors using with a sliding window attention pattern. This implementation splits the input in
fengshen/models/longformer/modeling_longformer.py:915
↓ 2 callersFunction_tokens_length_to_inputs_length_targets_length
(tokens_length)
fengshen/data/t5_dataloader/t5_datasets.py:35
↓ 2 callersMethod_truncate
(self, s)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:79
↓ 2 callersMethod_validate
(self, emissions: torch.Tensor, tags: Optional[torch.LongTensor] = None, m
fengshen/models/tagging_models/layers/crf.py:138
↓ 2 callersFunction_warmup_mmap_file
(path)
fengshen/data/megatron_dataloader/indexed_dataset.py:338
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/zen2_finetune/fengshen_sequence_level_ft_task.py:578
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/classification/finetune_classification.py:301
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/wenzhong_qa/finetune_wenzhong.py:15
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/wenzhong_qa/finetune_medicalQA.py:19
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/zen1_finetune/fengshen_token_level_ft_task.py:574
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/zen1_finetune/fengshen_sequence_level_ft_task.py:539
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/mt5_summary/mt5_summary.py:57
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/examples/deepVAE/pretrain_deep_vae.py:88
↓ 2 callersMethodadd_argparse_args
(parent_args)
fengshen/models/ubert/modeling_ubert.py:408
↓ 2 callersFunctionadd_data_args
(parent_args)
fengshen/data/taiyi_stable_diffusion_datasets/taiyi_datasets.py:7
↓ 2 callersMethodadd_data_specific_args
(parent_args)
fengshen/examples/zen2_finetune/fengshen_token_level_ft_task.py:412
↓ 2 callersMethodadd_module_specific_args
(parent_parser)
fengshen/examples/pretrain_taiyi_clip/pretrain.py:67
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/losses.py:38
↓ 2 callersMethodcalculate_clip_score
(self, features1, features2)
fengshen/examples/finetune_taiyi_stable_diffusion/evaluate_model.py:156
↓ 2 callersMethodcheck_index
(self, i)
fengshen/data/megatron_dataloader/indexed_dataset.py:161
↓ 2 callersFunctioncode
(dtype)
fengshen/data/megatron_dataloader/indexed_dataset.py:107
↓ 2 callersMethodcollate_fn
Aggregate a batch data. batch = [ins1_dict, ins2_dict, ..., insN_dict] batch_data = {'sentence':[ins1_sentence, ins2_sentence
fengshen/models/uniex/modeling_uniex.py:741
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/qa_t5/finetune_t5_cmrc.py:288
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/pretrain_t5/pretrain_t5.py:97
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/zen2_finetune/fengshen_sequence_level_ft_task.py:553
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/pretrain_randeng_bart/pretrain_bart.py:218
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/classification/finetune_classification.py:272
↓ 2 callersMethodcomput_metrix
(self, logits, labels)
fengshen/examples/zen1_finetune/fengshen_sequence_level_ft_task.py:514
↓ 2 callersMethodcomput_metrix
(self, logits, labels, mlmlabels_mask)
fengshen/models/unimc/modeling_unimc.py:402
↓ 2 callersMethodcompute
(self, origin, found, right)
fengshen/metric/metric.py:86
↓ 2 callersFunctioncompute_bleu
(preditions, labels)
fengshen/examples/qa_t5/finetune_t5_cmrc.py:427
↓ 2 callersFunctioncompute_input_and_target_lengths
This function is copy of `random_spans_helper <https://github.com/google-research/ text-to-text-transfer-transformer/blob/84f8bcc14b5f2c03de51bd35
fengshen/data/t5_dataloader/t5_datasets.py:14
↓ 2 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See co
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:371
↓ 2 callersMethodcondition_score_with_grad
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See co
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:395
↓ 2 callersFunctionconfigure
If comm is provided, average all numerical stats across that comm
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:441
↓ 2 callersMethodconvert_to_fp16
Convert the torso of the model to float16.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/unet.py:620
↓ 2 callersFunctioncount_flops_attn
A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.pr
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/unet.py:310
↓ 2 callersFunctioncreatePath
(filepath)
fengshen/examples/disco_project/disco.py:120
↓ 2 callersMethodcreate_sentinel_ids
Sentinel ids creation given the indices that should be masked. The start indices of each mask are replaced by the sentinel ids in inc
fengshen/data/t5_dataloader/t5_datasets.py:324
↓ 2 callersFunctioncreate_tokens_and_tokentypes
Merge segments A and B, add [CLS] and [SEP] and build tokentypes.
fengshen/data/data_utils/token_type_utils.py:1
↓ 2 callersFunctiondetokenize
(token_ids)
fengshen/examples/ziya_llama/sample_test.py:53
↓ 2 callersMethoddetokenize
(self, token_ids)
fengshen/examples/pretrain_erlangshen_deberta_v2/pretrain_deberta.py:144
↓ 2 callersMethoddetokenize
(self, token_ids)
fengshen/examples/pretrain_erlangshen_bert/pretrain_erlangshen.py:154
↓ 2 callersFunctiondiffusion_defaults
Defaults for image and classifier training.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/script_util.py:11
↓ 2 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
fengshen/models/DAVAE/GPT2ModelForLatent.py:54
↓ 2 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
fengshen/models/transfo_xl_denoise/modeling_transfo_xl_denoise.py:132
↓ 2 callersFunctionen_to_zh
(sentence:str)
fengshen/models/transfo_xl_reasoning/generate.py:12
↓ 2 callersFunctionenforce_repetition_penalty
repetition penalty (from CTRL paper https://arxiv.org/abs/1909.05858).
fengshen/models/DAVAE/run_latent_generation.py:45
↓ 2 callersFunctionensure_divisibility
Ensure that numerator is divisible by the denominator.
fengshen/models/megatron/mpu/utils.py:22
↓ 2 callersMethodextract_entity
(self, text, entity_idx, text_start_id, text_mapping)
fengshen/models/ubert/modeling_ubert.py:513
↓ 2 callersMethodfile_check
(path, path_type)
fengshen/data/bert_dataloader/load.py:52
↓ 2 callersMethodfilter_input_ids
Puts sentinel mask on `input_ids` and fuse consecutive mask tokens into a single mask token by deleting. This will reduce the sequenc
fengshen/data/t5_dataloader/t5_datasets.py:342
↓ 2 callersFunctionfilter_noise
(text)
fengshen/models/DAVAE/run_latent_generation.py:16
↓ 2 callersMethodfit
(self, train_data, dev_data)
fengshen/models/ubert/modeling_ubert.py:720
↓ 2 callersMethodforward
(self, logits, labels, masked_lm_metric)
fengshen/metric/metric.py:14
↓ 2 callersMethodforward
(self, x)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/unet.py:102
↓ 2 callersMethodgather_features
(self, features)
fengshen/examples/pretrain_taiyi_clip/pretrain.py:115
↓ 2 callersFunctiongather_join
取出对应的text,然后拼接起来
fengshen/examples/pegasus/data_utils.py:168
↓ 2 callersFunctiongather_join_f1
(texts_token, idsx)
fengshen/examples/pegasus/data_utils.py:174
← previousnext →201–300 of 2,547, ranked by callers