MCPcopy Create free account

hub / github.com/SHI-Labs/Versatile-Diffusion / functions

Functions773 in github.com/SHI-Labs/Versatile-Diffusion

Methodmax_position_embeddings
(self)
lib/model_zoo/optimus_models/configuration_gpt2.py:130
Functionmean_flat
Take the mean over all non-batch dimensions.
lib/model_zoo/diffusion_utils.py:169
Methodmode
(self)
lib/model_zoo/distributions.py:9
Methodmode
(self)
lib/model_zoo/distributions.py:61
Methodnll
(self, sample, dims=[1,2,3])
lib/model_zoo/distributions.py:53
Methodnll_iw
compute the importance weighting estimate of the log-likelihood Args: x0, x1: two different tokenization results of x, where x is
lib/model_zoo/optimus.py:296
Functionnormal_kl
source: https://github.com/openai/guided-diffusion/blob/27c20a8fab9cb472df5d6bdd6c8d11c8f430b924/guided_diffusion/losses.py#L12 Compute the K
lib/model_zoo/distributions.py:65
Methodnum_attention_heads
(self)
lib/model_zoo/optimus_models/configuration_gpt2.py:138
Methodnum_hidden_layers
(self)
lib/model_zoo/optimus_models/configuration_gpt2.py:142
Methodon_train_batch_end
(self, *args, **kwargs)
lib/model_zoo/vd.py:326
Methodon_train_batch_start
(self, x)
lib/model_zoo/vd.py:323
Methodpad_token
Padding token (string). Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:103
Methodpad_token_id
Id of the padding token in the vocabulary. Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:183
Methodpredict_start_from_noise
(self, x_t, t, noise)
lib/model_zoo/vd.py:214
Methodprepare_dataloader
(self)
lib/utils.py:504
Methodprepare_dataloader
(self)
lib/utils.py:568
Methodprepare_model
(self)
lib/utils.py:537
Methodprepare_model
(self)
lib/utils.py:589
Functionprune_layer
Prune a Conv1D or nn.Linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_gr
lib/model_zoo/optimus_models/modeling_utils.py:770
Methodq_mean_variance
Get the distribution q(x_t | x_0). :param x_start: the [N x C x ...] tensor of noiseless inputs. :param t: the number of diff
lib/model_zoo/vd.py:202
Methodreconstruct
reconstruct from input x Args: x: (batch, *) decoding_strategy: "beam" or "greedy" or "sample" K: the beam
lib/model_zoo/optimus.py:215
Functionregister
(name)
lib/model_zoo/common/get_model.py:96
Functionregister
(name)
lib/model_zoo/common/get_scheduler.py:41
Functionregister
(name)
lib/model_zoo/common/utils.py:89
Methodresize_token_embeddings
Resize input token embeddings matrix of the model if new_num_tokens != config.vocab_size. Take care of tying weights embeddings afterwards if
lib/model_zoo/optimus_models/modeling_utils.py:138
Methodresize_token_embeddings
(self, new_num_tokens=None)
lib/model_zoo/optimus_models/optimus_gpt2.py:1114
Functions3_request
Wrapper function for s3 requests in order to create more helpful error messages.
lib/model_zoo/optimus_models/file_utils.py:171
Methodsample
(self)
lib/model_zoo/distributions.py:6
Methodsample
(self)
lib/model_zoo/distributions.py:17
Methodsample_from_posterior
perform MH sampling from model posterior Returns: Tensor Tensor: samples from model posterior with shape (batch_si
lib/model_zoo/optimus.py:415
Methodsave_last_model
(self, **para)
lib/utils.py:553
Methodsave_last_model
(self, **para)
lib/utils.py:600
Methodsave_pretrained
Save a model and its configuration file to a directory, so that it can be re-loaded using the `:func:`~pytorch_transformers.PreTrainedMod
lib/model_zoo/optimus_models/modeling_utils.py:195
Methodsave_pretrained
Save a configuration object to the directory `save_directory`, so that it can be re-loaded using the :func:`~pytorch_transformers.Pretrai
lib/model_zoo/optimus_models/configuration_utils.py:59
Methodsave_pretrained
Save the tokenizer vocabulary files together with: - added tokens, - special-tokens-to-class-attributes-mapping,
lib/model_zoo/optimus_models/tokenization_utils.py:421
Methodsave_vocabulary
Save the tokenizer vocabulary and merge files to a directory.
lib/model_zoo/optimus_models/tokenization_gpt2.py:202
Methodsave_vocabulary
Save the tokenizer vocabulary to a directory or file.
lib/model_zoo/optimus_models/tokenization_bert.py:206
Functionscale_module
Scale the parameters of a module and return it.
lib/model_zoo/diffusion_utils.py:161
Methodschedule
(self, n)
lib/model_zoo/common/get_scheduler.py:248
Methodsep_token
Separation token (string). E.g. separate context and query in an input sequence. Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:96
Methodsep_token_id
Id of the separation token in the vocabulary. E.g. separate context and query in an input sequence. Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:178
Methodset_lr
Set Each parameter_groups in optim with new_lr New_lr can be find according to the idx. pg_lrscale tells how to scale each pg
lib/model_zoo/common/get_scheduler.py:54
Functionsingleton
(class_)
lib/cfg_holder.py:3
Functionsingleton
(class_)
lib/sync.py:17
Functionsingleton
(class_)
lib/model_zoo/common/get_model.py:11
Functionsingleton
(class_)
lib/model_zoo/common/get_scheduler.py:8
Functionsingleton
(class_)
lib/model_zoo/common/utils.py:15
Functionsingleton
(class_)
lib/model_zoo/common/get_optimizer.py:6
Methodspecial_tokens_map
A dictionary mapping special token class attribute (cls_token, unk_token...) to their values ('<unk>', '<cls>'...)
lib/model_zoo/optimus_models/tokenization_utils.py:776
Methodsplit_on_token
(tok, text)
lib/model_zoo/optimus_models/tokenization_utils.py:583
Methodsplit_on_tokens
(tok_list, text)
lib/model_zoo/optimus_models/tokenization_utils.py:601
Functionswish
(x)
lib/model_zoo/optimus_models/optimus_bert.py:131
Methodt2y0_semf_wrapper
(t0, y00, t1, y01)
app.py:63
Methodt2y0_styf_wrapper
(t0, y00, t1, y01)
app.py:75
Methodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
lib/model_zoo/optimus_models/tokenization_bert.py:368
Functiontorch_to_numpy
(*argv)
lib/utils.py:607
Functiontorch_to_numpy
(*argv)
lib/log_service.py:144
Functionuniq
(arr)
lib/model_zoo/attention.py:15
Methodunk_token
Unknown token (string). Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:89
Methodunk_token_id
Id of the unknown token in the vocabulary. Log an error if used while not having been set.
lib/model_zoo/optimus_models/tokenization_utils.py:173
Methodvalidation_step
(self, batch, batch_idx)
lib/model_zoo/autokl.py:89
Functionvanilla_d_loss
(logits_real, logits_fake)
lib/model_zoo/autokl_utils.py:288
Methodvocab_size
(self)
lib/model_zoo/optimus_models/tokenization_gpt2.py:132
Methodvocab_size
(self)
lib/model_zoo/optimus_models/tokenization_bert.py:164
Methodvocab_size
Size of the base vocabulary (without the added tokens)
lib/model_zoo/optimus_models/tokenization_utils.py:472
Functionweights_init
(m)
lib/model_zoo/autokl_utils.py:93
Functionwrapper
(url, *args, **kwargs)
lib/model_zoo/optimus_models/file_utils.py:178
Functionwrapper
(class_)
lib/model_zoo/common/get_model.py:97
Functionwrapper
(class_)
lib/model_zoo/common/get_scheduler.py:42
Functionwrapper
(class_)
lib/model_zoo/common/utils.py:90
Methodx2y_semf_wrapper
(x0, x1, y1)
app.py:69
Methodx2y_styf_wrapper
(x0, x1, y1)
app.py:81
Functionzero_module
Zero out the parameters of a module and return it.
lib/model_zoo/diffusion_utils.py:153
← previous701–773 of 773, ranked by callers