Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/IDEA-CCNL/Fengshenbang-LM
/ functions
Functions
2,547 in github.com/IDEA-CCNL/Fengshenbang-LM
⨍
Functions
2,547
◇
Types & classes
564
↳
Endpoints
10
↓ 345 callers
Method
size
(self, index)
fengshen/data/hubert/hubert_dataset.py:336
↓ 188 callers
Method
log
(self, *args, level=INFO)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:375
↓ 176 callers
Method
from_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
fengshen/models/zen1/ngram_utils.py:56
↓ 121 callers
Method
items
(self)
fengshen/models/auto/auto_factory.py:612
↓ 108 callers
Method
keys
(self)
fengshen/models/auto/auto_factory.py:587
↓ 78 callers
Method
write
(self, sizes, doc_idx)
fengshen/data/megatron_dataloader/indexed_dataset.py:372
↓ 64 callers
Method
get
(self, key, default)
fengshen/models/auto/auto_factory.py:595
↓ 47 callers
Method
exists
(path)
fengshen/data/megatron_dataloader/indexed_dataset.py:206
↓ 34 callers
Method
add_argparse_args
(parent_args)
fengshen/examples/pretrain_bert/pretrain_bert.py:212
↓ 31 callers
Method
fit
(self, train_data, dev_data,test_data=[])
fengshen/models/uniex/modeling_uniex.py:1917
↓ 30 callers
Method
eval
(self)
fengshen/models/llama/modeling_llama.py:262
↓ 29 callers
Function
_extract_into_tensor
Extract values from a 1-D numpy array for a batch of indices. :param arr: the 1-D numpy array. :param timesteps: a tensor of indices int
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:1303
↓ 27 callers
Method
update
(self, true_subject, pred_subject)
fengshen/metric/metric.py:69
↓ 25 callers
Method
size
(self, index)
fengshen/data/megatron_dataloader/indexed_dataset.py:202
↓ 24 callers
Method
convert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
fengshen/models/zen1/tokenization.py:135
↓ 23 callers
Method
__init__
(self, d_model)
fengshen/models/roformer/modeling_roformer.py:207
↓ 23 callers
Method
__init__
(self, config, output_attentions=False, keep_multihead_output=False)
fengshen/models/zen2/modeling.py:798
↓ 23 callers
Function
configure_optimizers
Args: pl_model: lightning module model_params: 需要优化的模型参数
fengshen/models/model_utils.py:50
↓ 23 callers
Method
decode
Find the most likely tag sequence using Viterbi algorithm. Args: emissions (`~torch.Tensor`): Emission score tensor of size
fengshen/models/tagging_models/layers/crf.py:102
↓ 22 callers
Method
add_data_specific_args
(parent_args)
fengshen/examples/qa_t5/qa_dataset.py:33
↓ 21 callers
Method
__init__
(self, config, output_attentions=False, keep_multihead_output=False)
fengshen/models/zen1/modeling.py:605
↓ 21 callers
Method
batch_decode
This method forwards all its arguments to BertTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please refer to the docstring of
fengshen/models/clip/processing_taiyi_clip.py:97
↓ 21 callers
Method
generate
(self, input_text_prompts=['夕阳西下'], init_image=None, skip_s
fengshen/examples/disco_project/disco.py:536
↓ 20 callers
Function
add_module_args
(parent_args)
fengshen/models/model_utils.py:13
↓ 20 callers
Function
print_rank_0
If distributed is initialized, print only on rank 0.
fengshen/data/megatron_dataloader/utils.py:18
↓ 20 callers
Function
prune_linear_layer
Prune a linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_grad=True.
fengshen/models/zen1/modeling.py:63
↓ 19 callers
Method
__init__
(self, config)
fengshen/models/deberta_v2/modeling_deberta_v2.py:362
↓ 18 callers
Method
close
(self)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:390
↓ 17 callers
Method
__init__
(self, d_model)
fengshen/models/longformer/modeling_longformer.py:532
↓ 17 callers
Method
encode
(self, item, used_mask=False)
fengshen/models/unimc/modeling_unimc.py:139
↓ 16 callers
Method
load_state_dict
Loads the schedulers state. When saving or loading the scheduler, please make sure to also save or load the state of the optimizer.
fengshen/models/model_utils.py:162
↓ 15 callers
Function
get_entities
:param seq: :param id2label: :param markup: :return:
fengshen/metric/utils_ner.py:234
↓ 15 callers
Method
tokenize
Basic Tokenization of a piece of text. Split on "white spaces" only, for sub-word tokenization, see WordPieceTokenizer. Args:
fengshen/examples/pegasus/tokenizers_pegasus.py:429
↓ 14 callers
Method
__init__
(self, config, has_relative_attention_bias=False)
fengshen/models/megatron_t5/modeling_megatron_t5.py:669
↓ 14 callers
Function
conv_nd
Create a 1D, 2D, or 3D convolution module.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/nn.py:22
↓ 14 callers
Function
load_dataset
(num_proc=4, **kargs)
fengshen/data/bert_dataloader/load.py:104
↓ 13 callers
Method
__init__
(self, config)
fengshen/models/albert/modeling_albert.py:372
↓ 13 callers
Method
attention
( self, query_layer, key_layer, value_layer, layer_past, attention_mask, use_cache=False )
fengshen/models/megatron/layers/transformer.py:307
↓ 13 callers
Method
save
(self, ngram_freq_path)
fengshen/models/zen1/ngram_utils.py:103
↓ 12 callers
Function
auto_class_update
(cls, checkpoint_for_example="bert-base-cased", head_doc="")
fengshen/models/auto/auto_factory.py:485
↓ 11 callers
Method
__init__
(self, channels, use_conv, dims=2, out_channels=None)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/unet.py:93
↓ 11 callers
Method
keys
(self)
fengshen/models/auto/configuration_auto.py:96
↓ 11 callers
Method
state_dict
Returns the state of the scheduler as a :class:`dict`. It contains an entry for every variable in self.__dict__ which is not the opti
fengshen/models/model_utils.py:142
↓ 10 callers
Method
add_argparse_args
(parent_args)
fengshen/utils/universal_checkpoint.py:7
↓ 10 callers
Function
chinese_char_tokenize
(line)
fengshen/utils/utils.py:44
↓ 10 callers
Method
encode
(self, x, y)
fengshen/examples/finetune_bart_qg/finetune_bart.py:67
↓ 10 callers
Function
get_model_parallel_world_size
Return world size for the model parallel group.
fengshen/models/megatron/mpu/initialize.py:201
↓ 9 callers
Method
__init__
(self, config: DeltalmConfig)
fengshen/models/deltalm/modeling_deltalm.py:1040
↓ 9 callers
Function
get_current
()
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:324
↓ 9 callers
Function
get_model_parallel_group
Get the model parallel group the caller rank belongs to.
fengshen/models/megatron/mpu/initialize.py:177
↓ 9 callers
Function
get_total_steps
(trainer, hparams)
fengshen/models/model_utils.py:194
↓ 9 callers
Method
result
(self)
fengshen/metric/metric.py:51
↓ 8 callers
Method
convert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens. A
fengshen/examples/pegasus/tokenizers_pegasus.py:248
↓ 8 callers
Function
exists
(x)
fengshen/models/megatron/layers/utils.py:65
↓ 8 callers
Method
load_dataset
(self, split: str, **kwargs)
fengshen/examples/hubert/pretrain_hubert.py:55
↓ 8 callers
Method
predict
(self, ids, mask, token_type_ids)
fengshen/examples/clue_sim/finetune_clue_sim.py:271
↓ 7 callers
Method
__init__
(self, input_size, output_size)
fengshen/models/uniex/modeling_uniex.py:876
↓ 7 callers
Method
_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
fengshen/models/deltalm/modeling_deltalm.py:137
↓ 7 callers
Function
data_file_path
(prefix_path)
fengshen/data/megatron_dataloader/indexed_dataset.py:118
↓ 7 callers
Function
get_model_parallel_rank
Return my rank for the model parallel group.
fengshen/models/megatron/mpu/initialize.py:215
↓ 7 callers
Method
items
(self)
fengshen/models/auto/configuration_auto.py:102
↓ 7 callers
Function
normalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/nn.py:93
↓ 7 callers
Method
p_mean_variance
Apply the model to get p(x_{t-1} | x_t), as well as a prediction of the initial x, x_0. :param model: the model, which takes
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:224
↓ 7 callers
Method
reset
(self)
fengshen/metric/metric.py:40
↓ 7 callers
Method
resize_token_embeddings
(self, new_num_tokens: int)
fengshen/models/bart/modeling_bart.py:132
↓ 7 callers
Method
transpose_for_scores
(self, x, attention_heads)
fengshen/models/deberta_v2/modeling_deberta_v2.py:639
↓ 7 callers
Method
transpose_for_scores
(self, x)
fengshen/models/roformer/modeling_roformer.py:261
↓ 6 callers
Method
_initialize
(self)
fengshen/models/auto/configuration_auto.py:137
↓ 6 callers
Method
_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:332
↓ 6 callers
Method
convert_ids_to_tokens
Converts a sequence of ids in wordpiece tokens using the vocab.
fengshen/models/zen1/tokenization.py:148
↓ 6 callers
Method
from_pretrained
(self, vocab_path)
fengshen/models/megatron_t5/tokenization_megatron_t5.py:25
↓ 6 callers
Function
get_fp32_allreduce
Get the fp32 allreduce flag
fengshen/models/megatron/mpu/initialize.py:297
↓ 6 callers
Function
get_init_params_in_cuda
()
fengshen/models/megatron/mpu/initialize.py:53
↓ 6 callers
Function
index_file_path
(prefix_path)
fengshen/data/megatron_dataloader/indexed_dataset.py:114
↓ 6 callers
Function
log
Write the sequence of args, with no separators, to the console and output files (if you've configured an output file).
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:246
↓ 6 callers
Method
logkv_mean
(self, key, val)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/logger.py:349
↓ 6 callers
Function
mean_flat
Take the mean over all non-batch dimensions.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/nn.py:86
↓ 6 callers
Method
sample
Importance-sample timesteps for a batch. :param batch_size: the number of timesteps. :param device: the torch device to save
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/resample.py:42
↓ 6 callers
Method
train
(self, train_data, dev_data, prompt, prompt_label)
fengshen/pipelines/tcbert.py:77
↓ 6 callers
Method
values
(self)
fengshen/models/auto/auto_factory.py:604
↓ 5 callers
Method
__init__
(self, in_size, out_size, bias_x=True, bias_y=True)
fengshen/models/ubert/modeling_ubert.py:220
↓ 5 callers
Method
__init__
(self, hidden_size, output_dropout_prob, init_method, output_layer_init_method=None)
fengshen/models/DAVAE/GPT2ModelForLatent.py:277
↓ 5 callers
Method
__init__
(self, hidden_size, output_dropout_prob, init_method, output_layer_init_method=None)
fengshen/models/transfo_xl_denoise/modeling_transfo_xl_denoise.py:364
↓ 5 callers
Function
_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
fengshen/examples/pegasus/data_utils.py:24
↓ 5 callers
Method
_load_attr_from_module
(self, model_type, attr)
fengshen/models/auto/auto_factory.py:580
↓ 5 callers
Method
_predict_xstart_from_eps
(self, x_t, t, eps)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:320
↓ 5 callers
Method
add_data_specific_args
(parent_args)
fengshen/data/bert_dataloader/load.py:135
↓ 5 callers
Method
compute
(self, origin, found, right)
fengshen/metric/metric.py:45
↓ 5 callers
Method
convert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
fengshen/examples/pegasus/tokenizers_pegasus.py:279
↓ 5 callers
Method
deparallelize
(self)
fengshen/models/megatron_t5/modeling_megatron_t5.py:1020
↓ 5 callers
Function
divide
Ensure that numerator is divisible by the denominator and return the division value.
fengshen/models/megatron/mpu/utils.py:29
↓ 5 callers
Method
encode
(self, item,is_predict=False)
fengshen/models/uniex/modeling_uniex.py:559
↓ 5 callers
Method
extract_entity
(self, text, entity_idx, text_start_id, offset_mapping)
fengshen/models/uniex/modeling_uniex.py:1234
↓ 5 callers
Method
extract_entity
(self, text,entity_idx,text_start_id,offset_mapping)
fengshen/models/uniex/modeling_uniex.py:1558
↓ 5 callers
Method
get_image_features
r""" Returns: image_features (`torch.FloatTensor` of shape `(batch_size, output_dim`): The image embeddings obtained by
fengshen/models/clip/modeling_taiyi_clip.py:114
↓ 5 callers
Function
linear
Create a linear module.
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/nn.py:35
↓ 5 callers
Method
parallelize
(self, device_map=None)
fengshen/models/megatron_t5/modeling_megatron_t5.py:995
↓ 5 callers
Method
process_relation_choice
(self, choice)
fengshen/models/uniex/modeling_uniex.py:388
↓ 5 callers
Method
q_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:204
↓ 5 callers
Method
q_sample
Diffuse the data for a given number of diffusion steps. In other words, sample from q(x_t | x_0). :param x_start: the initi
fengshen/examples/disco_project/guided_diffusion/guided_diffusion/gaussian_diffusion.py:186
next →
1–100 of 2,547, ranked by callers