Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hzfinfdu/Diffusion-BERT
/ functions
Functions
340 in github.com/Hzfinfdu/Diffusion-BERT
⨍
Functions
340
◇
Types & classes
93
↳
Endpoints
3
Method
__init__
(self, config)
models/modeling_bert.py:1166
Method
__init__
(self, config)
models/modeling_bert.py:1301
Method
__init__
(self, config)
models/modeling_bert.py:1412
Method
__init__
(self, config)
models/modeling_bert.py:1517
Method
__init__
(self, config)
models/modeling_bert.py:1621
Method
__init__
(self, config)
models/modeling_bert.py:1719
Method
__init__
(self, config)
models/modeling_bert.py:1806
Method
__init__
(self, config)
models/modeling_roberta.py:73
Method
__init__
(self, config, position_embedding_type=None)
models/modeling_roberta.py:161
Method
__init__
(self, config)
models/modeling_roberta.py:289
Method
__init__
(self, config, position_embedding_type=None)
models/modeling_roberta.py:304
Method
__init__
(self, config)
models/modeling_roberta.py:354
Method
__init__
(self, config)
models/modeling_roberta.py:370
Method
__init__
(self, config)
models/modeling_roberta.py:472
Method
__init__
(self, config)
models/modeling_roberta.py:570
Method
__init__
(self, config, add_pooling_layer=True)
models/modeling_roberta.py:714
Method
__init__
(self, config)
models/modeling_roberta.py:888
Method
__init__
(self, config)
models/modeling_roberta.py:1040
Method
__init__
(self, config)
models/modeling_roberta.py:1137
Method
__init__
(self, config)
models/modeling_roberta.py:1171
Method
__init__
(self, config)
models/modeling_roberta.py:1271
Method
__init__
(self, config)
models/modeling_roberta.py:1365
Method
__init__
(self, config)
models/modeling_roberta.py:1445
Method
__init__
(self, config)
models/modeling_roberta.py:1475
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:204
Method
__init__
(self, config, position_embedding_type=None)
models/modeling_bert_new_timestep.py:265
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:392
Method
__init__
(self, config, position_embedding_type=None)
models/modeling_bert_new_timestep.py:406
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:455
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:470
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:583
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:683
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:698
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:715
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:735
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:745
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:755
Method
__init__
(self, config, add_pooling_layer=True)
models/modeling_bert_new_timestep.py:916
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1090
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1198
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1333
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1444
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1549
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1653
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1751
Method
__init__
(self, config)
models/modeling_bert_new_timestep.py:1838
Method
__repr__
(self)
diffusion_word_freq.py:29
Method
__repr__
(self)
diffusion_condition.py:29
Method
_convert_to_features_original
(example_batch, tokenizer)
dataloader.py:39
Method
_generate_examples
This function returns the examples in the raw (text) form.
conditional_data/Q-T/Q-T.py:32
Method
_generate_examples
This function returns the examples in the raw (text) form.
conditional_data/qqp/qqp.py:32
Method
_info
(self)
conditional_data/Q-T/Q-T.py:7
Method
_info
(self)
conditional_data/qqp/qqp.py:7
Method
_init_weights
Initialize the weights
models/modeling_bert.py:747
Method
_init_weights
Initialize the weights
models/modeling_roberta.py:595
Method
_init_weights
Initialize the weights
models/modeling_bert_new_timestep.py:778
Method
_load
(self, task_name, split)
dataloader.py:156
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
models/modeling_bert.py:903
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
models/modeling_roberta.py:732
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
models/modeling_bert_new_timestep.py:934
Method
_reorder_cache
(self, past, beam_idx)
models/modeling_bert.py:1288
Method
_reorder_cache
(self, past, beam_idx)
models/modeling_roberta.py:1027
Method
_reorder_cache
(self, past, beam_idx)
models/modeling_bert_new_timestep.py:1320
Method
_set_gradient_checkpointing
(self, module, value=False)
models/modeling_bert.py:763
Method
_set_gradient_checkpointing
(self, module, value=False)
models/modeling_roberta.py:611
Method
_set_gradient_checkpointing
(self, module, value=False)
models/modeling_bert_new_timestep.py:794
Method
_split_generators
(self, dl_manager)
conditional_data/Q-T/Q-T.py:18
Method
_split_generators
(self, dl_manager)
conditional_data/qqp/qqp.py:18
Method
_tie_weights
(self)
models/modeling_roberta.py:1156
Method
add_original_src_length
(self, example, tokenizer)
dataloader.py:64
Method
add_prompt
(example)
dataloader.py:108
Method
add_prompt
(example)
dataloader.py:121
Method
add_prompt
(example)
dataloader.py:133
Method
add_prompt
(example)
dataloader.py:144
Function
collate_fn
(batch_input)
DDP_main.py:162
Function
collate_fn
(batch_input)
predict_downstream_condition.py:118
Function
collate_fn
(batch_input)
compute_elbo.py:148
Method
collate_fn
(batch_input, tokenizer)
dataloader.py:84
Function
compute_quality_in_conditional_gen
(task_name, file_name)
compute_metric.py:55
Function
compute_quality_in_unconditional_gen
(file_name)
compute_metric.py:78
Method
convert_to_features
(example_batch, tokenizer)
dataloader.py:23
Method
convert_to_features
(example_batch, tokenizer)
dataloader.py:73
Method
create_custom_forward
(module)
models/modeling_bert.py:594
Method
create_custom_forward
(module)
models/modeling_roberta.py:511
Method
create_custom_forward
(module)
models/modeling_bert_new_timestep.py:623
Function
create_discrete_diffusion_schedule
Creates a callable schedule object to use for diffusion rates. Args: kind: str, one of 'standard', 'linear', 'cosine', 'mutual_information'. I
diffusion_word_freq.py:472
Function
create_discrete_diffusion_schedule
Creates a callable schedule object to use for diffusion rates. Args: kind: str, one of 'standard', 'linear', 'cosine', 'mutual_information'. I
diffusion_condition.py:507
Function
cross_entropy_with_probs
Compute cross entropy for a given distribution and targets. Cross entropy is taken over the last axis. Remaining axes are unchanged. Args:
losses.py:21
Method
custom_forward
(*inputs)
models/modeling_bert.py:595
Method
custom_forward
(*inputs)
models/modeling_roberta.py:512
Method
custom_forward
(*inputs)
models/modeling_bert_new_timestep.py:624
Method
custom_product_fn
Returns product of first n matrices. Only supported for beta constant.
diffusion_word_freq.py:378
Method
custom_product_fn
Returns product of first n matrices. Only supported for beta constant.
diffusion_condition.py:413
Function
denoise_fn
(targets, timestep, attention_mask)
DDP_main.py:190
Function
denoise_fn
(input_ids, corrupted_input_ids, timestep, attention_mask, target_mask)
predict_downstream_condition.py:104
Function
denoise_fn
(targets, timestep)
compute_elbo.py:121
Function
denoise_fn
(input_ids, corrupted_input_ids, timestep, attention_mask, target_mask)
DDP_main_conditional.py:169
Function
discrete_diffusion_elbo
Computes the ELBO likelihood bound for discrete diffusion models. Pseudocode: 1. starting at t = T and going towards t = 0: 2. sample P(x_
diffusion_word_freq.py:745
Function
discrete_diffusion_elbo
Computes the ELBO likelihood bound for discrete diffusion models. Pseudocode: 1. starting at t = T and going towards t = 0: 2. sample P(x_
diffusion_condition.py:764
Function
discrete_diffusion_predict_fn
Predict an image or text from a diffusion model. Args: params: a PyTree of parameters for the model. rng_key: an RNG key. targets: igno
diffusion_word_freq.py:846
← previous
next →
101–200 of 340, ranked by callers